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)
-   -   Additional Field in checkout.tpl (https://forum.x-cart.com/showthread.php?t=1716)

jeffwill 03-03-2003 08:48 PM

Additional Field in checkout.tpl
 
I need to add a warning screen and calculation on the checkout.tpl template that tells the customer:

"Your order is below our $50 minimum requirement. You may still place your order, but are subject to a $6.00 small order fee."

The customer is going to pay ALL shipping charges and the additional $6.00 small order fee.

I need to have the checkout.tpl look something like this:

Subtotal: $ 14.75
Discount: $ 0.00
Shipping: $ 5.25
Tax: $ 0.00
Small Order Fee: $6.00
Order total: $ 26.00

I'm having difficulting conveying this concept to people. I hope this clears things up.

B00MER 03-03-2003 10:34 PM

Take a look at [skin1]/customer/main/cart_totals.tpl ;)

jeffwill 03-04-2003 05:01 PM

Made some progress
 
Boomer,

I made SOME progress with the cart_totals.tpl template. I got it to look like I want it, visually.

My problem is; I don't know how to perform the calculations.

I have to figure out how to assign a value to {$lng.lbl_small_order}.

At the moment I've used $cart.total_cost. Obviously this won't work. Can you tell me where and how I can assign a new value for the small_order file?


Code:

<font class=FormButton>{$lng.lbl_small_order}:</font> <font class=ProductPriceSmall>
{include file="currency.tpl" value=$cart.total_cost}</font>
{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.total_cost}


I also have to compute a formula that says something like:

Code:

{if ( $cart.sub_total > 50.00 ) }
<font color="#FF0000">
You've Earned FREE UPS Ground Shipping.
</font>

{else}

<font color="#FF0000">
Your order is below our $50 minimum to qualify for FREE shipping.  You can continue with your order but are subject to a $6.00 small order fee.
</font>

{/if}


Your help is very much appreciated. I am well on my way to getting this thing working like I want it and learning a ton of stuff that I'll be able to use to help others, perhaps enough to relieve your burden sometime.

Thanks,

Jeff

B00MER 03-06-2003 09:30 AM

Take a look at include/func.php, in the function func_calculate(); You may need to do some adjustments on customer/cart.php as well to pass an value to the array you need to calculate on.


All times are GMT -8. The time now is 02:17 PM.

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