Jump to content

Local Free Shipping needed


Recommended Posts

Hi

 

I've started this topic to hopefully find a way to set up local "Free shipping" in my country, even through I can't allow "Free Shipping" to other countries! The #Free Shipping" is based on a total of the products price but where the shipping costs upto that total price is base on a weight range, but please note, shipping to other countries (in my case) are also base on weight but without Free Shipping.

 

I've talked to Prasespot and included his suggestions as well as my details for anyone to join in and help...

 

Basicaly, in Sweden I have two carriers Posten and DHL where the shipping is based on weight (with weight ranges), in a zone called "Europe(Sweden)", billing is set to weight and uses the normal "Default" group, also after a total product price of 800kr, they're set to give "Free shipping" in the Shipping tab and this works perfectly! Unfortuantly though if someone logs in from Norway or Denmark they get free shipping too! :mellow:

 

So what I'm hoping to do, someway, is prevent anybody outside of Sweden geting free shipping.

 

More specifially my data is:

 

Active Zones are:

 

1. Europe .... All Normal EU countries (except Sweden)

2. Europe (out E.U) .... Norway, Switzerland

3. Europe (Sweden) ... Sweden

 

 

Shipping (carriers) all based on weight:

 

1. Posten .... zone Europe(Sweden), uses "default" and "Wholesale" group, Billing: total weight, Behaviour: disable carrier

2. DHL ..... zone Europe(Sweden), uses "default" and "Wholesale" group, Billing: total weight, Behaviour: disable carrier

3. Brev Europa.... zone Europe and Europe (Out E.U), uses "default" and "Wholesale" group, Billing: total weight, Behaviour: disable carrier

4. Paket Europa.... zone Europe and Europe (Out E.U), uses "default" and "Wholesale" group, Billing: total weight, Behaviour: disable carrier

 

 

Groups:

 

1. Default

2. Wholesale

 

 

Phrasespots Answer was ....

 

Starting from above configuration, create two additional carriers.

 

1- Disable free shipping setting under Shipping tab. Free shipping will be governed by the new carriers.

 

2- Create a carrier: 'Posten free shipping',

a) Zone = 'Europe (sweden)' only

B) Customer group access = 'Default', and/or 'Wholesale'

c) Billing = 'According to total price'

d) Out-of-range behaviour = 'Disable'.

 

3- Create another carrier: 'DHL free shipping'

a) Zone = 'Europe (sweden)' only

B) Customer group access = 'Default', and/or 'Wholesale'

c) Billing = 'According to total price'

d) Out-of-range behaviour = 'Disable'.

 

4- Create a price range 800kr-100000kr for each of those carriers. I realise you normally ship by weight but for free shipping cart weight does not matter, so we are using the price range to disable the carrier below 800kr.

 

5- Under shipping tab, 'Fees by carrier, geographical zone, and ranges' set the price for those carriers to zero.

 

Now these two carriers will only be available to customers from 'Europe (sweden)' zone, who are in group 'Default' and/or 'Wholesale', when their cart total reaches 800kr, as well as any other carriers you have for that zone and group at their normal prices.

 

 

Myself, After trying...

It seems to work generally but to start with, I'm left with 3 carries presented to the customer in the Cart (see attached file), where I really, after the 800kr as passed for "Free Shipping" need only one (this will really confuse some customers) and there seems to be a discrepency in the actual cart block's freight, when going through as a non-local customer (it seems to show a local customers freight before "Free Freight" which is much less than for a non-local customer)

 

Any ideas, Any help :)

 

DavidC

Link to comment
Share on other sites

It seems to work generally but to start with, I'm left with 3 carries presented to the customer in the Cart (see attached file)

Cant see an attachment but yeah as I said

Now [free] carriers will be available... as well as any other carriers you have for that zone and group at their normal prices.

 

I really, after the 800kr as passed for "Free Shipping" need only one (this will really confuse some customers)

Removing price displaying carriers when the free carrier is displayed is slightly involved. It needs modification to core files, so seek for professional help. But I disagree (not entirely) that it may be confusing if one sees 3 differently named carriers available, one, say 50kr and another free. Web shopping population is savvy and became accostumed to seeing a different checkout process/form at every website.

 

