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)
-   -   Display Shipping Discount Next to Shipping Methods (https://forum.x-cart.com/showthread.php?t=56589)

jillsybte 11-15-2010 08:14 PM

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


All times are GMT -8. The time now is 02:18 AM.

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