Prestashop 1.7: Messages always on

Prestashop by default does not send messages to the customer, unless you switch the radio button every time you want to send a message.

If you want the default position of that radio button to be YES, always send the message to the customer, then modification of a helper file in Prestashop is required.

The helper file is located here:

adminXXXX/themes/default/template/controllers/orders/helpers/view/view.tpl

The position of the required change is line 848 – 852.

You will find the following code:

<div class=”form-group”>
<label class=”control-label col-lg-3″>{l s=’Display to customer?’ d=’Admin.Orderscustomers.Feature’}</label>
<div class=”col-lg-9″>
<span class=”switch prestashop-switch fixed-width-lg”>
<input type=”radio” name=”visibility” id=”visibility_on” value=”0″  />
<label for=”visibility_on”>
{l s=’Yes’ d=’Admin.Global’}
</label>
<input type=”radio” name=”visibility” id=”visibility_off” value=”1″  checked=”checked”/>
<label for=”visibility_off”>
{l s=’No’ d=’Admin.Global’}
</label>
<a class=”slide-button btn”></a>
</span>
</div>
</div>

Now what you need to do is move the tag

checked=”checked”

to this entry:

<input type=”radio” name=”visibility” id=”visibility_on” value=”0″  />

 

The new code will look like this:

<div class=”form-group”>
<label class=”control-label col-lg-3″>{l s=’Display to customer?’ d=’Admin.Orderscustomers.Feature’}</label>
<div class=”col-lg-9″>
<span class=”switch prestashop-switch fixed-width-lg”>
<input type=”radio” name=”visibility” id=”visibility_on” value=”0″ checked=”checked” />
<label for=”visibility_on”>
{l s=’Yes’ d=’Admin.Global’}
</label>
<input type=”radio” name=”visibility” id=”visibility_off” value=”1″ />
<label for=”visibility_off”>
{l s=’No’ d=’Admin.Global’}
</label>
<a class=”slide-button btn”></a>
</span>
</div>
</div>

 

For a better description see this post on Prestashop:

New Message to customer yes or no