Prestashop 1.7 Free Shipping always displayed in Shopping Cart

I ran across the issue that the shopping cart always showed “Free Shipping”, which was incorrect for the cart as shown.

In carriers, I had various carriers for various delivery countries, and various cart values established. From a certain order value, all carriers would be free. However as I don’t ship worldwide, most of the regions were not populated with numbers, and not activated for any carrier.

The issue about free shipping appeared only when the customer was not logged on. Also, I was viewing the shop from abroad. I didn’t view with any VPN so it was showing the native IP from the country where I was located.

I found out the reason for this behaviour:

  • Prestashop saw the country of the viewer through Geolocation.
  • It then checked which was the default carrier for the location.
  • Then it looked up the conditions for that carrier and location, and saw that there was no cost entered.
  • It consequently showed free shipping.

This could not be fixed. Why? I was viewing from a country where I would never ship product. I was therefore unable to enter the shipping cost. Would I enter shipping cost, then prestashop would make this country open for orders, which I would be unable to fulfil. I didn’t want that. This location must remain closed, therefore no shipping cost may be available. Prestashop deletes any entered values for shipping cost as soon as the region is deactivated. And no shipping cost means zero.

The default carrier in Prestashop is defined in Shipping – Preferences. I had it set to “cheapest”. When I changed it to one of the existing carriers, behaviour would not change, because none of the carriers had any shipping cost defined for my location. I then changed to “best grade”. This didn’t produce a shipping cost, but I did add the phrase “under conditions”.

This is as close as I could get to a solution. Now a customer would see free shipping “under conditions” until logged on. And this would only concern visitors from countries where I would not ship anyways. So in real life situations, this issue would be quite rare.

To fix the issue with free shipping, I would now check the following:

  • Enable “Visitors” for every carrier
  • Check the default carrier option in shipping-preferences
  • Make sure the cost is correctly entered in the conditions for the carrier, for the region from which the shop is viewed
  • Choose “Best grade” if the phrase “under conditions” is helpful for any “free shipping” carriers.
  • Check that in Shipping-Preferenes, the “free shipping starts from” option is set to zero, which deactivates the free shipping option there.

For testing purposes, I created a “fake shipping” carrier, which will be active for all regions, and will have an extraordinarily high shipping cost (120 EUR). This would enable eben to ship, should a customer order product to any country worldwide (which isn’t possible because the country field selector limits the destination countries). However also this carrier didn’t change behaviour. Although by the logic of carrier selection this carrier would be selected as default, it still showed “Free shipping (under conditions)” – because one of the other carriers available still had no shipping cost attached to them, although none of the zero cost carriers for that location were activated.

In my view this is a functionality of Prestashop which deserves further refinement. Proposal: If no carriers are activated for a given location, only provide the link to the CMS for shipping cost, without stating the cost in the shopping cart.