Jump to content

Remove shipping cost from cart module ?


Recommended Posts

Hello, I have this problem : I would not display shipping costs in the cart module during the "normal" process of shopping but only when the customer check-out the order, because we think that see shipping costs it may be a negative thing during the shopping navigation, so we want that it will display only in the check-out page.


 


We've found this suggestion


http://www.prestasho...-the-main-page/


 


but it doesn't do that thing because it only doesn't display the "shipping" line but the shipping cost is calculated the same.


 


If anyone have already solve this problem could help us is welcome.


 


We have 1.4.7 version of PS


Sorry for our english, thanks to all that will answer


 


____________________________________


http://www.kissene.com/en


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

  • 1 month later...

Somebody please answer this. 

 

We are having the same issue.  We offer different shipping services that are defaulted on the cheapest service, but when a customer orders something heavy, the cheapest service is not so cheap anymore and we have complaints from people that do not want to order because shipping is too high.  They do not know that if they click through they will get different choices.  I want to make shipping disappear from the side bar shoppig cart altogether. I do not want the price to reflect shipping in any way until the time to chose a shipping carrier.  Please advise.

 

Steve Verner

Link to comment
Share on other sites

Here is what you need to do:

 

in modules > blockcart > blockcart.tpl comment out the following lines

<span>{l s='Shipping' mod='blockcart'}</span>
			<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
			<br/>

Next you will need to edit the following line (same file)

<span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>

Change this to

<span id="cart_block_total" class="price ajax_block_cart_total">{$product.total}</span>

That should solve your problem.

 

Marty Shue

  • Like 2
Link to comment
Share on other sites

Hi rock,

Follow Marty's directions, only, there's in default PrestaShop already an 'override' of the blockcart.tpl file, which you will find in the themes/<your theme folder>/modules/blockcart/blockcart.tpl

 

Edit this file, otherwise you won't see your changes. (As this file will be used, and thus the other one in /modules/blockcart/ is ignored)

 

My 2 cents,

pascal

  • Like 1
Link to comment
Share on other sites

Hi rock,

Follow Marty's directions, only, there's in default PrestaShop already an 'override' of the blockcart.tpl file, which you will find in the themes/<your theme folder>/modules/blockcart/blockcart.tpl

 

Edit this file, otherwise you won't see your changes. (As this file will be used, and thus the other one in /modules/blockcart/ is ignored)

 

My 2 cents,

pascal

 

Sorry for my oversight. My test installation didn't have the override file but still it would've been better for me to instruct to create it even if it doesn't exist. Thanks for the additional insight.

 

Marty Shue

Link to comment
Share on other sites

  • 3 weeks later...

Hello,
I am running Prestashop 1.5.5 0 and I have a problem related to this. I was looking for a solution to this exact same problem (removing shipping from the cart module as well as the cart summary page) and this code change did exactly what I wanted

*However*, there is a problem in the cart summary when someone from outside the US wants to estimate shipping charges. If someone chooses Canada from the drop down, picks their shipping method and clicks "update cart"....the cart updates and displays "Free Shipping!"

I do not have feee shipping defined anywhere in my shipping settings. Shipping is ultimatley calculated correctly when the customer checks out but the "free shipping" message is going to be very confusing for customer outside of the US!

I even replaced the blockcart.tpl file with the original , unmodified file, and the same thing happens.

Can someone help?

post-729090-0-33595200-1384830216_thumb.gif

Link to comment
Share on other sites

I did read the option to change "free shipping" under translations but would still make the shipping estimator confusing for a non-US customer. If I changed "free shipping" to "--", the cart would still be incorrect if the customer clicks 'Update cart" - the cart total shows the price of products only with no shipping added. See my screen shot.

 

In addition, I do not have 'free shipping" defined anywhere for any carrier, for any country. Why is this displaying at all? Essentially, it seems as if the shipping estimator does not work at all for non-US customers once they click 'update cart'

 

Carolyn

post-729090-0-95206900-1384872404_thumb.gif

  • Like 1
Link to comment
Share on other sites

My apologies - I just realized that my question below is NOT related to the code edit.

I am assuming I should post this somewhere else?

Sorry - just a big newbie here under a deadline to get a site running.

 

--------------------------------

Hello,

I came across a glitch regarding removing the shipping from the cart module  As I stated earlier, I used the suggested code and it worked nicely. I have also decided to not use the shipping estimator, and everything was fine.

 

I then decided to add in an additional cost per item  (Additional shipping cost (per quantity) in the shippng option for a product) for a few of my heavier items.

If someone adds one of those items to their cart, the additional shipping cost displays in the cart block and cart summary - so if I have a $1.00 additional shipping charge for a particular item and the customer chooses that product - shipping shows up as $1.00 until they check out.

 

Is there a way around this - so that this charge is not displayed and only appears when the rest of the shipping charge shows during checkout?

If any more information is needed, just let me know

 

carolyn

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

I am having another problem relating to the cart block...I think it may be related to the code change for removing he shipping info.

 

The cart block toal displays as the value of the last item added to the cart if I click on any link after adding more than one item to the shopping cart. The total is correct at checkout, and totals again correctly if I add another item to the cart....but as soon as I click anywhere else...the cart total displays as the value of the last item added to the cart. The cart also totals again correctly if I remove an item, but as soon as I click on any link on the site - the total reverts back to the value of the last item in the cart

 

I have attached a screen shot. Is this related to the code change, if so, how do I fix it?

post-729090-0-39982600-1384983363_thumb.gif

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

One super simple thing you can do to solve this is go to Localization > Translations. Select 'Front Office translations' then your theme name.

 

Find 'Free Shipping!' then simply replace it with '---' (or your choice).

 

Marty Shue

 I decided to go ahead and try this ...unfortunatley I get an error that says:

 

Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form: 1000 for suhosin.post.max_vars.

1000 for suhosin.request.max_vars.

Please ask your hosting provider to increase the suhosin limit to 1439 at least or edit the translation file manually.

 

At this point, I decided to disable the cart block module for now.  Maybe I should have just tried that in the first place

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

Well, of course after writing the long post below, I did something this morning that changed something: I unchecked "visitor" from Group Access in all of my carriers.

On my computer, as well as someone else's who checked this for me, there is now no shipping line in the cart summary if the person is not logged in. Was the solution that simple? Free shipping does not display (it did on on person's, who had been on the site before, until they cleared their cache)

The only issue is that if someone creates and account but does not put in an address, it defaults to my first shipping carrier's cost, which is still problematic but much better than before.

 

------Below is my original post----------------------------------------------------------

I hope it does not seem like I am spamming this thread - that is not my intention at all. It just seems that every few hours, something else happens that changes everything I thought I had figured out.  I hope I can explain clearly now  - this should also clear up why I posted so many times.

 

in brief, I do not want shipping displaying AT ALL in the cart summary until someone logs in

I somehow was able to somehow, magically, successfully eliminate the shipping cost from showing in the cart summary page (which I wanted)  until the customer logged in…and now the shipping line is back. Please  bear with me as I try to explain what happened:

 

 I implemented the code change Marty suggested on Nov 2 because I wanted shipping eliminated from the cart block AND cart summary until the customer entered an address and could then choose from the carrier list. His code changed worked, but now that I am more familiar with the code, I can’t figure out how the code change would have eliminated the shipping line from the cart summary, since it looks like the change would only affect the cart BLOCK, not the cart summary. Either way, at the time, for some reason, shipping was not showing in my cart summary, (unless someone was logged in)  even after extensive testing.

 

The only issue I ran into after that was that if I had an additional shipping cost for a particular item, (for example, $1.00) it would display in the shipping area until someone logged in, so they would see shipping as $1.00. I then eliminated any shipping costs per item quantity. I mentioned this in my post on Nov 20 at 3:36pm. This also shows that no shipping costs were being pulled from any carrier at that time - it was displaying only shipping associated w/a particular itwm.

 

In the meantime, I had some problems with the shipping estimator (which I decided to eliminate) and then noticed an odd problem with the cart block not displaying the total for the products properly, which  I described in a post on Nov 20 at 4:36pm. At this point I decided to disable to cart block module.

 

That post though, showed a screen capture of my cart summary at that time and as you can see, there is no shipping listed…so I am not crazy…there really was no shipping listed in my cart summary until someone logged in

 

At this point, I realized that the code change Marty suggested on Nov 2 probably affected the cart block only, (I think – do not hesitate to correct me if I am wrong ) and was wondering how I managed to eliminate the shipping line in the cart summary.  I replaced the edited blockcart.tpl with the original to see what happened (had force compile on, cleared smart cache, etc) and…shipping still did not show in the cart summary. I didn’t know quite what to think but thought that I must have changed some setting to fix the problem (silly, I know, but I am running on almost no sleep)

 

I then started having an uncomfortable feeling about the eliminated cart summary shipping line, since I know it is still an issue for many, so I realized I did not just magically fix it. I went to another computer where I had never tested the site.

 

As you may have guessed… the shipping cost in the cart summary was there before anyone logged in!  I called a friend and had them test it. Same thing. Went back to my computer – still no shipping displayed unless someone logged in. I then cleared not just my browser cache, but all cookies, logins, etc… and of course….once I did that, the unwanted cart summary shipping line appeared again on the computer that had not displayed it since Nov. 18.

 

After all this, I feel like I am back to square 1. I should also clarify that the cart summary does not display “Free Shipping”  which I know happens to a lot of people – it displays the shipping cost for the first carrier in my carrier list…or actually, the first carrier listed that ships to the North America zone.  If I make another carrier my defualt carrier - like one that ships only to Canada - it still automatically pulls the shipping cost for my first north america zone carrier.

 

I could go into the  problems of why I don’t want this but the reasons are pretty much the same as what others have posted. Since this isn’t a problem of “free shipping” displaying, I gather the workaround in the translations area won’t do anything

 

So I’m back to trying to figure out how to get shipping to NOT DISPLAY AT ALL in the cart summary until someone logs in. I put Marty’s code change from Nov 2 back (the one that seemed to somehow magically fix the problem at first) but it didn’t.

 

Am I crazy?? Can anyone help? 

Please?

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

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

Hi there !

 

I also wanted to remove the shipping price on the top cart. I commented out the lines suggested with {* ..... *} and changed to {ptoduct.total}. The line has disappered now from the cart but the total is still including the shipping price and this should not be the case. Can someone help?

 

Thanks,

 

Isabel

Link to comment
Share on other sites

Is that answer for me? Not sure what tutorial you are referring to. Maybe you can help me with that too. I followed some of the comments on this thread and that is the problem I enounter. I dont seem to see anyone else with the total in  the cart including the price of the shipping.

 

Thanks for you help !

 

Izz

Link to comment
Share on other sites

  • 4 months later...

Have you tried following the tutorial already?

 

Hey, Nemo, thanks a lot for your great tutorial! I've followed your instructions and I succeded to have the shipping costs as I like, after reading tons of hints. I am using the lattest v.1.6.

I only need to get rid of the word "shipping" on the "add to cart" window (the one similar to a fancy box for pictures) or add "Waiting for destination" or something similar.

Yours has been the best tutorial so far on how to get rid of misleading messages about shipping fees.

Grazie mille, davvero!

Link to comment
Share on other sites

Thanks to you for tagging along!

That should be in blockcart.tpl (theme folder)

				<div class="layer_cart_row">
					<strong class="dark">
						{l s='Total shipping' mod='blockcart'} {l s='(tax excl.)' mod='blockcart'}
					</strong>
					<span class="ajax_cart_shipping_cost">
						{if $shipping_cost_float == 0}
							{l s='Free shipping!' mod='blockcart'}
						{else}
							{$shipping_cost}
						{/if}
					</span>
				</div>
Link to comment
Share on other sites

  • 1 month later...
Hello!

 

I've followed lots of tutorials and instructions about disabling or changing the shipping cost in the blockcart module, but I'm still not able to correct a problem.

 

After changing all Nemo1 has in his tutorial, the "Log in to see the shipping costs" message appear. But, when I move to another page or product page, it changes to 0,00€.

 

Where do this problem come from? Anyone know it or can help me to solve it?

Link to comment
Share on other sites

  • 4 weeks later...

Hey, Nemo, thanks a lot for your great tutorial! I've followed your instructions and I succeded to have the shipping costs as I like, after reading tons of hints. I am using the lattest v.1.6.

I only need to get rid of the word "shipping" on the "add to cart" window (the one similar to a fancy box for pictures) or add "Waiting for destination" or something similar.

