Jump to content

Free shipping showing when shouldn't be 1.5.0.17


Recommended Posts

Hi there,

 

I just upgraded my shop from 1.4.9 to 1.5.0 and have noticed that on the cart block it says "Free Shipping" where it used to say £0.00.

 

My products have a shipping cost once you check out (one shipping cost no matter what you buy).

 

Once you add a product in, it changes it to the correct shipping cost.

 

Anyone know how to turn this off so it says £0.00 again like it used to on 1.4.9?

 

Also, I have noticed that the "Shipping" and "Total" lines are misaligned with the actual values. So when you add a product in, the shipping line says a value and then below where it says Total, there's no value (so basically the naming of the titles are down 1 line so they don't match up).

 

Please see the attachment for what I mean.

 

Thanks,

Chris

post-280629-0-69315100-1347735800_thumb.jpg

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

Ajax-cart.js line 606

 

replace with :

 

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);
else
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

 

Please can you confirm what line to replace please....can u paste here the contents of line 606?

 

Thanks

Link to comment
Share on other sites

Ajax-cart.js line 606

 

replace with :

 

 

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)$('.ajax_cart_shipping_cost').html(freeShippingTranslation);else$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

 

 

 

Thanks for this, I made the change and this has now worked. It no longer shows "Free shipping".

 

The alignment is still out though for the total and shipping? Does anyone know why this is?

Link to comment
Share on other sites

I've been looking at the CSS and found the bits it relates to by the look of it:

 

 

#cart_block #cart_block_shipping_cost,

#cart_block #cart_block_total {

 

But I've tried adding various things in, such as width, margin etc but nothing has changed. I'm not great with coding, so not sure if I'm missing something?

Link to comment
Share on other sites

First go to shipping and make sure you have a carrier setup, once you set up a carrier go to "shipping" and adjust your charges for shipping cost under shipping and handling make sure you also adjust the free shipping numbers, i set mine at like 30,000 for when free shipping starts. then go to your products click edit and go to the shipping option and click on your carrier that will fix the problem when you go to the cart

  • Like 1
Link to comment
Share on other sites

First go to shipping and make sure you have a carrier setup, once you set up a carrier go to "shipping" and adjust your charges for shipping cost under shipping and handling make sure you also adjust the free shipping numbers, i set mine at like 30,000 for when free shipping starts. then go to your products click edit and go to the shipping option and click on your carrier that will fix the problem when you go to the cart

 

This did not work either. I already had all that setup but even tried doing it all over again and still says "Free Shipping!" in my cart blocks and on the check out page.

  • Like 1
Link to comment
Share on other sites

I have the same problem. It is REALLY a big problem since you don't want customers to think they are getting free shipping, go through checkout and then right at the end realise they are going to be charged $20.

 

Someone please give a solution to this. What's also interesting/annoying is my 'shipping estimation' module also says free shipping for everything, no matter what country I chose. I know my shipping is set up correctly since during the checkout process when putting in your address it correctly calculates the shipping fee. This is really annoying as my shop is currently unfit for customers in this state.

Link to comment
Share on other sites

Lachlan if you ADD the code after line 606 it works . No more free shipping if cart is empty.

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);
else
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

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

Thank you lucamax, this worked for me. At first it seemed like there was no change. But I went to Advanced Parameters > Performance, select Force Compile and Cache to X, Save, refreshed the website page and switched back to Never compile cache and Cache to enabled.

 

I use DreamWeaver to make my edits. I added the code after line 606 but I get this error message "There is a syntax error on line 607. Code hinting may not work until you fix this error." Is this ok or is there a fault in the code?

Link to comment
Share on other sites

......

Also, I have noticed that the "Shipping" and "Total" lines are misaligned with the actual values. So when you add a product in, the shipping line says a value and then below where it says Total, there's no value (so basically the naming of the titles are down 1 line so they don't match up).

 

Please see the attachment for what I mean.

 

Thanks,

Chris

For the misalignement you can solved in this way:

 

block to check begins at line 44 of /prestashop/css/modules/blockcart.css

one line to modify, one line to add

 

#cart_block p { clear: both }
#cart_block p span {
clear: left; /* ----modified before it was right ---- by lucamax */
float: left;
text-align: right
}
#cart_block li { clear: both }
#cart_block span.price {
clear: right; /* ----added ------ by lucamax */
color: white;
float: right

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

Hi Lucamax - Thanks for this, but I don't seem to have either:

 

 

#cart_block p { clear: both }

#cart_block p span {

 

#cart_block li { clear: both }

#cart_block span.price {

 

