Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default is there a TEXT_INFORMATION for steps 2 and 3?

    Hi -

    I'm curious whether there's an equivalent to the TEXT_INFORMATION field (that's picked up by tpl_shopping_cart_default.php) for steps 2 and 3 of the checkout process. It would be nice to have the option to display some (different) information on those pages.

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    I take it you are talking about line 33 in that file that reads:

    PHP Code:
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION?></div>
    Confirm if I am correct...
    20 years a Zencart User

  3. #3
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    Yep, that's the one. Sorry that I wasn't more precise.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    This is just echoing what is in a define statement. It's not the database, so it's easy to mimic.

    Let's look at a bit more of that file... say, lines 32 - 37

    PHP Code:
    <?php echo zen_draw_form('cart_quantity'zen_href_link(FILENAME_SHOPPING_CART'action=update_product')); ?>
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION?></div>

    <?php if (!empty($totalsDisplay)) { ?>
      <div class="cartTotalsDisplay important"><?php echo $totalsDisplay?></div>
      <br class="clearBoth" />

    IF you do THIS...


    PHP Code:
    <?php echo zen_draw_form('cart_quantity'zen_href_link(FILENAME_SHOPPING_CART'action=update_product')); ?>
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION?></div>

    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION_ZIMMERS?></div>

    <?php if (!empty($totalsDisplay)) { ?>
      <div class="cartTotalsDisplay important"><?php echo $totalsDisplay?></div>
      <br class="clearBoth" />
    ... you will have created a your own place holder for a define, for a constant called TEXT_INFORMATION_ZIMMERS.

    -------------------------------------------------------------

    Now, you need to create that DEFINE statement, so open:

    includes/languages/english/shopping_cart.php

    And look for:
    PHP Code:
    define('TEXT_INFORMATION''You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)'); 
    Just UNDER that, put the following:
    PHP Code:
    define('TEXT_INFORMATION_ZIMMERS''This is Zimmers custom text... Hey Wow!'); 
    Save the files (in your custom folders if you have them set up) and visit your shopping cart page.

    1.
    20 years a Zencart User

  5. #5
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    I must be missing something. It looks like you're creating a second constant to hold some additional information, but that additional information will appear whenever the original TEXT_INFORMATION is echoed.

    What I want is for TEXT_INFORMATION_ZIMMERS to show up *only* on step 2 of the checkout process. This looks like it will show up on step 1, no?

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    Ah... yes mike... I did not read your OP well enough.

    Follow my PRINCIPLE above, but the DIV you have created should go somewhere into:

    tpl_checkout_shipping_default.php


    ... which is the NEXT page after shopping cart.

    Just where you put it may be a matter of trial and error...

    Also, bear in mind that you can give it its own STYLE ID as well.

    In my example, I just copied the original <div id="cartInstructionsDisplay" class="content">

    You could call it anything you like. <div id="cartInstructionsDisplayZimmer" class="content">

    This will allow you to style it individually later.
    20 years a Zencart User

  7. #7
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    OK, I can see how that would work. And, I assume for the following page, it would be file tpl_checkout_payment_default.php, and for the one after that, tpl_checkout_confirmation_default.php?

    Thanks.

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    Yes... looks like the correct chronology...
    20 years a Zencart User

  9. #9
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    OK...here's the line I put in tpl_checkout_shipping_default.php:
    Code:
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION_SHIPPING; ?></div>
    and here's the definition:
    Code:
    define('TEXT_INFORMATION_SHIPPING', '<b>SHIPPING INSURANCE:</b> Insurance is required on all shipments and will be automatically added to your order. We calculate insurance based on the rates supplied by UPS. You will see this amount on the next page. Insurance with the USPS is somewhat higher. Part of the USPS shipping rates you see on this page reflect their higher insurance rates.');
    Now, for some reason, instead of displaying the text defined by the constant, the page is just printing out the name of the constant (TEXT_INFORMATION_SHIPPING).

    I cut and pasted this verbatim...any ideas what I could have done wrong? It is at least showing up in the right place (and formatted like the TEXT_INFORMATION field on the preceding page), so I'm guessing I put the code in the right place.

    Thanks.

  10. #10
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: is there a TEXT_INFORMATION for steps 2 and 3?

    I put a telltale in the file; apparently the definition isn't "taking." Is there some limit on the length of names used to define constants?

    The page HTML validates...given that this is such a clone job, there really doesn't seem to be too many places to look for a mistake.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 shopping_cart.php Formatting test for TEXT_INFORMATION
    By Mr_Bill_S in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Oct 2013, 02:02 AM
  2. what steps and software do you use for merging files?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Jul 2010, 10:08 AM
  3. So Many Steps For Checkout Process / Sign Up and Checkout????
    By jeffory23 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 5 Oct 2009, 04:51 PM
  4. order steps text and images not there!
    By Phooie in forum General Questions
    Replies: 4
    Last Post: 11 Jul 2008, 08:14 PM
  5. Replies: 11
    Last Post: 30 Apr 2008, 06:21 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