Yours has been the best tutorial so far on how to get rid of misleading messages about shipping fees.

Grazie mille, davvero!

--

Hello nutxlago!

U can help me?

I have a prestashop version 1.6.0.8 but not worked.

needed to make any other changes?

 

thanks!!

Link to comment
Share on other sites

  • 3 months later...

How did you turn off the shipping estimate option prior to the checkout process?

i have shipping estimate that comes up on each product page, i want to turn this off, and only have one total at check out..

At that point I want to give US$ currency payments/orders a shipping discount.. This part can be done with an add-on..

i am using the latest Prestashop 1.6 Version.

Please help, this is driving me crazy....

Thanks

Warwick

Link to comment
Share on other sites

So you want to remove she shipping estimator from your product pages? If so, unhook it. Depending on where it's displaying, it might be hooked to displayFooterProduct or somewhere else in those whereabouts. Can you check under modules -> positions?

Link to comment
Share on other sites

  • 3 weeks later...

I have a similiar problem, as I'm selling digital goods I want to get rid of shipping things completely. I managed to remove it from most of the places but I have no idea how do I take it out of cart summary page (the one with payment selection).

 

Does anyone know how to do it?

Link to comment
Share on other sites

  • 3 weeks later...

So you want to remove she shipping estimator from your product pages? If so, unhook it. Depending on where it's displaying, it might be hooked to displayFooterProduct or somewhere else in those whereabouts. Can you check under modules -> positions?

 

Hi Nemo.

 

This is exactly what I am looking for. Could you please explain the process in more detail?

Link to comment
Share on other sites

Thanks Nemo that worked except for one thing. I unhooked the module and it was working fine. However, i logged into the shop this morning and it is back? I have had to unhook it again. I got the message saying "The module was successfully removed from the hook". Is there some sort of save function I am missing?

Link to comment
Share on other sites

  • 6 months later...

HI all,

I am a little stuck on this.    I am using 1.6.0.11 and my site is hosted at inmotion hosting.      I was able to dig up what I think is the correct file for this by going to C panel at inmotion > file manager > Web Root (public_html/www) > modules > blockcart > blockcart.tpl

I just dont seem to be getting any effect from making the changes in nemos video.     Inmotion has a tool bar a the top where I can click "edit" and it will display the code in texts.    I can edit this text as in the vid and then save, but nothing happens.     

There is also a button that says "code editor" and if I click that it wil open the file too but I cannot propperly edit the file.    Is like there is 2 layers of text there.   One in light grey and then another over the top of it.     Also if I click one line to edit 2 lines will always be slected and edited at the same time.

Anyone know what my problem is?

Thanks

Link to comment
Share on other sites

Thank you for your reply nemo.   

I think I may have found it, but I'm not sure.  

I went public HTML > themes > default-bootstrap > modules > blcokcart > blockcart.tpl

However once inside there the code does not really look like whats in your vid.    I did find a set that looks similar at the very very bottom.

EDIT:  PAGE OF CODE REMOVED.   SOLUTION IN POSTS BELOW.

 

Is this where I am suppose to be?

Sorry to post that whole page of code, I will remove it once I have my answer.      

Also I downloaded notepad ++ as you suggested.

In order to use this do I just copy and paste the code from the file at inmotionon, edit there and then copy/paste it back to the server file and click save?    or is there something more that needs to be done.

The only time I have ever modified code was for use with small micro chips in a flashlight driver using AVR studio.   Once any code was modified there we had to click "build"  for the code to be useful.
 

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

It's this one 

 

                <div class="layer_cart_row">
                    <strong class="dark">
                        {l s='Total shipping' mod='blockcart'} {if $display_tax_label}{if $priceDisplay == 1}{l s='(tax excl.)' mod='blockcart'}{else}{l s='(tax incl.)' mod='blockcart'}{/if}{/if}
                    </strong>
                    <span class="ajax_cart_shipping_cost">
                        {if $shipping_cost_float == 0}
                            {l s='Free shipping!' mod='blockcart'}
                        {else}
                            {$shipping_cost}
                        {/if}
                    </span>
                </div>

Get ftp access, like with filezilla. Once you're in, right click on the file, then "edit". Saving the file in any editor will automatically re-upload it.

