Jump to content

Cannot disable Free Shipping


Recommended Posts

The shopping cart is displaying "Free Shipping" even though free shipping is disabled.

 

It calculates the shipping correctly when we get to shipping in the checkout. In fact, if a customer logs in, it immediately calculates the shipping and displays the lowest shipping cost.

 

"Free Shipping" is disabled in the back office.

 

How do we stop PrestaShop from displaying "Free Shipping" before the shipping has been calculated? The shipping field should be blank or say something - anything except "Free Shipping"

 

See two images.

Order - Pendulum Charts by Xeonix - Free Shipping.pdf

Order - Pendulum Charts by Xeonix - shipping charges.pdf

Shipping - PrestaShop Free Shipping Settings.pdf

Link to comment
Share on other sites

PrestaShop™ 1.5.4.0 - It says this in the screenshot.

 

Sorry for the cheap shot, but I am extremely frustrated at the number of seemingly basic things in PrestaShop that don't work.

 

ALSO: It is NOT the template. When I switch back to the default template, I still have the same problem.

Edited by hostricity (see edit history)
Link to comment
Share on other sites

The shopping cart is displaying "Free Shipping" even though free shipping is disabled.

 

It calculates the shipping correctly when we get to shipping in the checkout. In fact, if a customer logs in, it immediately calculates the shipping and displays the lowest shipping cost.

 

"Free Shipping" is disabled in the back office.

 

How do we stop PrestaShop from displaying "Free Shipping" before the shipping has been calculated? The shipping field should be blank or say something - anything except "Free Shipping"

 

See two images.

 

 

 

 

Free Shipping! which appears in the cart block until the customer has added an address and shipping can be calculated. @ around line 598 in ajax-cart.js, change the script as below.

 

 

Change this:

 

if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1)

$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

else

if (typeof(freeShippingTranslation) != 'undefined')

$('.ajax_cart_shipping_cost').html(freeShippingTranslation);

 

 

To This:

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) >= 0)

$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

else

$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

 

Hello, what version of PrestaShop are you using?

 

 

Seem Familiar !!! LOL

Edited by tdr170 (see edit history)
  • Like 1
Link to comment
Share on other sites

No, this did not fix it.

 

Even if it did, I'd be concerned about some other problem causing this which should concern me.

 

This isn't a known bug in Prestashop is it?

 

If the code has to be hacked, I can figure that out, but I want to understand what is going on that requires the code to be hacked - unless it is a known bug.

Edited by hostricity (see edit history)
Link to comment
Share on other sites

No, this did not fix it.

 

Even if it did, I'd be concerned about some other problem causing this which should concern me.

 

This isn't a known bug in Prestashop is it?

 

This does fix it as I can show in my site I applied this change and the Free shipping changed to $0.00.

If you applied this fix correctly and turned force compile on and cache off you should see the change.

If the cart still does not change use your FTP and clear all files form your smarty cache and compile folder with the exception of any index.php files you may find.

../cache/smarty/ cache & compile

I have a feeling that yours has not changed due to your browser loading a cahed page without the change.

Yes this is a known issue not not necessarily a bug.

I have used this for some time and there are no issues concerning this fix, and the ajax-cart lines are the cause.

 

 

 

Edited by tdr170 (see edit history)
  • Like 1
Link to comment
Share on other sites

This does fix it as I can show in my site I applied this change and the Free shipping changed to $0.00.

If you applied this fix correctly and turned force compile on and cache off you should see the change.

If the cart still does not change use your FTP and clear all files form your smarty cache and compile folder with the exception of any index.php files you may find.

../cache/smarty/ cache & compile

I have a feeling that yours has not changed due to your browser loading a cahed page without the change.

Yes this is a known issue not not necessarily a bug.

I have used this for some time and there are no issues concerning this fix, and the ajax-cart lines are the cause.

 

 

 

 

Thank you for your explicit response.

 

I'll look at it further and am sure I can get it working.

 

I do have caching off, etc., but...

 

OK. HERE'S The problem:

 

The ajax-cart.js file is over-ridden by another ajax-cart.js file in my theme. When I test with the default theme, it works correctly.

 

Patching the ajax-cart.js file in the theme now...

