X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   absolute discount + free ship in one coupon (https://forum.x-cart.com/showthread.php?t=27124)

gfiebich 12-05-2006 09:03 AM

absolute discount + free ship in one coupon
 
This is a simple little hack to the built-in coupon system. It causes all $ off coupons to also cause the order to have free shipping.

in func.php, change this:

Code:

if (!empty($coupon_type) and $coupon_type == "free_ship") {
                #
                # Apply discount coupon 'Free shipping'
                #
                        if (($single_mode) or ($provider_for == $discount_coupon_data["provider"])) {
                                $coupon_discount = $shipping_cost;
                                $shipping_cost = 0;


to this:

Code:

if (!empty($coupon_type) and $coupon_type == "absolute") {               

                #
                # Apply discount coupon 'Free shipping'
                #
                        if (($single_mode) or ($provider_for == $discount_coupon_data["provider"])) {

                                $shipping_cost = 0;


This was done in x-cart gold 4.0.18

-Glen

j0anne04 10-11-2008 10:41 PM

Re: absolute discount + free ship in one coupon
 
is it possible to have this as an option that can be turned on or off depending on the coupon? i want to enable it for hostess gifts, but for general vouchers i dont want it enabled...... great mod though, im glad someone thought of it!

j0anne04 10-11-2008 10:42 PM

Re: absolute discount + free ship in one coupon
 
whoops just realised i havent updated my signature... im using x-cart now, whichever one is the latest! i cant find it in my admin... where should i look?


All times are GMT -8. The time now is 05:39 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.