Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default I want to add text below additional images

    Hi all,

    I would love to be able to add a block of text below the additional images on product listings. We have a lot of description text and it currently send the "add to cart" as well as the additional images far down the page.

    For both additional description purposes and for keyword reasons we have this added text that remains the same within a category. Could EZ boxes do this? Should I have someone create a listing template or mod?

    Any thoughts on how to move a block of product description test below additional images?

    Have a store running with 1.38a but working on programming a brand new installation of 1.39h

    Thank you...

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Want to add text below additional images

    Try swguy's "boilerplate" tutorial, mentioned here. There are also mods for additional product description fields.

    Another discussion of it here.
    Last edited by gjh42; 17 Feb 2011 at 01:17 AM.

  3. #3
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Want to add text below additional images

    Thank you very much! I read everything I could find... I created a my-defines.php file... it includes:

    <?php

    $descr_stringlist = array("PHP_PILLOWS", "PHP_WINDOWTREATMENTS", "PHP_FURNITURE");

    define('PHP_PILLOWS', 'Text Pillows.');
    define('PHP_WINDOWTREATMENTS', 'TheText for window treatments.');
    define('PHP_FURNITURE', 'Text for furniture.');

    ?>

    I would like to just add the above conditions as type in my product descriptions and have the associated text appear below the additional photos...

    this must be done in tpl_product_info_display.php but how exactly since it will be separate from the description text.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Want to add text below additional images

    You don't want to add it to the description section, but a new section in tpl_product_info_display.php below the additional images section. You may want to do something as described in my second link, post 20.

  5. #5
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Want to add text below additional images

    I will try to use that... but isn't that a category specific bit of code? I see your post #20... that seems excellent!

    Big problem first... my my_defines.php is giving me a white screen which I can not seem to get past...

    Thank you.
    Last edited by spiritcraft; 17 Feb 2011 at 05:15 AM.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Want to add text below additional images

    You would need to tweak the tests and the code location for your particular criteria. If you are getting a white screen, look in the /cache/ folder in ZC root... what is in the latest myDebug file?

  7. #7
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Want to add text below additional images

    PHP Parse error: syntax error, unexpected T_STRING in

    .../html/includes/languages/english/extra_definitions/apparel_boutique/my_defines.php on line 5

    The latest came from SWG's my_defines.php code

    <?php

    $descr_stringlist = array("PHP_ONE_WEEK_DELAY", "PHP_TWO_WEEK_DELAY", "PHP_THREE_WEEK_DELAY");

    define('PHP_ONE_WEEK_DELAY', 'These decals will be shipped in one week after receiving your order.');
    define('PHP_TWO_WEEK_DELAY', 'These decals will be shipped in two weeks after receiving your order.');
    define('PHP_THREE_WEEK_DELAY', 'These decals will be shipped in three weeks after receiving your order.');

    ?>

  8. #8
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Want to add text below additional images

    Due to the white screen... I decided to play with this...

    Using Files Containing Boilerplate Text in the Zen Cart Product Description

    http://www.thatsoftwareguy.com/zenca...ate_files.html

    This seems better as I want a couple of paragraphs and that is tedious with more chance of errors in a my_defines file.

    I installed it, and while it works in the description block, it does not work when placed below... I would like it right below additional images.

    Here is the current tpl_product_info_display code:

    <!-- bof html description -->
    <?php
    function html_include_cb($match) {
    $prefix = "HTML_INCLUDE_";
    $match_filename = str_replace($prefix, '', $match[0]);
    $filename = DIR_WS_LANGUAGES . $_SESSION['language'] .
    '/boilerplate/' .
    $match_filename . ".html";
    $buffer = "";
    if (file_exists($filename)) {
    $handle = @fopen($filename, "r");
    while (!feof($handle)) {
    $buffer .= fgets($handle, 4096);
    }
    fclose($handle);
    }
    return $buffer;
    }
    if ($products_description != '') {
    $pattern = "/HTML_INCLUDE_[a-zA-Z0-9]*/";
    $products_description = preg_replace_callback($pattern, "html_include_cb",
    $products_description, -1);
    }
    ?>
    <!-- eof html description -->


    I want it conditional on HTML_INCLUDE_XYZ in product description, but how can I get this to show output where I want it? Thoughts?

    Thank you!

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Want to add text below additional images

    There is no error in line 5. Something about the construction of the previous line causes it to be parsed as unfinished, which carries over to the next line. Just for fun, try single quotes instead of double quotes in line 2.

    I've been working on something that came up while I was writing this... I'll have to look at it later.

  10. #10
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Want to add text below additional images

    Thank you!

    I guess the HTML option makes more sense the more I think about it. I have it working but the text is of course not where I want it! I wish I knew more...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 3 Sep 2013, 10:19 PM
  2. v151 Is it possible to add images/text next to additional images?
    By pexter in forum General Questions
    Replies: 6
    Last Post: 21 May 2013, 09:47 PM
  3. Additional Product Images - Add title below all images
    By sports guy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Dec 2011, 05:54 AM
  4. Add Text Heading Above Additional Images
    By jacdesigner in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 5 Jan 2009, 10:20 AM
  5. add text or images below the table
    By djozma in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Oct 2007, 08:03 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