Edited by hostricity (see edit history)
Link to comment
Share on other sites

Just comment the line which shows the Shipping ;

 

File path: ~\themes\default\modules\blockcart\blockcart.tpl

 

  <p id="cart-prices">
 <!-- <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>
  <br/>
  {if $show_wrapping}
   {assign var='cart_flag' value='Cart::ONLY_WRAPPING'|constant}
   <span id="cart_block_wrapping_cost" class="price cart_block_wrapping_cost">{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $cart_flag)}{/if}</span>
   <span>{l s='Wrapping' mod='blockcart'}</span>
   <br/>
  {/if} !-->

 

Then your cart will be...

no_shipping.png

 

Thanks,

 

 

Hanafi.

Link to comment
Share on other sites

Just comment the line which shows the Shipping ;

 

File path: ~\themes\default\modules\blockcart\blockcart.tpl

 

  <p id="cart-prices">
 <!-- <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>
  <br/>
  {if $show_wrapping}
{assign var='cart_flag' value='Cart::ONLY_WRAPPING'|constant}
<span id="cart_block_wrapping_cost" class="price cart_block_wrapping_cost">{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $cart_flag)}{/if}</span>
<span>{l s='Wrapping' mod='blockcart'}</span>
<br/>
  {/if} !-->

 

Then your cart will be...

no_shipping.png

 

Thanks,

 

 

Hanafi.

 

We don't want to remove the shipping all together just don't want it to say Free shipping.

The fix I posted above does this.

Link to comment
Share on other sites

OK just doing some testing and found that you can change both the header cart and the cart summery Free shipping right in the BO.

Just go to localization, translations there are two areas that need to be translated.

First go to Front office translations click on your flag, scroll down and find shopping-cart and add the Free shipping! translation to your choice and then click Update translations.

$0.00 what I used.

Now go to Installed modules translations, scroll down and find Module: Blockcart and change the Free shipping! translation to your choice.

$0.00 what I used.

This works and no need to edit and change any files.

Edited by tdr170 (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

The shopping cart is displaying "Free Shipping" even though free shipping is disabled.

 

It calculates the shipping correctly when we get to shipping in the checkout. In fact, if a customer logs in, it immediately calculates the shipping and displays the lowest shipping cost.

 

"Free Shipping" is disabled in the back office.

 

How do we stop PrestaShop from displaying "Free Shipping" before the shipping has been calculated? The shipping field should be blank or say something - anything except "Free Shipping"

 

See two images.

 

go to Carriers and make sure that all checkboxes are checked for Group Access especially Guest, Default and Visitor.

 

this then works fine for PS 1.5.4.1

Link to comment
Share on other sites

  • 3 months later...

Hello

 

Unfortunately I am encountering the same issue here.

I have put the fix in place in ajax-cart.js but no luck. (I have forced compile)

I can't do the translations thing as I am over the limit and my host won't up the limit for security reasons.

 

I am just thinking of something. As you can see on my screenshots I have these two carrier appearing.

What about removing the "free" carrier in my db. Would that create a mess?

 

Thanks for your time

 

Guillaume

 

 

post-470973-0-48371000-1381915382_thumb.jpg

post-470973-0-54649300-1381915383_thumb.jpg

post-470973-0-65024500-1381915384_thumb.jpg

Link to comment
Share on other sites

  • 4 years later...
  • 11 months later...

This is the solution for PS 1.7 in relation to showing "Free"  when the shipping is not even yet calculated, that is,  we still don't know if we are gonna be able to offer free shipping (rules are not yet applied). So the solution was to check if there are any items in the cart. If there aren't, that means that shipping hasn't been calculated at all, so we can just show $0.00. (Notice the static dollar sign, not great but at least it works for single currency shops, just put the correct sign. Multi-currency carts should find a fix to dynamically change the sign, maybe adding variable in CartPresenter.php).

Edit this file:

themes/<your_theme>/templates/checkout/_partials/cart-detailed-totals.tpl

Replace:

<span class="value">{$subtotal.value}</span>

With:

{if $subtotal.type === 'shipping' && $cart.products_count==0}
  <span class="value">$0.00</span>
{else}
  <span class="value">{$subtotal.value}</span>
{/if}

 

Edited by mysticav (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...