Jump to content
R0BJ3

SOLVED - Shipping costs after discount voucher

Recommended Posts

Hi all,

I have a question and I already searched the forum, but could not find a topic about this.
Perhaps is very easy, but in that case I'm not seeing it :long:

If a customers buys for more than 50 euros, they do not have to pay shipping costs.
All works fine, but my issue is with the following situation:
Customer buys for 55 euro's and uses a 10 euro discount voucher. The adjusted amount of the basket is 45 euro's.
However, PrestaShop still looks at the true value of the products and doesn't calculate shipping costs. So, basket is less then 50 euro's and no shipping costs.

What do I need to do, to make sure shipping costs are added to the order when the total amount is less then 50 euro's, even when a discount voucher is used?

I hope someone can direct me in the right way.

(Using PS 1.2.5 by the way.)

Many thanks in advance!

Share this post


Link to post
Share on other sites

well I do not know what you do wrong but with me it works fine.
on my shop if they buy more than 140euro the shipment is free.

so I start shopping untill I have 145 euro.
so the shipment is free.
then I just add a voucher code with -10% so the total amount to pay is : 145-14.5euro = 130.5
and yes..there is the shipment cost again.

look at my screenshot.

32481_PjnSkCQtytfDX7iH7h8T_t

Share this post


Link to post
Share on other sites

Thanks for your reply.

Strange....I did the about the same excersice as you can see is my screenshot.
And I don't understand what I'm doing wrong.

32483_DEeEkiZuKgYE1GdkGNUa_t

Share this post


Link to post
Share on other sites

how did you define the free shipment in your admin?

I did it in the administration, shipping and there I set free shipment starting from 140€
choice of range = by total weight.

maybe you can change that also?

Share this post


Link to post
Share on other sites

If I change "invoice by total price" to "invoice by total weight", nothing happens. Problem is still there.

Share this post


Link to post
Share on other sites

it's hard to say what is going on, but if you choose by weight, be sure you have a weight for each product, if one product is not correct filled in you will have this problem...

Share this post


Link to post
Share on other sites

Changing it to "by total weight" does not solve my issue.

Does anyone have any idea please??

Share this post


Link to post
Share on other sites

strange over here I have realy no problem.

do you work with different carriers?
do you have price ranges or weight ranges?

Share this post


Link to post
Share on other sites

Hi deech123,

I don't use weights, so all products are 0kg and I only use 1 carrier.
Attached screenshot of my settings. (By the way: url of shop is www.beautyskin.nl)

I started to think the error is not in the shipping settings, but perhaps in the shopping cart.
If you take a look at the second screenshot, in the bottom you see the message that customer needs to order some more for free shipping. But shopping cart already does not calculate shipping costs.

I'm pretty confused..... :-S

32631_wVCJCDUU747qtyQsAiE5_t

32632_Q155lsvOaB1dHxblBhv1_t

Share this post


Link to post
Share on other sites

okey first thing,

do not enter a shipping fee in the field handling charges. that's the first mistake since you have 2 carriers : Benelux and Nederland.
so you can do 1 thing,
change 6.95 to 0
remove zone Nederland because this is also in benelux.
if not make 2 new zones :
Belgium-Luxemburg
Nederland

I see you added a price range.
so then what you do is :
click on the shipping tab.
on the back enter for carrier TNT the 6.95 shipping cost.
and retry.

there is a error in the way of working.

Share this post


Link to post
Share on other sites

I changed the settings like you said.
Now I know for sure it's not shipping where the issue is. It's the shopping cart.
When I follow your instructions, no shipping costs at all our calculated. Also not when I place < 50 euro in the shopping cart.

I will try to re-install the blockcart module.

Share this post


Link to post
Share on other sites

Rob,

I really think it is not the blockcart....
it must be a configuration setting.
what you can try to do is this.

instead of 2 preice ranges, make 2 weight ranges (Like I did)
from 0 to 85000 gram (more than enough :-) )

and then calculate price by weight.
enter for the two zones the shipcost and in the 3 fields on top just enter the free shipment starting from 50euro in your case.
and test it again.

be sure every country is linked to a zone
and every tax is also linked to the zone.

Share this post


Link to post
Share on other sites

I encountered this issue as well, I solved it by changing this line in order.php:

$total_free_ship =  $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']);


to

$total_free_ship =  $free_ship - $summary['total_products_wt'] + $summary['total_discounts'];


I just removed the (). Since the $summary['total_discounts'] has got a negative value and there is a minus sign in front of the () it gets messed up.

Share this post


Link to post
Share on other sites
Rob,

I really think it is not the blockcart....
it must be a configuration setting.
what you can try to do is this.

instead of 2 preice ranges, make 2 weight ranges (Like I did)
from 0 to 85000 gram (more than enough :-) )

and then calculate price by weight.
enter for the two zones the shipcost and in the 3 fields on top just enter the free shipment starting from 50euro in your case.
and test it again.

be sure every country is linked to a zone
and every tax is also linked to the zone.


I have the same problem but I don't resolve it.

Share this post


Link to post
Share on other sites
Rob,

I really think it is not the blockcart....
it must be a configuration setting.
what you can try to do is this.

instead of 2 preice ranges, make 2 weight ranges (Like I did)
from 0 to 85000 gram (more than enough :-) )

and then calculate price by weight.
enter for the two zones the shipcost and in the 3 fields on top just enter the free shipment starting from 50euro in your case.
and test it again.

be sure every country is linked to a zone
and every tax is also linked to the zone.


