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

Additional Field in checkout.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-03-2003, 08:48 PM
  jeffwill's Avatar 
jeffwill jeffwill is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: US
Posts: 41
 

Default 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.
Reply With Quote
  #2  
Old 03-03-2003, 10:34 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Take a look at [skin1]/customer/main/cart_totals.tpl
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 03-04-2003, 05:01 PM
  jeffwill's Avatar 
jeffwill jeffwill is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: US
Posts: 41
 

Default 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
Reply With Quote
  #4  
Old 03-06-2003, 09:30 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:15 PM.

   

 
X-Cart forums © 2001-2020