miércoles, 26 de noviembre de 2014

Remove shipping cost from cart module in Prestashop

There is a problem in Prestashop 1.6.0.9  on the item shipping cost on the blockcart .
If Not logged in the store always appears free shipping when in fact it is not, this can create confusion and anger among buyers because then they think that shipping is free but isen't (in many cases there is a minimum purchase for free shipping).

To fix this you must perform a series of steps:



1- We go to the backend of Prestashop in transport and select transport and go to the tab size, weight and access group and deselect that of visitor as shown in the attached image.



2- Go to modules / blockcart / blockcart.tpl file inside the themes folder and topic that is being used and modify the following lines.
The following (or similar depending on the subject) appears on the 155

<span class="price cart_block_shipping_cost ajax_cart_shipping_cost">
{if $shipping_cost_float == 0}
{l s='Free shipping!' mod='blockcart'}
{else}
     {$shipping_cost}
{/if}
</span>
<span>
{l s='Shipping' mod='blockcart'}
</span>

Replace for the following;

{if !$logged AND !$cart->id_customer}
<span class="price cart_block_shipping_cost">
                <a href="index.php?controller=authentication&back=my-account">{l s='indeterminate' mod='blockcart'}</a>
</span>
{else}
       <span class="price cart_block_shipping_cost ajax_cart_shipping_cost">
{if $shipping_cost_float == 0}
{l s='Free shipping!' mod='blockcart'}
{else}
         {$shipping_cost}
{/if}
      </span>
{/if}
  <span>{l s='Shipping' mod='blockcart'}</span>


After changing the above down to line 298, in which we should have the following:

<span class="ajax_cart_shipping_cost">
{if $shipping_cost_float == 0}
{l s='Free shipping!' mod='blockcart'}
{else}
{$shipping_cost}
{/if}
</span>

Replace with:

{if !$logged AND !$cart->id_customer}
<span>
{l s='indeterminate' mod='blockcart'}
</span>
{else}
      <span class="ajax_cart_shipping_cost">
     {if $shipping_cost_float == 0}
{l s='Free shipping!' mod='blockcart'}
     {else}
{$shipping_cost}
     {/if}
     </span>
{/if}

We upload the file to the server and replace it with the existing one.

3- Let the backend in location-> translations:
there we choose
translations of modules installed, the template in which we work and language , and give it to change and search the blockcart module
Once found searching the indeterminate variable and placing Loging to see.
save

4- Advanced settings> performance and click empty the cache








3 comentarios :

  1. Hola! gracias por tu explicación, és el único post con el que he conseguido algo. Pero me duplica la linea de 'Envio' i lo de 'Login to see' sale en mayusculas.
    Hay alguna forma de solucionar estas dos cosas?

    Muchas gracias,
    Jordioniric

    ResponderEliminar
  2. Primer problema solucionado eliminando la linia:
    {l s='Shipping' mod='blockcart'}

    ResponderEliminar
  3. Hola, me gustaria saber como hacer para que al cerrar el carrito, me muestre el costo del envio, pero no me lo sume al total. muchas gracias.

    ResponderEliminar