I have the same problem but I don't resolve it.

Did you try my solution?
I encountered this issue as well, I solved it by changing this line in order.php:
$total_free_ship =  $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']);


to

$total_free_ship =  $free_ship - $summary['total_products_wt'] + $summary['total_discounts'];


I just removed the (). Since the $summary['total_discounts'] has got a negative value and there is a minus sign in front of the () it gets messed up.

Share this post


Link to post
Share on other sites

Yes, but it doesn't change the total in my shop.
kind regards

Share this post


Link to post
Share on other sites
I encountered this issue as well, I solved it by changing this line in order.php:
$total_free_ship =  $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']);


to

$total_free_ship =  $free_ship - $summary['total_products_wt'] + $summary['total_discounts'];


I just removed the (). Since the $summary['total_discounts'] has got a negative value and there is a minus sign in front of the () it gets messed up.



Thanks for the tip, but it didn't solve the issue for me.

Share this post


Link to post
Share on other sites

I solved the issue.

Problem is classes/Cart.php
Search for //Free fees

current code:

// Free fees
if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE']) AND floatval($configuration['PS_SHIPPING_FREE_PRICE']) > 0)    return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)    return $shipping_cost;



I changed this section with the //Free fees section from PS 1.3.1 Cart.php:

// Free fees
$free_fees_price = 0;if (isset($configuration['PS_SHIPPING_FREE_PRICE']))    $free_fees_price = Tools::convertPrice(floatval($configuration['PS_SHIPPING_FREE_PRICE']), new Currency(intval($this->id_currency)));$orderTotalwithDiscounts = $this->getOrderTotal(true, 4);if ($orderTotalwithDiscounts >= floatval($free_fees_price) AND floatval($free_fees_price) > 0)    return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)    return $shipping_cost;



This did the trick for me.

Share this post


Link to post
Share on other sites
I solved the issue.

Problem is classes/Cart.php
Search for //Free fees

current code:
// Free fees
if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE']) AND floatval($configuration['PS_SHIPPING_FREE_PRICE']) > 0)    return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)    return $shipping_cost;



I changed this section with the //Free fees section from PS 1.3.1 Cart.php:

// Free fees
$free_fees_price = 0;if (isset($configuration['PS_SHIPPING_FREE_PRICE']))    $free_fees_price = Tools::convertPrice(floatval($configuration['PS_SHIPPING_FREE_PRICE']), new Currency(intval($this->id_currency)));$orderTotalwithDiscounts = $this->getOrderTotal(true, 4);if ($orderTotalwithDiscounts >= floatval($free_fees_price) AND floatval($free_fees_price) > 0)    return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)    return $shipping_cost;



This did the trick for me.



Has anyone tried this or any other solution for this issue in PS 1.4? I also have same issue: I want a free shipping if customer spends for 100€ or more (with vouchers calculated, if any). Now I if they purchase for 100€ and they use 10% voucher total price becomes 90€ (free shipping still apply, which is not good), total should be 90€+shipping ... I don't use general 'Free shipping starts at: 100€' but I have 2 different zones with different free shipping price ranges, so I have choice of range selected as 'According to total price'. Thank you for any help!

Share this post


Link to post
Share on other sites

 

Has anyone tried this or any other solution for this issue in PS 1.4? I also have same issue: I want a free shipping if customer spends for 100€ or more (with vouchers calculated, if any). Now I if they purchase for 100€ and they use 10% voucher total price becomes 90€ (free shipping still apply, which is not good), total should be 90€+shipping ... I don't use general 'Free shipping starts at: 100€' but I have 2 different zones with different free shipping price ranges, so I have choice of range selected as 'According to total price'. Thank you for any help!

i have the same problem using the PS 1.4

Please anyone advice.

Share this post


Link to post
Share on other sites

This did not work for me. I'm using PS 1.3.1. I don't use weight to calculate the shipping cost. Could anyone help please?

 

I solved the issue.

Problem is classes/Cart.php

Search for //Free fees

current code:

// Free fees
if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE']) AND floatval($configuration['PS_SHIPPING_FREE_PRICE']) > 0)	return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)	return $shipping_cost;

I changed this section with the //Free fees section from PS 1.3.1 Cart.php:

// Free fees
$free_fees_price = 0;if (isset($configuration['PS_SHIPPING_FREE_PRICE']))	$free_fees_price = Tools::convertPrice(floatval($configuration['PS_SHIPPING_FREE_PRICE']), new Currency(intval($this->id_currency)));$orderTotalwithDiscounts = $this->getOrderTotal(true, 4);if ($orderTotalwithDiscounts >= floatval($free_fees_price) AND floatval($free_fees_price) > 0)	return $shipping_cost;if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)	return $shipping_cost;

This did the trick for me.

Share this post


Link to post
Share on other sites

Hi, I am having this issue too on PS 1.4 and don't find the way to fix it...

 

I have free shipping set for over 75€.

If a customers order 80€ and applies a 10€ coupon the product total is 70€ and they are still getting free shipping. How can I fix it? Please help!!

Share this post


Link to post
Share on other sites

Same issue on PS 1.4. I want the shipping rate to calculate after applying the voucher, I have it configured by price ranges. Anybody found a fix? Help please...

Share this post


Link to post
Share on other sites

HI there.

 

I have same problem with PS 1.6.06 any help or update?

Share this post


Link to post
Share on other sites

Hi, that not work, you try to create a voucher code with a free shipping, this will return a error.

it's working only for voucher without free shipping, 

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More