in my prestashop/css/modules/blockcart/blockcart.css file

 

On line 43 and 44 I have the following:

 

#cart_block .remove_link {

float:right;

Link to comment
Share on other sites

Thanks for the response lucamax, I'll try that and see what happens. One other thing; why do I need to apply a fix by editing some random code? I downloaded and installed the 'stable' release of 1.5. Now I find myself having to work through annoying problems like this. Surely everyone must be experiencing this 'free shipping' problem with 1.5?

  • Like 2
Link to comment
Share on other sites

All my settings are correct since when at the stage of checkout where the customer put's their address in it adds the shipping correctly. Despite this it still says 'Free Shipping!' in both the top right cart (on every page) and the full page cart. I am also having the same problem with the default shipping estimation module (it says the shipping is free to any country). I feel there may be a single source for both these errors? I am on a freshly installed 1.5 (not updated, complete fresh install). I would really appreciate it if someone new how to help make the shipping display properly in both these areas. Please help?

Link to comment
Share on other sites

Please see my site at: http://www.ringfraternity.com/shop/ You will then notice the issue I'm talking about regarding free shipping showing up until later on in the checkout. Is there an obvious solution/ reason for this problem? I really need to sort this out soon. Thanks very much for your help

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

@Lachlan

 

Hopefully not teaching Grandma to suck eggs, but your products do have a weight listed?, and the weight is not a borderline? By which I mean i find if you have a weight range for shipping as 0 - 0.25 kg, then if the product has a weight of 0 or 0.25 it can cause issues

 

Perhaps a way forward is to allow someone to have a look into your backoffice. You could set up a new admin and PM the details if you wish

Link to comment
Share on other sites

Thanks for all the responses guys! lucamax - no, they both have 'free shipping' disabled.

 

Haylau, thanks for the comment, yes my weights have been set up correctly. The most confusing thing is that once going through the checkout the shipping is updated properly, it is only when initially adding products to the cart that I have this problem...

  • Like 1
Link to comment
Share on other sites

Lachlan, is the shipping carrier you are using the one that came pre-loaded with Prestashop? Meaning is it one of the "dummy" shipping carriers but you just modified it? I had this same issue so I deleted all my shipping carriers so that I had nothing in there. I then added my shipping carrier again, made my weight and price ranges, and voila the "Free Shipping" issue went away.

 

That's how I fixed my issue with free shipping so you might want to give it a try.

 

-Alex

  • Like 1
Link to comment
Share on other sites

Thank lucamax.

I can say that a carrier is available. I checked it.

I must be more precise in discribing the trouble. Here it is:

I want to propose free shipping for anybody when the cart minimum amount is 150 euros.

So I made the following cart rule condition

 

free-shippig-issue1.jpg

 

free-shippig-issue2.jpg

 

free-shippig-issue3.jpg

 

When I test the feature with a cart over 150 euros the cart panel does its job

 

free-shippig-issue4.jpg

 

But when the customer accesses the check out area the shopping cart summeries shows

 

free-shippig-issue5.jpg

 

I applies shipping costs. More it says "Remaining amount to be added to your cart to get free shipping : 1 euro" !!!!! damned !

 

So I changed the shipping rules to

 

free-shippig-issue55.jpg

 

That's better but... still "Remaining amount to be added to your cart to get free shipping : 1 euro" there

 

free-shippig-issue6.jpg

 

 

Any idea ?

 

Best

Link to comment
Share on other sites

I think I have found the problem (seems to be a bug)

 

Default carrier is "International Austraila Post" but you will see Austraila Express Post in the first checkout step. The charge is 0 dollars.

 

The bug is that you can't choose default carrier for the cart. I have set the charge to 3000 dollar so you can see where I have changed.

 

You should report this to the Bug Tracker. This is a real bug and a bit irritating for the customer if the charge is free and then something else.

post-304773-0-80945900-1349368311_thumb.png

post-304773-0-38959700-1349368321_thumb.png

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

Thanks very much peranders. What I find most strange is why don't other people have this problem? Also, if I delete the other cart it should become the default right? I will try this again but from memory it didn't help.

 

I just noticed that 1.5.1 is out so I'll update my version and REALLY HOPE that it solves all my problems:) I'll let you know. Thanks again guys, I really do appreciate your help!

Link to comment
Share on other sites

Thank lucamax.

I can say that a carrier is available. I checked it.

I must be more precise in discribing the trouble. Here it is:

I want to propose free shipping for anybody when the cart minimum amount is 150 euros.

So I made the following cart rule condition

 

 

 

 

 

 

 