be aware you might break it, keep a backup

Link to comment
Share on other sites

  • 2 weeks later...

Whoever wants to remove the shipping cost from the shopping cart just like the picture I attach, follow post #4, 

 post-908246-0-96389800-1438375076_thumb.png

 

After everything you have changed in the blockcart.tpl file, then you need to go to the admin site, click ADVANCED PARAMETERS/Performance, then click clear cache on the right top of the page.

 

Then the problem should be fixed. 

Link to comment
Share on other sites

  • 3 weeks later...

Ok I was finally able to fix this.

My vestion is 1.6.0.11

Fortunatly for me inmotion fixed the glich in theier code eiditor which is a huge help.    I did download Notepad++ and use it to make backup files to save on my hard drive before I change code.

I was able to fix this bug by editing one single line of code.    

After I unchecked the visitor shipping as shown in nemos video and then went to my hosting site to edit the code.

One awsome thing is tha inmotion hosting fixed what was wrong with the code editor on thier site and now it also works perfectly.



The file I edited was found in the same place others have mentioned.    Themes > default-bootstrap > modules > blcokcart > blockcart.tpl

However the code numbers are different that in nemos vidoe and also than what was mentioned here by nocturnal
https://www.prestashop.com/forums/topic/328131-how-to-remove-free-shipping-text-from-cart-menu/

Anwyay the only line of code I had to edtig to get a solution that works for me was line #146.
It said "Free shipping" before and I changed it to this

{l s='Calculated at checkout' mod='blockcart'}


Not a perfect solution but much better than "Free shipping!!"   


Thanks so much to nemo, nocturnal, and walidon.

 

  • Like 1
Link to comment
Share on other sites

Hi, we can also add a condition to themes > default-bootstrap > modules > blcokcart > blockcart.tpl, like this :

<div class="cart-prices-line first-line">
 {if $logged}
   <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>
 {/if}
</div>
{if $logged}
				<div class="layer_cart_row">
					<strong class="dark">
						{l s='Total shipping' mod='blockcart'} {if $display_tax_label}{if $priceDisplay == 1}{l s='(tax excl.)' mod='blockcart'}{else}{l s='(tax incl.)' mod='blockcart'}{/if}{/if}
					</strong>
					<span class="ajax_cart_shipping_cost">
						{if $shipping_cost_float == 0}
							{l s='Free shipping!' mod='blockcart'}
						{else}
							{$shipping_cost}
						{/if}
					</span>
				</div>
{/if}
Link to comment
Share on other sites

  • 2 months later...

These days was looking a solution for this. Finally and after read a lot of info I solve it: Working on Prestashop 1.6.1

 

- Disable  the default carrier.

- Create a new one and uncheck visitor and guest.

- Configure your carrier. with heights and zones.

 

That's all.

 

Now, only the registered customers see the shipping costs.

Link to comment
Share on other sites

Hi Valentin,

I went through and disabled guest and visitor on all my carriers like you mentioned.   I already had cereated my own.     When I did this the free shipping reappeard also on mine when not logged in.    To fix this I modified the source code held at my hosting site  by going to.   HTML > themes > default-bootstrap > modules > blcokcart > blockcart.tpl. Then changed line 343 to say   " calculated at checkout"   Like this.

 

 

{addJsDefL name=freeShippingTranslation}{l s='Calculated at checkout' mod='blockcart' js=1}{/addJsDefL}


That solved the problem for me.   I will wait a few days and see if it reverts back.

Link to comment
Share on other sites

  • 1 year later...

Here is what you need to do:

 

in modules > blockcart > blockcart.tpl comment out the following lines

<span>{l s='Shipping' mod='blockcart'}</span>
			<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
			<br/>

Next you will need to edit the following line (same file)

<span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>

Change this to

<span id="cart_block_total" class="price ajax_block_cart_total">{$product.total}</span>

That should solve your problem.

 

Marty Shue

 

I have 1.6.1.10 and I found a way to exclude shipping costs from the calculation of total in blockcart. Instead of Marty's recommendation to use {$product.total} use this:

 

{displayWtPrice p="`$total_products_wt`"}

 

Also have to edit

ajax_block_cart_total

to

ajax_block_products_total

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

×
×
  • Create New...