and there seems to be a discrepency in the actual cart block's freight, when going through as a non-local customer (it seems to show a local customers freight before "Free Freight" which is much less than for a non-local customer)

Order of the carriers are governed by carrier id (i.e. carrier creation order). Delete and recrate the non-free carriers again (or just editing a field will suffice too) to display them after the free carriers. Displaying local customers' freight to non-local customers is normal behavour if the visitor is not logged in. Until login the default carrier is displayed as it is not possible to determine where a visitor is from and which carriers apply to that location.

Link to comment
Share on other sites

Web shopping population is savvy and became accostumed to seeing a different checkout process/form at every website.

 

Ohh I wish that was so true ... We've got a pretty high age group amongst our customers,.. you should hear some of the things my [spam-filter] has to "walk our customers through" somtimes, on the phone, even though our present site is considered very user friendly! I do though see your point and I agree its becoming more and more true as time goes by :)

 

Ok, that leaves the present options as:

1. I can accept it as it is (above), maybe fidle around with the presentation of things.

2. Get proffetional help or take time to do it myself (will take time also), which might invole several core file alterations (which i'm not keen on)

3. Look again at the "Retrospect" module and ask if anything can be still done anyway there, by adding and creating a group for Europe (all countries except sweden) and tieing it to a rule or two.

4. Go back to my original solution of using an conditional check in the code of classes/cart.php to stop "Free Shipping" being allowed, if it's not the shop's default country (in my case Sweden). This worked perfectly in the Cart, with the carriers and even the payment modules but fell short in the BO/orders where "Free Shipping" wasn't drawn of for Sweden, as it should have been! I therefore need to find, in this case, a second piece of code concerning orders that need a simular conditional statment added. If I'm lucky then only two core files will be the afected. (Does anybody know where such a conditional statement could be added in the BO/orders files for shipping to be correct when the "Free Shipping" value is reached?). Below is an example of the code in classes/cart.php that I have used so far but falls short in BO/orders:

 

about line 1120:

 

if (isset($configuration['PS_SHIPPING_FREE_PRICE']))

$free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency)));

$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);

if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0 AND $id_zone == (int)$defaultCountry->id_zone )

return $shipping_cost;

if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0 AND $id_zone == (int)$defaultCountry->id_zone)

return $shipping_cost;

 

Comment, ideas still most welcome.

 

David C

Link to comment
Share on other sites

3. Look again at the "Retrospect" module and ask if anything can be still done anyway there, by adding and creating a group for Europe (all countries except sweden) and tieing it to a rule or two.

4. Go back to my original solution of using an conditional check in the code of classes/cart.php to stop "Free Shipping" being allowed, if it's not the shop's default country (in my case Sweden)

 

With the setup described, free shipping should not be availabe to any customer outside Sweden and only availabe to Swedish customers when the order is above 800kr. Is this not the case? Give me an address where I can see the shop.

Link to comment
Share on other sites

Hi Phrasespot

 

Yes it works so but (as I mentioned before):

1. I don't like the idea of 3 carriers being shown, available to a Swedish customer when they get free shipping! One of the three, that is still there, is the local carriers cost without free shipping, it looks a bit stupid and I feel an unnecessary point of confusion for unexperianced (older) customers, that we have a lot of.

 

2. The choice of carrier (even with "Free Shipping") still has to be worked out by weight and the correct carrier be presented to the customer but now both alternatives (carriers) are shown to the customer allowing them to choose! That choice should be made by the shop and then only one carrier presented to the customer. That carrier then shows the customer that it is "Free Shipping" (0kr) anyway but in its also informs (by just being shown) which carrier will be used for thier order.

 

Shall i PM you with a link to the test site, or have you an static IP i can put in the BO

 

David C

Link to comment
Share on other sites

OK, try the attached file. Drop it into /override/controllers/ directory. It should work but I did not test it as it is very specific to your installation. If it does not work, at least it will give you an idea. What it does is, after carriers are assigned, removes carriers using weight range if the conditions are right. That should leave the free carriers only (since free carrier uses a price range).

 

Let me know when you get it so I can remove the attachment. Remember to delete the test account I created in the shop and remove my IP from the allowed IPs list.