When I test the feature with a cart over 150 euros the cart panel does its job

 

 

 

But when the customer accesses the check out area the shopping cart summeries shows

 

 

 

I applies shipping costs. More it says "Remaining amount to be added to your cart to get free shipping : 1 euro" !!!!! damned !

 

So I changed the shipping rules to

 

 

 

That's better but... still "Remaining amount to be added to your cart to get free shipping : 1 euro" there

 

free-shippig-issue6.jpg

 

 

Any idea ?

 

Best

 

Could somebody help me with my issue ? Could you only tell me is you experienced the same problem ?

Link to comment
Share on other sites

I've upgraded to 1.5.1 and am still having this problem. I did a fresh install of 1.5.1 and have only 1 carrier, with differing shipping costs depending on the weight.

 

Even though in the back office the only carrier has fees, it still says 'free shipping!' when a product is added to the cart. WHAT IS WRONG HERE? This is incredibly frustrating as shipping calculation is a fundamental thing that MUST be correct for an e-cart.

 

I am very confused as to why I am still having this problem and have wasted a great deal of time trying to sort this out. I'm almost at the point of choosing a different e-commerce solution, though I would like to stay with prestashop since I see the potential.

  • Like 1
Link to comment
Share on other sites

I had the same problem.

 

In shopping-cart.tpl on line 163 it has this:

 

<tr class="cart_free_shipping" {if $free_ship <= 0 || $isVirtualCart} style="display:none;" {/if}>
 <td colspan="6" style="white-space:normal;">{l s='Remaining amount to be added to your cart in order to obtain free shipping:'}</td>
 <td id="free_shipping" class="price"><span class="price">{displayPrice price=$free_ship}</span></td>
   </tr>

 

I'm not sure why it's not working but I don't want it anyway so just commented it out.

Link to comment
Share on other sites

Lachlan if you ADD the code after line 606 it works . No more free shipping if cart is empty.

