Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default If subtotal < 40 echo

    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?

  2. #2
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    it can't be that hard....

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: If subtotal < 40 echo

    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!

  4. #4
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    will do

  5. #5
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    <?php if ($order->info['subtotal'] < 40.00) { echo 'test'; } else { echo 'test2'; } ?>

    no joy

  6. #6
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    should say i'm on 1.3.9 not 1.5

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: If subtotal < 40 echo

    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!

  8. #8
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    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.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: If subtotal < 40 echo

    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:
    Code:
    <div class="centerColumn" id="checkoutShipping">
    Do you see it on the checkout_shipping?
    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!

  10. #10
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: If subtotal < 40 echo

    What about in tpl_shopping_cart_default.php

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 58
    Last Post: 30 Aug 2018, 05:47 PM
  2. Replies: 2
    Last Post: 21 Aug 2014, 04:24 PM
  3. Help with Echo
    By guedojas in forum General Questions
    Replies: 0
    Last Post: 18 Dec 2007, 05:45 AM
  4. Echo product count
    By t0minit in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Nov 2007, 03:10 PM
  5. Echo Pmt mod?
    By hendrickx in forum Addon Payment Modules
    Replies: 3
    Last Post: 18 Jan 2007, 08:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg