Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Moving Shopping Cart text to define pages

    I decided I was tired of having to stop and get the shopping cart English file and wipe out the instructions that appear at the top of the shopping cart. I set up everything to move it to the define pages instead so that my clients can customize this themselves. Perhaps the zen gurus don't see this as logical since most define pages links appear in the information and more information sideboxes.

    So, I added this line to the shopping cart header:

    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SHOPPING_CART, 'false');
    /**

    this line to the filenames.php
    define('FILENAME_DEFINE_SHOPPING_CART', 'define_shopping_cart');

    and these lines to the shopping cart template:
    <?php
    /**
    * require the html_defined text for shopping cart
    */
    require($define_page);
    ?>
    </div>

    which looks to be all that needs to be done.

    I can edit the file in the define pages editor but I get this error in the cart:
    Fatal error: require() [function.require]: Failed opening required '' (include_path='.:')...

    So it's not finding the file. What did I miss?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

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

    Default Re: Moving Shopping Cart text to define pages

    And you loaded a copy in the original /html_includes so there is a file to override?
    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!

  3. #3
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Moving Shopping Cart text to define pages

    Yes ma'am - though I laughed when I read your post '[cause I figured I had done that kind of thing! Wasn't that dumb though! So how dumb am I? Head cold doesn't help.

    Afternoon, Linda, glad to see you hard at work today!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  4. #4
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Moving Shopping Cart text to define pages

    I just read my previous post and realized how dumb I am this week. I meant to say that I had done that so that wasn't the problem. What a very long weekend!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  5. #5
    Join Date
    Dec 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Moving Shopping Cart text to define pages

    Quote Originally Posted by delia View Post
    I decided I was tired of having to stop and get the shopping cart English file and wipe out the instructions that appear at the top of the shopping cart. I set up everything to move it to the define pages instead so that my clients can customize this themselves. Perhaps the zen gurus don't see this as logical since most define pages links appear in the information and more information sideboxes.

    So, I added this line to the shopping cart header:

    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SHOPPING_CART, 'false');
    /**

    this line to the filenames.php
    define('FILENAME_DEFINE_SHOPPING_CART', 'define_shopping_cart');

    and these lines to the shopping cart template:
    <?php
    /**
    * require the html_defined text for shopping cart
    */
    require($define_page);
    ?>
    </div>

    which looks to be all that needs to be done.

    I can edit the file in the define pages editor but I get this error in the cart:
    Fatal error: require() [function.require]: Failed opening required '' (include_path='.:')...

    So it's not finding the file. What did I miss?

    i don't suppose you could be a little more clear in exactly which files you had to edit? i've followed most of the instructions but hae come up with non-functional code when putting the code into the shopping cart header

    like so

    define('NAVBAR_TITLE', 'The Shopping Cart');

    define('HEADING_TITLE', 'Your Shopping Cart Contents');

    define('HEADING_TITLE_EMPTY', 'Your Shopping Cart');

    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SHOPPING_CART, 'false');
    /**

    define('TABLE_HEADING_REMOVE', 'Remove');

    define('TABLE_HEADING_QUANTITY', 'Qty.');

    define('TABLE_HEADING_MODEL', 'Model');

    define('TABLE_HEADING_PRICE','Unit');

    define('TEXT_CART_EMPTY', 'Your Shopping Cart is empty.');

    define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');

    define('SUB_TITLE_TOTAL', 'Total:');



    define('OUT_OF_STOCK_CANT_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock or there are not enough in stock to fill your order.<br />Please change the quantity of products marked with (' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '). Thank you');

    define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');



    define('TEXT_TOTAL_ITEMS', 'Total Items: ');

    define('TEXT_TOTAL_WEIGHT', '&nbsp;&nbsp;Weight: ');

    define('TEXT_TOTAL_AMOUNT', '&nbsp;&nbsp;Amount: ');



    define('TEXT_VISITORS_CART', '<a href="javascript:session_win();">[help (?)]</a>');

    define('TEXT_OPTION_DIVIDER', '&nbsp;-&nbsp;');

    ?>

  6. #6
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Moving Shopping Cart text to define pages

    I never got this working and Linda never gave me any more hints. I can probably get it working now but don't have time immediately. Will get to it.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #7
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Moving Shopping Cart text to define pages

    Okay, complete instructions plus I am posting a mod in the contributions section.

    In order to add information with the define pages function to any page:

    (instructions are for the shopping cart - I'm using v1.3.8)

    create your html includes file - it is a blank file named define_shopping_cart.php
    upload that to your includes/language/english/html_includes and to includes/language/english/html_includes/your folder.

    Edit includes/modules/pages/shopping_cart/header.php.php. Add this line
    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SHOPPING_CART, 'false');
    before
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_SHOPPING_CART');

    Edit includes/filenames.php - add
    define('FILENAME_DEFINE_SHOPPING_CART', 'define_shopping_cart');
    be nice to yourself and put it in alphabetically- line 68

    Edit includes/templates/your folder/templates/tpl_shopping_cart_default.php.
    line 33
    Replace <?php echo TEXT_INFORMATION ?> with <?php echo define_page ?>
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  8. #8
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Moving Shopping Cart text to define pages

    Sorry - just was reminded of something that my subconscious was trying to tell me - instead of altering filenames.php, add a file instead.

    includes/extra_datafiles/define_shopping_cart_filenames.php

    with at least this in it
    <?php
    define('FILENAME_DEFINE_SHOPPING_CART', 'define_shopping_cart');
    ?>
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  9. #9
    Join Date
    Nov 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Moving Shopping Cart text to define pages

    Hi - I was just looking to do the exact same thing and figured I'd ask if you'd ever gotten a mod together?
    Thanks!

    Cait

  10. #10
    Join Date
    Nov 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Moving Shopping Cart text to define pages

    Just in case anyone was wondering how to do this, the instructions above worked well right up until the end where the text wouldn't display properly on the page. I finally got it to work, and the process went like this:


    1. create your html includes file - it is a blank file named define_shopping_cart.php
    2. upload that to your includes/language/english/html_includes
    3. and to includes/language/english/html_includes/YOUR_TEMPLATE/

    4. Edit includes/modules/pages/shopping_cart/header.php.php. Add this line

    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_SHOPPING_CART, 'false');
    before
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_SHOPPING_CART');


    5. Add file:
    includes/extra_datafiles/define_shopping_cart_filenames.php

    with at least this in it
    <?php
    define('FILENAME_DEFINE_SHOPPING_CART', 'define_shopping_cart');
    ?>

    6. Edit includes/templates/your folder/templates/tpl_shopping_cart_default.php.
    line 33

    Replace


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

    </div>


    with :

    <div id="cartInstructionsDisplay" class="content">
    <?php
    /**
    * require the html_defined text for checkout success
    */
    require($define_page);
    ?>
    </div>


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 moving header text on individual item pages (works fine on their parent pages)
    By irish_1985 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 21 Sep 2012, 07:44 PM
  2. v150 text not showing on define pages
    By satijn in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Apr 2012, 12:44 AM
  3. Define Pages - Shopping Cart Problem
    By divaboutiques in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Feb 2012, 10:50 AM
  4. Changing text colour in centrebox & Define Pages Editor problem with text
    By annav in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Oct 2010, 10:55 AM
  5. Q: How to add/modify text on various shopping cart pages...
    By mrmikal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Mar 2009, 01:32 AM

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