if (parseFloat(jsonData.shippingCostFloat) == 0 &amp;&amp; parseInt(jsonData.nbTotalProducts) > 0)
$(&#39;.ajax_cart_shipping_cost&#39;).html(freeShippingTranslation);
else
$(&#39;.ajax_cart_shipping_cost&#39;).text(jsonData.shippingCost);

 

I think the amps are getting in the way. It should be

 

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);
else
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

Link to comment
Share on other sites

upgraded to prestashop 1.5.1 and now my carrier displays all free shipping instead of the proper shipping cost indicated by the ups carrier. Free shipping is also showing up when there should be none. Anyone know why this is happening or know a work around to fix this thanks?

Link to comment
Share on other sites

I am very frustrated with this problem. I have to fiddle around and try to cater for these glitches so that it looks ok from the front office. This is ridiculous. When I set up the pricing for shipping and the item's weights.etc correctly in the back office I should be comfortable that this will be reflected correctly in the front office, though this is NOT THE CASE.

 

What's most confusing is others must not have this problem (in 1.5.1), otherwise there would need to be an immediate fix. Is it possible to have a developer look at my back office to sort this out once and for all?

  • Like 1
Link to comment
Share on other sites

Hi,

 

I'm not very sure of what the issue you facing but i will try to help. Below describe what i found out.

 

1. I am having this free shipping issue as well. It simply shows free shipping in cart when there is no product.

2. i add a product but cart still show free shipping

3. i go to BO and put Free shipping starts at 25. (well my sale items dont cost more than 4 bucks)

4. i try to add a product BUT still shows free shipping (Frustrated)

5. i delete ALL carriers i had previously and re created 3 carriers mainly self pick up(free shipping), normal mail(free shipping) and registered mail(cost 2.50)

6 i set registered mail shipping cost at 2.5 in BO under "Fees by carrier, geographical zone, and ranges"

7. set registered mail as default (since they will need to pay unless they choose self pick or normal when they got to choose shipping method page.

8. this time round, i try to add a product.

9. cart show shipping $2.50 fee immediately in cart as well as

10. i started adding product quantity in shopping cart summary page and until quantity 7 (4X7=28), which is more than the "free shipping at 25" rule, shipping change to free.

 

So i think its the default shipping carrier you are choosing that dies the trick.

 

Hope you understand what im saying and i sort of help to solve your problem

Link to comment
Share on other sites

Hi,

 

I'm not very sure of what the issue you facing but i will try to help. Below describe what i found out.

 

1. I am having this free shipping issue as well. It simply shows free shipping in cart when there is no product.

2. i add a product but cart still show free shipping

3. i go to BO and put Free shipping starts at 25. (well my sale items dont cost more than 4 bucks)

4. i try to add a product BUT still shows free shipping (Frustrated)

5. i delete ALL carriers i had previously and re created 3 carriers mainly self pick up(free shipping), normal mail(free shipping) and registered mail(cost 2.50)

6 i set registered mail shipping cost at 2.5 in BO under "Fees by carrier, geographical zone, and ranges"

7. set registered mail as default (since they will need to pay unless they choose self pick or normal when they got to choose shipping method page.

8. this time round, i try to add a product.

9. cart show shipping $2.50 fee immediately in cart as well as

10. i started adding product quantity in shopping cart summary page and until quantity 7 (4X7=28), which is more than the "free shipping at 25" rule, shipping change to free.

 

So i think its the default shipping carrier you are choosing that dies the trick.

 

Hope you understand what im saying and i sort of help to solve your problem

 

I've done what you write. but the free shipping still appear. In fact, I have already bought the module delivery, but it still does not solve the problem (really frustrated)

Link to comment
Share on other sites

I noticed something interesting that may help us solve this problem. I live in Australia and have set the shop up with 2 carriers. One is for Australia only; free shipping. The other is for the rest of the world (everywhere BUT Australia), that calculates the shipping depending on the country. Even though I chose the international shipping as the default carrier, it seems to default to the Australian carrier (since the international carrier doesn't cater for Aus). Hence, it will say free shipping unless you log in and specify your country.

 

So it seems the problem here lies in prestashop's programming; regardless of what the actual default carrier is, it will revert to the carrier that is for the country the shop has been established in. As shown by my example, this is a huge problem since it is assuming that all visitors are from Australia (ridiculous), and those from overseas will get a nasty surprise during checkout when the shipping changes from 'free shipping!' to whatever it actually is. I think prestashop could have a smart, simple solution to this by asking the customer to input their country in before even attempting to calculate the shipping; initially for the shipping price it could say 'please specify your country' instead of giving a price.

 

The shipping estimation module is rubbish; I've used it on the last few versions at it hasn't once given anything other than 'free shipping'.

Link to comment
Share on other sites

Ok, this thread seems to be a tangled mess with a number of different issues.

 

Perhaps this will help (or not)

 

Firstly though @Lachlan: I thought we sorted your problem? As far as I can tell it now works correctly

 

1) If your shopping cart is displaying "Free Shipping" and then when you add something to your shopping cart is shows some value, then there is likely nothing substantially wrong. You may not like the wrods "free shipping" but it is there by design. You may or may not like that. If you just want to remove the "Free Shipping" before anything is added, then use Lucamax fix in post number #48. This is NOT an error it is how it is designed. I have used that code and it now displays shipping as "0" until something is added to the cart

 

2) If you have installed or bought a module to modify shipping somehow (even using the inbuilt modules for FedEx or UPS etc) then I would suggest that is a separate issue with that module: speak to the developers or start a new thread specifically about the module you are using

 

3) Shipping estimation This has always been a very flawed module as far as I am concerned I have never got it to work satisfactorily. Disable it and move on

 

4) Logic. Most of the rest of the problem is simply logic. Lachlan, if you don't mind I will use yours problem as an example. You have to think through the logic of the issue. Whenever a visitor comes to your site, the shop does not know where they are from. So the shop will display the shipping costs for the default country until the user logs in and the shop can then know where they are from. So, Lachlans store is in Australia. He had free shipping for Australian customers. When I, in the UK visit his shop it looks to me as though i will get free shipping: until I log in. This is just the way it is. It would be extremely difficult to make it any other way. For our store I used translattions to change "shipping" to "Shipping Estimate". We do get a number of overseas customers looking to buy, then when they log in the disappear because the costs are higher: but there is NO way around this I am afraid: unless the shipping estimation tool was perfect - but it just is not. And frankly if i am looking to buy something from Australis and I REALLY thought I was getting free shipping on an item worth £10 then I would need my head looking

 

5) There may well be other issues around this "Free Shipping", but as far as I can see most will fall into one of these brackets

 

And finally, there is absolutely no point in blaming the developers. This is essentially a FREE system designed to be flexible. Making it suit your specific needs can be hard work, but should not be assumed that it can be adjusted to suit your specific requirements

Link to comment
Share on other sites

Hey Haylau, thanks for the response.

 

