Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,537
    Plugin Contributions
    127

    Default Re: PHP includes to save time?

    The documentation now describes how to do this for new, all, featured and product listing pages.

    http://www.thatsoftwareguy.com/zenca...scription.html
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #12
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP includes to save time?

    Quote Originally Posted by swguy View Post
    The documentation now describes how to do this for new, all, featured and product listing pages.

    http://www.thatsoftwareguy.com/zenca...scription.html
    Excellent work.. thanks for sharing.

  3. #13
    Join Date
    May 2008
    Posts
    33
    Plugin Contributions
    0

    Default Re: PHP includes to save time?

    Hi,
    I followed the instructions of swguy on
    http://www.thatsoftwareguy.com/zenca...scription.html,
    and it works fine for the featured-, new-, and all product pages.
    But it won't show up in the product listing pages.
    I just see my 'boilerplate strings'
    Any clues?
    Thanks, anna

  4. #14
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,537
    Plugin Contributions
    127

    Default Re: PHP includes to save time?

    Remember that includes/modules/product_listing.php is a template file - so if you've overridden it in includes/modules/<your template>/product_listing.php, then this is the file you want to edit.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #15
    Join Date
    May 2008
    Posts
    33
    Plugin Contributions
    0

    Default Re: PHP includes to save time?


    that was it, thank you so much for all your help.
    regards, anna

  6. #16
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: PHP includes to save time?

    this is really cool, thanks swguy, I have found a little quirk though, which caused me a little problem.
    Now I've found a solution, I'll post incase anyone else comes across the same issue.

    I have quite a few categories with only one product in them, when this snippet was installed, the category would appear but clicking on it took you to a totally blank page.

    It seems zen didn't like the extra defines file when theres only one product in a category.

    To fix this I placed the defines code supplied by swguy in another extra defines file, I used document_general.php, its only got one other define in it.

    This seems to have fixed my error, hope this helps someone else

  7. #17
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,537
    Plugin Contributions
    127

    Default Re: PHP includes to save time?

    Best to just create an extra_defines file especially for this; no need to overload the document file. Thanks for this catch.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #18
    Join Date
    May 2007
    Location
    Los Angeles
    Posts
    89
    Plugin Contributions
    0

    Default Re: PHP includes to save time?

    Hi SWguy,

    I have followed your directions and the boilerplate is still not showing up on the product description. I'm trying to add this to category ID 39. It seems so simple.. what am I doing wrong?

    Here is the code from override tpl_product_info_display.php:

    Code:
    <?php if (($products_description != '') || ($current_category_id == 39) ) { ?>
    <div id="productDescription" class="productGeneral biggerText">
    <?php 
       $stripped_products_description = $products_description;
       if ($current_category_id == 39)  {
          $stripped_products_description = $stripped_products_description . CAT39_DESC;
       }
       echo stripslashes($stripped_products_description); 
       echo '</div>';
    ?>
    <?php } ?>
    and here is the code for my_defines.php:

    Code:
    <?php
    
    $descr_stringlist = array("CAT39_DESC", "CAT40_DESC"); 
    
    define('CAT39_DESC', '10 Percent Rebate for xxxxx<br>You will receive your refund within 7 days. If you have any questions, please contact us.');
    
    ?>
    Thank you for your help!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Define Pages editor adds 4 or 5 blank lines every time I save
    By micallen in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Aug 2012, 06:34 PM
  2. Problems with includes/config.php and admin/includes.php
    By Scott83 in forum Basic Configuration
    Replies: 2
    Last Post: 23 Oct 2009, 07:09 PM
  3. mass amounts of attribute - trying to save time
    By 1408329330 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 17 Feb 2009, 03:48 AM
  4. PhP question about a line of code in includes/classes/order.php
    By dbrewster in forum Managing Customers and Orders
    Replies: 12
    Last Post: 1 Feb 2007, 03:30 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