Jump to content

Cart Rule / Voucher - How to make the discount amount include shipping cost?


Recommended Posts

Hi,

 

 

We have a voucher mechanism we've been using since v.1.3 so when a customer checks out and enters a voucher code, the voucher will also deduct the total amount of the order (includes the shipping cost).

 

Eg.

 

Products: $10

Shipping: $5

--

Sub Total: $15

Voucher: $13

Total Order: $2

 

 

But now, I am currently using version 1.5.4.1 the only option in cart rules is to apply discount "Order (without shipping)"

 

Please help me how I can edit this setting so it also deducts shipping cost from the voucher.

 

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I did a less than perfect work around by limiting the postage to my standard option and offering free postage for my competition winners, this is less than ideal though as it limits customers ordering more items or upgrading their postage. any pointers or add on coupon modules would be amazing.

Link to comment
Share on other sites

  • 1 month later...

 

 

I won't be able to send free gifts for contest winners, etc.

 

You can as you can select free shipping, however I agree this isn't acceptable as then the winner can't upgrade postage, or pay the difference if they want to order more postage, I have been forced to set free postage and just cover it if someone orders more. a solution would be really great, I'd even consider paying for a module.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

This was possible in 1.4 if i remember. Applying discounts only to shipping. I guess we have to manually make calculations now to make vouchers.

It would be very stupid to make manual calculation for vouchers. I'm not surprise if this used to work since it's a very basic feature all shopping cart software should have otherwise how are we supposed to truly use the voucher system.

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...
  • 4 months later...
  • 3 weeks later...
  • 2 months later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...

Hi MarttenB,

 

I'm using this module on a website and this module allows to buy a gift card as a product with a custom amount or a fixed amount. When an order is done, it creates a discount code but it doesn't include the shipping costs

Link to comment
Share on other sites

  • 3 weeks later...

Bumping on this,

 

Hi everybody, 

 

basically after searching the web for a solution i've found out that in previous versions it use to be the opposite problem and someone solved the problem on this post https://www.prestashop.com/forums/topic/10211-resolu-bons-de-reduction-prise-en-compte-du-transport/

 

i am new to prestashop and maybe  someone with good knowledge of the prestashop coding may be able to help 

 

Sorry for my bad english but i am french :)

 

Thank you and hope someone could help 

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

  • 2 months later...
  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...

Good news for you, the solution is here :)

http://eoliashop.com/Modules_Prestashop/reduction-full

 

It's a patch (no configuration needed) that add an option when creating voucher. This new option allows include shipping costs in this voucher amount :)

Thanks, Eolia, but page is down for me. Can you check it?

Someone confirm this patch works?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
  • 3 weeks later...

Hi Guys,

 

If anyone still looking for any solution for cart rules (voucher code) those covers the shipping cost using the existing structure then I've a custom solution. It includes few core class file changes. If I told you the procedure here which is not an easy task for a non developer. It may broke your shop due to different version files have different code. So I can offer this modification with a small cost for this service. It covers all the Prestashop versions till now.

You can contact me on my S-K-Y-P-E: sitender.r

Link to comment
Share on other sites

Good morning,

 

I actually found a pretty easy fix for this in Presta 1.6, I'm sorry if it doesn't work in other versions.

Also pay attention that you have to change a core class in PrestaShop, and the code isn't running in our production environment for very long.

 

It concerns the function "getPackageShippingCost()" in the Cart class (classes/Cart.php);

There I've changed:

$order_total = $this->getOrderTotal(false, Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING, $product_list);

Into:

//get cart rules for discount amount, so the gift product doesn't get included in the shipping cost
$cart_rules = $this->getCartRules();
$total_free_gifts = 0;

foreach($cart_rules as $cart_rule){
if($cart_rule['gift_product'] != ""){
$value = $cart_rule['value_tax_exc'];
$total_free_gifts += $value;
}
}

// Order total in default currency without fees
$order_total = $this->getOrderTotal(false, Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING, $product_list);

//exclude free gifts from order total
$order_total = $order_total - $total_free_gifts;

 

Hope this helps anyone.

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

  • 4 weeks later...
  • 4 weeks later...
×
×
  • Create New...