I'm not having a go at the developers. My point is this is a flaw in prestashop; customers SHOULD NOT have to use logic to rectify this problem, there should be no misguidance in the first place. It's great the developers are working on new modules to track different stats, make things pretty and so on, but shipping, and its transparency to customers is an ESSENTIAL part of an online store. Therefore it should be of paramount importance to have this fixed, and should rank higher in priority than other fixes.

 

I understand it is a free program; but I am also aware it is constantly growing and developing; this is one area I believe it can be improved.

 

Thanks everyone for your help; I am now quite confident I have set things up properly; it is just the software itself results in the confusing problems. I will just have to try and manage with the imperfections and wait until an update hopefully fixes them.

Link to comment
Share on other sites

Lachaln, I was not saying you were blaming developers, that was general comment, and I think we were both typing at the same time. It was not aimed at anyone in particular

 

What I was trying to put across is that it is next to impossible for a system to work out true shipping for everyone all over the world. There is no reliable way of knowing where people are on their computer at the time they go to your site.

 

It depends on who your ISP is, what systems they have in place, whether you are mobile or not. It really is next to imposiible to do

 

I would agree that getting the shipping estimator to work would be hugely beneficial, but it doesn't:(

Link to comment
Share on other sites

Hey redshop/anyone else having the same problem I was having. I just came up with a very elegant solution!

 

Simply change the 'translation' of your language for text for 'Free Shipping' for both the front office and the cart module 'blockcart'.

 

The problem here is the shipping initially assumes the customer is from whatever country your store is situated in. For me that is Australia. I offer free shipping within Australia. The problem for me was this was resulting in everyone seeing 'Free Shipping!' before logging in. Of course, I didn't want people from overseas to think they were getting free shipping, and then once signing in and getting to the checkout realising they had to cough up for shipping.

 

My solution was to change the translation (in English of 'Free Shipping!' to 'Free shipping in Aus!'. That way it's really saying the same thing, but it is clear this only applies to Australia, and the real shipping price can be seen when customers sign in.

 

I love how easy this solution is to apply (simply change the translation in the back office), and it solves the problem completely without fiddling around with code.etc

 

Hope this helps!

  • Like 1
Link to comment
Share on other sites

Thank you, it works.

 

This is how it should look. (first line is line 606):

 

 


this.nb_total_products = jsonData.nbTotalProducts;

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);
else
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

Link to comment
Share on other sites

This seems to be a problem with the old default theme on the latest version of Prestashop.

 

I've fixed the misalignment by commenting out the float in /themes/yourtheme/css/modules/blockcart/blockcart.css as follows (line 48 in my case)

 

#cart_block a.ajax_cart_block_remove_link:hover { text-decoration: none }
#cart_block p { clear: both }
#cart_block p span {
clear: right;
/* float: left; */
text-align: right
}

 

and I changed the language variable for 'Free shipping!' to 'Free Pick Up' (the store offers this) in Module: blockcart by choosing Localisation > Translations and 'Installed module translations' > 'default' > US flag and scrolling to the end.

 

The above may or may not work depending on your setup.

  • Like 1
Link to comment
Share on other sites

I am running version 1.5.2.0 and have tried everything listed above. I either get free shipping as a guest or $0.00 as a guest. If you then click straight on paypal it will not charge for any shipping. This needs to be resolved!

Link to comment
Share on other sites

Holy crap batman the insane are running the asylum again!

 

Hmmm...this is the 3rd bug of this severity we've found in the last 2 weeks, it's costing us sales and/or customers, and the only way a software team releases bugs like this into production and calls it stable is if 1) there is no regression test suite; or 2) if there's an ulterior motive; or maybe both? For us it looks like the best option is to fork, fix the webservice call(s), and never upgrade (at least not until we have a full staging system for upgrades and our regression suite). I can understand that Presta needs to make money but this is out in left field...I've never experienced anything like this product in ~30 years of programming and using OSS my whole life.

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

Also it seems to me...it would be a better OSS business strategy to release stable software, which is truly stable, and not nicknamed "stable" while being unstable, and is also not unstable when published as stable. Therefore somebody like me thinks it's stable. That means everybody else on this thread thinks it's stable. Then somebody like me is inclined to purchase a full featured module from Prestashop because I'm already confident they make stable software, or purchase support because I reckon the process is robust. Just sayin'...

Link to comment
Share on other sites

I have the same issue with PS version 1.5.1.

Whatever I add to the blockcart, it always shows "Shipping: 0,00€".

 

Then, when I get into "checkout", the shipping charges are not there. It shows the taxes, the totals, but no trace of the shipping costs.

 

I'm using a old theme that worked well with PS 1.4.8, but have tried to install the default 1.5 theme, for testing, and have the same problem.

