X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal (https://forum.x-cart.com/showthread.php?t=61466)

mild2wild 11-03-2011 03:56 PM

[x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I have a case where I want to add a shipping method that is applied to a purchase range based on the minimum subtotal *before* a coupon discount is taken into consideration. For example, if I set up a free shipping method for all orders over $65 and the user uses a coupon code that offers them a $20 discount and the new discounted subtotal is now $45, I want to be able to offer them a shipping discount if the original pre-discount subtotal was high enough to qualify for the free shipping. I can't simply set up a free shipping at $45 shipping method because I don't want users that didn't originally exceed the $65 threshold to qualify for the method.

Does anyone know how to do this for X-Cart 4.2.2?

Thanks,

Brian

JWait 11-04-2011 04:35 AM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I think shipping would be based on "ST" instead of "DST".

mild2wild 11-04-2011 05:26 AM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
Perhaps I'm missing something simple then, but how do I do that?

-Brian

mild2wild 11-04-2011 06:09 AM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I'm looking in shipping.php and thinking that an addition to this function could do what I want something to do


Code:

#
# This function checks if shipping method have defined shipping rates
#
function func_is_shipping_method_allowable($shippingid, $customer_info, $products, $weight=0, $subtotal=0) {
    global $sql_tbl, $config, $single_mode;
    global $login;


If I could add a new variable to this function to grab that other non-discounted subtotal and then use that as a comparison to qualify a different shipping method, that would do what I want [I think].

Thoughts anyone? Does anyone know wth I need to grab to populate that variable?

-Brian

JWait 11-08-2011 07:17 AM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
When you set up your Free Shipping you have the option of making the "Order subtotal range" 65.00 to 9999.99 and the "Apply rate to" to either DST (discounted sub total) or ST (sub total). This is in the Shipping Charges section. That is what I was referring to. You can set the "Percent charge (%)" to -100, but I have no way of checking if that would work.

mild2wild 11-08-2011 02:10 PM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
Hmmm ... I don't have the option to apply to ST or DST in 4.2.2 ... is that a feature of a newer version?

JWait 11-08-2011 03:58 PM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I hadn't thought of that, maybe it isn't in the 4.2.x branch.

mild2wild 11-08-2011 04:36 PM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I don't think that it is. I certainly don't see it in my administrative back end. If I'd known that it was added in a newer version I probably would've gotten the upgrade done instead of seeking a custom modification. Ah well, what's done is done now ...

-Brian

spiredem 11-06-2014 04:30 AM

Re: [x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal
 
I need this option as well. How do I code it in if I can't upgrade version?


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

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