Link to comment
Share on other sites

Thanks for the file...
You're welcome. This file will hopefully solve the first point you raised on your pervious post. About the second point:

 

2. The choice of carrier (even with "Free Shipping") still has to be worked out by weight and the correct carrier be presented to the customer but now both alternatives (carriers) are shown to the customer allowing them to choose! That choice should be made by the shop and then only one carrier presented to the customer. That carrier then shows the customer that it is "Free Shipping" (0kr) anyway but in its also informs (by just being shown) which carrier will be used for thier order.

 

We cannot use weight ranges for the free carrier because we use price range to disable the carier below 800kr. Does it really matter whether the free shipping is worked out by weight or price from the customer's point of view? Free shipping is free shipping as far as customer is concerned. Show them free shipping and ship with whichever carrier you want; DHL or Posten.

 

I would say delete the one of the free shipping carriers and rename the remaining one to just say 'FREE SHIPPING' without specifying a carrier and then use the carrier you prefer on a per order basis. Then only one carrier will be presented to the customer when the cart is over 800kr. and that choice of free carier will have been made by the shop (albeit manually during shipment).

 

You could even add a note to say Posten will be used for orders under 2kg and and for order over 2kg for free shipping. If this is not suitable/acceptable either I don't know what to suggest. I am out of solutions.

Link to comment
Share on other sites

Have a look at http://www.prestashop.com/forums/index.php?/topic/148747-module-localized-shipping-set-shipping-rates-by-country-state-or-zipcode-range/

You can define shipping cost per country / State / Zip (range) and assign a different free shipping limit for each carrier.

 

Future version will also allow to assign free shipping for certain products.

Link to comment
Share on other sites

phrasespot

 

Concerning the second point, I was also thinking of just having "one" carrier and calling it "FREE SHIPPING" for both carriers over 800Kr, so that's a good idea that would make things simpler. :)

 

Concerning the first point. Unfortuantly the code you sent me didn't work, the remaining "paid" carrier don't dissapear :( , also I noticed in the cart block, when arriving at the cart with a product over 800kr, in the basket, the correct shipping of 0kr was shown, untill I choose a free shipping carrier from the list, it then suddenly showed a shipping of 69kr, untill I logged in or caused some typ of page refreash? :wacko:

 

I'm and old php/html programmer so the Smarty template sytem is giving me the gitters but even with my ristricted knowledge, i'm still wondering if the simple idea I gave in point 4, of my 2nd posting here, base on the default country of the shop, could work here? In this case, I would only need to find, a second piece of code concerning orders that needs a simular conditional statment added in the BO/orders (the lndividual order page) to stop a payment error be shown there because my card payment module draws the correct amount but the so called comparison between "total_paid" and "total_paid_real" in /classes/PaymentModule.php" kicks up an "payment error" error, thus sending an email payment error to the customer as was as showing the "payment error" in the BO. Otherwise this works with the Bankwire and Invoice modules I have!

 

David C

Link to comment
Share on other sites

As a note to the above ... I don't want to just "get rid" of the above comparison, what is needed is that "total_paid" is correct/corrected before it reaches the comparison. <_<

 

I'll try to add a picture again

 

.

post-231634-0-50842500-1332144480_thumb.jpg

Link to comment
Share on other sites

Ok, I seemed to have worked it out now, so if you just need your "default country" (set in BO) i.e. Sweden in my case, to be able to offer "Free Shipping" over a certain amount even though your shipping costs upto that point are based on weight, this code should do it in /classes/cart.php around line 1119 (v1.4.7.0). What I've added is in red:

 

// Free fees

$free_fees_price = 0;

if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $id_zone == (int)$defaultCountry->id_zone)

$shipping_cost = 0;

$free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency)));

 

$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);

 

if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0)

return $shipping_cost;

 

if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $id_zone == (int)$defaultCountry->id_zone AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)

return $shipping_cost;

 

This has been tested with, vouchers and wrapping etc. and a few different payment modules!

 

I hope this solves the problem for someone else with local "Free Shipping" problems. Sharing this answer now hopefully goes a bit of the way to puting back some of the hours many others have given to help me!

 

Thanks all

David C

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...