I'm trying to get a small piece of code to display on the checkout page.
What I would like is for the code to be able to do the following
40.00 - sub total = x
echo x if subtotal is < 40.00
Any ideas?
I'm trying to get a small piece of code to display on the checkout page.
What I would like is for the code to be able to do the following
40.00 - sub total = x
echo x if subtotal is < 40.00
Any ideas?
it can't be that hard....
Try using:
$order->info['subtotal']
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
will do
<?php if ($order->info['subtotal'] < 40.00) { echo 'test'; } else { echo 'test2'; } ?>
no joy
should say i'm on 1.3.9 not 1.5
I am not sure what to tell you ... I put your code in tpl_checkout_shipping_default.php and it works fine ...
Can you check in the Modules ... Order Totals ... that you have the Sub-Total ot_subtotal installed ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
It always results in "test"
I am basically trying to have a simple if statement that can see if the subtotal is less than £40, if it is, suggest they need to spend more to get free shipping.
Ideally it would tell them how much more they needed to spend to get free shipping.
Where in the code are you sticking this test line?
If you add it right at the top of the tpl_checkout_shipping.php below the line:
Do you see it on the checkout_shipping?Code:<div class="centerColumn" id="checkoutShipping">
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
What about in tpl_shopping_cart_default.php