Link to comment
Share on other sites

Hi There,

 

Prestashop version: 1.5.2.0

I was able to fix this by going into the

Shipping->Carriers-> edit your default carier

 

Select the correct zone: Oceania (for me)

 

Apply shipping cost:

(X) enabled.gif ( ) disabled.gif

Apply both regular shipping cost and product-specific additional shipping costs

 

Shipping & handling:

(X) enabled.gif ( ) disabled.gif

Include the shipping & handling costs in carrier price

 

Billing:

( ) Default behavior

( ) According to total price

(X) According to total weight

 

 

This fixed it for me

Edited by it-solutions (see edit history)
Link to comment
Share on other sites

Partially Solved!

 

I have both issues with my 1.5.2. ie: misaligned values and free shipping text! I solved the free shipping text as follows:

 

I have both free and paid shipping and the free shipping option is for those who live in a specific country HOWEVER I had the groups VISITOR and GUEST turned on so a user without logging in was receiving Free Shipping. When set to default, users must be logged in and so once logged in they will see the free shipping. But this only solved the issue for the non logged in users.

 

What I did next was to put the POSITION of the free shipping to the very bottom so Presta can choose the paid option first. This actually solved the issue without having to modify the code.

 

What is still not solved is the misaligned values which are very misleading.

 

Cheers

Link to comment
Share on other sites

Yes this is a bug so chide me for not entering it into the tracker. No, there are no logs, and I might add - there have been 0, zilch, logging of the errors I've encountered. All of those bugs have been show-stoppers for us, such as broken GCheckout, or broken State dropdown in IE9, which are still broken for us BTW. I digress...

 

First, we had a default shipping method that was out-of-range for several items. That caused the default shipping method for the group to be chosen. I dug into the DB query being executed in CartCore and found a JOIN clause that looks out-of-sorts. By reading the code I also found, like @xenobius says, that users were getting free shipping due to the guest group -- or I forget exactly which user group. Basically the code acts so that: if the default shipping method is out of range then it takes the cheapest method based on user group. I think cheapest method selection is also configurable but would have to pull the code up again...

 

The patch I have is tested locally and LIVE. However, looking at the patch now (a week-or-so later) - it looks valid but I don't think that addressed the issue...I think it led me to discover what @xenobius says.

 

The patch asserts that the product_shop JOIN should include a clause to filter on the product records, and not join on all product_shop records based only on shop_id. There's another block in CartCore with a TODO for code review -- and that block looks partially broken too. Too many bugs here, move along children! What's going on @Presta? We've forked and only looking back for occasional merges. Methinks the PO's @Presta should get back on the core-QC train.

 

Here's the patch:

 

diff --git a/dev/www/classes/Cart.php b/dev/www/classes/Cart.php

index 019b5cb..b1d932e 100644

--- a/dev/www/classes/Cart.php

+++ b/dev/www/classes/Cart.php

[spam-filter] -443,7 +443,7 [spam-filter] class CartCore extends ObjectModel

 

// Build JOIN

$sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`');

- $sql->innerJoin('product_shop', 'product_shop', 'product_shop.id_shop='.$id_shop);

+ $sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_product=cp.`id_product` AND product_shop.id_shop='.(int)$id_shop.')');

$sql->leftJoin('product_lang', 'pl', '

p.`id_product` = pl.`id_product`

AND pl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('pl', $id_shop)

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

Hi. I know this has been a long-running problem that some people have now fixed, but could anyone help me?

 

I only ship to the UK and offer no free shipping. When a customer places and item in their cart it automatically states 'free shipping' and this happens on the next page (the bigger cart). It then reverts to the actual shipping costs when someone has logged in.

 

Although it's correct in the end, it looks really bad and like I'm 'baiting' customers with free shipping until I've got them signed in and tell them I'm charging them.

 

Any suggestions greatly appreciated, thank you.

 

I'm using 1.5.1.

Link to comment
Share on other sites

Hi mates...

 

I've been subscribed to this thread and have tried every solutions submitted by the other members, except of the TWFree solution.

 

Before that post, I tried also to update to 1.5.2 version, but the issue continued.

 

Then I was thinking that it wouldn't be a bug problem, because in that case, the whole community would have suffered that issue, and probably they'd have a patch in just a few days. Imagine the entire Prestashop community with such a bug like that....

 

In that momento I decided to install another testing shop in localhost, with the default example products (ipods, etc), and compare both backoffices in matter of shipments and carriers options. Now I have solved the issue. As you can imagine, my problem has been a bad configuration in the backoffice. When I actived again the "Europe" zone (my shop is based in Spain), and assigned shipping rates to that zone, the cart started to show the shipping cost.

 

It seems that when you aren't logged yet, the cart is showing you the shipping cost based in your continent, I think.

 

Now I have 4 zones:

- Europe

- Spain zone1

- Spain zone2

- Spain zone3

 

The shipping charges are configured for each one of the 4 zones, although I set the two first with same charges.

 

I have 1 country active (Spain) and have created 50 states (one for each province).

 

As I have said before, I had a misconfiguration problem, only solved when I enabled the "Europe" and copied the shipping costs inside it.

Link to comment
Share on other sites

Hi,

 

I am still desperately trying to find a solution to this.

 

I only have one zone enabled - UK, with no free shipping offered and yet 'free shipping' still comes up in the cart when a user is not logged in.

 

Could any clever person out there tell me where I can comment out the code that offers free shipping on the cart? At this stage, if I can't actually apply the shipping I want, I'd happily leave the line blank instead until my user has logged in, thanks.

Link to comment
Share on other sites

Hi,

 

Further to the above post, I thought it might be helpful to post these screen shots of my settings, and of the cart on my site offering free shipping, in case anyone sees an obvious problem. NB: for the 'free shipping starts at' field. I have read conflicting advice about this and have tried it on 0 and also on 100000, but it changes nothing.

 

Thanks - would really appreciate any suggestions you may have.

post-417580-0-63860000-1352546354_thumb.jpg

post-417580-0-21843700-1352546355_thumb.jpg

post-417580-0-86108500-1352546355_thumb.jpg

post-417580-0-47721300-1352546356_thumb.jpg

post-417580-0-13802200-1352546357_thumb.jpg

post-417580-0-69890700-1352546357_thumb.jpg

Link to comment
Share on other sites

Hi,

 

Further to the above post, I thought it might be helpful to post these screen shots of my settings, and of the cart on my site offering free shipping, in case anyone sees an obvious problem. NB: for the 'free shipping starts at' field. I have read conflicting advice about this and have tried it on 0 and also on 100000, but it changes nothing.

 

Thanks - would really appreciate any suggestions you may have.

 

If you look back through this thread, it tells you the code

 

What is the URL of the site so we can check?

Link to comment
Share on other sites

Hi. It's www.littlegeniuscrafts.com/shop

 

I've now done a temporary fix and changed the wording in translations from 'free shipping' to 'log in for prices' (after Lachlan's suggestion) but I'd rather it was done properly.

 

Sorry, not definite what code you mean. Some of the solutions seem to refer to people's zoning issues, so wasn't sure if it was applicable to me.

 

Many thanks for the reply, much appreciated.

Link to comment
Share on other sites

Hi. It's www.littlegeniuscrafts.com/shop

 

I've now done a temporary fix and changed the wording in translations from 'free shipping' to 'log in for prices' (after Lachlan's suggestion) but I'd rather it was done properly.

 

Sorry, not definite what code you mean. Some of the solutions seem to refer to people's zoning issues, so wasn't sure if it was applicable to me.

 

Many thanks for the reply, much appreciated.

 

Check my post #57 it tells you which code (post #48 it think)

 

Nice looking site, and yes it does seem to have that probkem

 

I wonder if there may be an issue with your zones, UK Only

 

Did you create that zone or rename it? Chekc that all your carriers do link to that. If you renamed / created it after creating the carriers then it may be that things are not carrying through correctly

Link to comment
Share on other sites

@ramfeirda confirms the problem is in 1.5.2. Also @ramfeirda is right - this is a config problem - it might be called an insidious one.

 

The cart is trying to use the default shipping method for the shop. Therefore this problem happens when the default shipping method for the shop is out of range for the user. The cart falls back to the lowest-cost method of shipping for that user. Reminder: users are always part of groups. The cart wants to display the cheapest method of shipping. If any user group has free shipping - voila - the user sees free shipping in their cart.

 

Thus, to trigger the problem all you need is the default shipping method for the store to be out of range for the user's current order (reminder: users are always in a user-group); and have a user group with free shipping applied. We're not merging 1.5.2 code right now. We're staying on a frozen codebase for the time-being and will selectively merge updates from a stable branch.

 

As for zones I'm not sure exactly how that plays in - we have one zone (USA), with no free shipping applied to any user group; and no free shipping applied to any zone.

 

The SQL patch above is for 1.5.0.17. Since the problem is confirmed on 1.5.2 the patch is still valid, though line numbers probably changed.

 

This is how I fixed it on our shop:

- Made sure the default shipping method for the shop will be in-range for most or all of the orders we expect on the shop.

- Make sure no user groups have free shipping applied. This is in the group's (edit) settings.

- Make sure all shipping methods have price ranges applied to them.

- Like @ramfeirda says - the patch is optional. I'll defend the patch though -- that join should be there and it's an improvement to the production code. The original query should not only be pulling all records from product_shop filtered only on shop_id, the join should also be filtered on product_id.

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

Disagree with some: this is a bug -- and my patch doesn't address it (only makes an improvement). First, let's understand and agree that customers who haven't registered could be related to more than one user group - depending on how the shop is configured.

 

It follows then: if the default shipping method for the store is out-of-range for the items a customer has chosen; then the cart shouldn't choose the lowest price method based on group membership. The cart should display the price of the cheapest carrier which is in-range (according to weight in our store) for the customer's order.

 

As for applying free shipping to a user group: if a user is a member of a group with free shipping - it's free shipping for them! Plain and simple. Since the user's group membership is stored in the session (web session) there shouldn't be a need for additional queries to make the implementation work as just described. If the user's group has free shipping - we shouldn't need to execute the query I patched. If the user is in a group that gets free shipping but somehow they live in a zone that we don't ship to, or costs us $$$ to ship to, or some other outlier edge-case, then handle that problem(s) separately.

Link to comment
Share on other sites

Many thanks everyone.

 

Faced with the shipping issue and then also a Paypal encryption issue I decided last night to cut my losses and completely deleted my page and Prestashop. I re-installed (and re-designed a basic theme in Presta-maker) and began from scratch.

 

What I noticed was that in my old shop, I had somehow produced two separate countries that each said 'UK' and had also produced a separate zone, that purely said 'UK'.

 

When I started again, I didn't duplicate the UK country, but ticked that option and for zone I ticked Europe. Although I only want to post to the UK, so I also made sure no other countries apart from the UK were enabled.

 

That seemed to do the trick, the correct postage appears whether or not a user is logged in and also my Paypal is now working (not sure if that was a re-install, or version 1.5.2 working better, or the zoning issue affecting that.)

 

Anyway, am now happy with a working shop and can get on with selling!

 

Thanks again for all the help.

Link to comment
Share on other sites

  • 4 weeks later...

I'm experiencing the same issue, "Free Shipping" for users who are not logged in/do not have an address set. I wanted to voice my agreement and also am wondering if there has been a bug report submitted for this yet?

 

I'm using Prestashop 1.5.2 and to work around this issue I have set the "Free Shipping!" translations in the Front Office and the "Free shipping!" translation in the modules to "0.00". I do not offer free shipping so this will work for me in the short-term. If I ever decide to want to offer Free Shipping then I'd prefer a real solution.

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

  • 4 weeks later...

I'm very new using PS, just over a week. But, from my time fussing with the free USPS module I can tell its making duplicate carriers and messing up the ranges. It goes to free shipping when it can't choose a carrier. When you just set up a carrier without the module it all works fine, add the free USPS module etc. and the db gets confused and defaults to the free shipping text. Changing the text solves nothing if the cart is still confused.

 

When I went in and cleaned the db duplicate files and junk, it started working but, still doubled the carriers using the module straight up. It automatically forces more carriers to be created even if you don't want them. So, after 4 tries to get working I gave up. It can be tweaked, but for some reason it was not stable for me, still had carrier issues. You could delete the carrier in the BO yet, the files remained on the data base. If you install and remove, the carriers remain on the db. Thats why the carrier number keeps climbing or starts a 50 or something, the 1-49 carriers that you deleted did not...

 

I got rid of the free module and bought one. Cleaned out the db once again before the new module was installed. The paid for module works with no carrier issues and it has international built in. I only ship USPS, I can only imagine the troubles using multiple modules for this. I'm working with the latest 1.5. I'm tying to keep a positive attitude since the BO is great. Just got to get through the learning curve.

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

I think the amps are getting in the way. It should be

 

if (parseFloat(jsonData.shippingCostFloat) == 0 && parseInt(jsonData.nbTotalProducts) > 0)
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);
else
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);

 

 

 

Hi,

How do I do this please? Where do I need to go to edit this file? I using 1.5

Link to comment
Share on other sites

Why are we being forced to edit these scripts....Seems this problem has appeared on multiple versions. Time for the Devs to fix this by creating a switch or toggle as an option. :wacko:

 

This product has great potential....but you are forcing me to use other software

Link to comment
Share on other sites

×
×
  • Create New...