X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Excluding coupns (https://forum.x-cart.com/showthread.php?t=65013)

Dougrun 06-14-2019 07:17 AM

Re: Excluding coupns
 
This is somehow now broken in 4.7.11. all my coupons can now be applied to any item so I need a fix. Anyone willing to work on this?

Dougrun 06-14-2019 08:26 AM

Re: Excluding coupns
 
nevermind, my other site it does work so i'll do a compare and figure out whats up..

Dougrun 10-17-2019 02:54 PM

Re: Excluding coupns
 
i'd love to include (exclude) freeshipping coupon types to the ones excluded, i'm searching in the func,cart,php file but not sure where to add it.


i tried this:
Code:

if (
            !empty($coupon_type)
            && $coupon_type == 'free_ship' && $product['coupons_avail'] != 'Y'
        ) {

            // Apply discount coupon 'Free shipping'

            if (
                $single_mode
                || $provider_for == $discount_coupon_data['provider']
            ) {
                $coupon_discount = $shipping_cost;
                $shipping_cost = 0;
            }
        }



but that excluded every item, even if coupons were checked. The original is missing the
Code:

&& $product['coupons_avail'] != 'Y'
and that allows free shipping no matter what (it does follow the coupon rule though which is a certain section).


All times are GMT -8. The time now is 04:10 PM.

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