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

Display Shipping Discount Next to Shipping Methods

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-15-2010, 08:14 PM
 
jillsybte jillsybte is offline
 

eXpert
  
Join Date: Jun 2006
Location: New York, USA
Posts: 389
 

Default Display Shipping Discount Next to Shipping Methods

I have a live 4.1.8 store and use FastLane Checkout and realtime USPS shipping rates. I have various shipping markups set up. I recently modified my store to allow for a percent shipping discount based on order subtotal. I added a new field (disc_p) to the shipping_rates table and modified xcartdir/provider/shipping_rates.php and xcartdir/skin1/provider/main/shipping_rates.tpl to allow for inputting the discount in the admin Shipping Markups area. I aslo modified xcartdir/include/func.cart.php to incorporate the discount into the shipping calculation. So, for instance, a subtotal of $50 will earn a customer free Media Mail (disc_p = 100) and 50% off Priority Mail (disc_p = 50). The calculations are working as intended.

Now for my problem: I want to display "FREE" (when disc_p=100) or "XX% off" (where XX = disc_p) next to the corresponding shipping methods in the list that appears for the pre-checkout shipping estimator and in the next-to-last checkout step. I know I need to modify xcartdir/skin1/customer/main/shipping_estimator.tpl and xcartdir/skin1/modules/Fast_Lane_Checkout/shipping_methods.tpl, but I don't know how to work the discount value into those templates. Both use a loop-type structure to list the shipping methods, and they use rate to display the shipping cost. I'm thinking the values for rate come from $intershipper_rates in the file xcartdir/shipping/shipping.php, but I haven't been able to successfully incorporate the discount value (disc_p from shipping_rates table). I made some mods to myshipper.php, mod_USPS.php, and shipping.php that I thought would work, but they didn't produce the desired result.

I hope I've explained this well enough. If not, feel free to ask for more info. If anyone has any ideas, I'd really appreciate suggestions.

Thanks,
Jill
__________________
X-Cart Gold 4.1.8 (Live)
BCSE Shipping Estimator for FLC Mod
BCSE Shipping Methods per Product Mod
BCSE Customer Review Management Mod
BCSE Catalog Order Form Mod
X-Cart Gold 4.5.2 (Building/Testing)
USA
Reply With Quote

The following user thanks jillsybte for this useful post:
exitodirect (11-19-2011)
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:17 PM.

   

 
X-Cart forums © 2001-2020