Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

[x-cart 4.2.2] Want to add shipping method based on subtotal, not discounted subtotal

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-03-2011, 03:56 PM
 
mild2wild mild2wild is offline
 

Member
  
Join Date: Mar 2007
Posts: 17
 

Default [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
__________________
-----
From Mild to Wild Hot Sauce Shop
www.frommildtowild.com
Running X-Cart Gold 4.4.5
Reply With Quote
  #2  
Old 11-04-2011, 04:35 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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".
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 11-04-2011, 05:26 AM
 
mild2wild mild2wild is offline
 

Member
  
Join Date: Mar 2007
Posts: 17
 

Default 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
__________________
-----
From Mild to Wild Hot Sauce Shop
www.frommildtowild.com
Running X-Cart Gold 4.4.5
Reply With Quote
  #4  
Old 11-04-2011, 06:09 AM
 
mild2wild mild2wild is offline
 

Member
  
Join Date: Mar 2007
Posts: 17
 

Default 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
__________________
-----
From Mild to Wild Hot Sauce Shop
www.frommildtowild.com
Running X-Cart Gold 4.4.5
Reply With Quote
  #5  
Old 11-08-2011, 07:17 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #6  
Old 11-08-2011, 02:10 PM
 
mild2wild mild2wild is offline
 

Member
  
Join Date: Mar 2007
Posts: 17
 

Default 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?
__________________
-----
From Mild to Wild Hot Sauce Shop
www.frommildtowild.com
Running X-Cart Gold 4.4.5
Reply With Quote
  #7  
Old 11-08-2011, 03:58 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #8  
Old 11-08-2011, 04:36 PM
 
mild2wild mild2wild is offline
 

Member
  
Join Date: Mar 2007
Posts: 17
 

Default 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
__________________
-----
From Mild to Wild Hot Sauce Shop
www.frommildtowild.com
Running X-Cart Gold 4.4.5
Reply With Quote
  #9  
Old 11-06-2014, 04:30 AM
 
spiredem spiredem is offline
 

Advanced Member
  
Join Date: Oct 2008
Posts: 87
 

Default 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?
__________________
X-Cart Gold 4.1.10
Add-on: X-AOM (Advanced Order Management)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:48 PM.

   

 
X-Cart forums © 2001-2020