Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Adding notes to certain product pages

    I was wondering if I could add a few notes to specific attributes. I do have flexible attributes but I don't know if that is what I need. Please look at this page: http://www.framesforlife.com/copy-examples-c-18/new-frame-example-1-p-21

    Under the second image you can see the text: Frame Profile Detail. This image is there via addtional images add on. My problem here is that I have the text "Frame Profile Detail" hard written on this page: /tpl_product_info_display.php. Here is the code:

    Code:
    <!--bof Additional Product Imagess-->
                <?php  
        require($template->get_template_dir('/tpl_modules_additional_imagess.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_imagess.php'); ?><p>Frame Profile Detail</p>
        <!--eof Additional Product Imagess-->
    While this does work and looks perfect while the additional image is there, it also shows on all other product pages. Any idea as to only have this show when the frame profile image (additional image) is showing? I would guess I could add an if statement there but don't know how.

    Second I would like to add this text: "Please see our sizing guide" The text "sizing" would be a hyperlink to my sizing page. But I only would like this to show on certain products (the custom frame products and none others). Is this possible and/or difficult? Would there be an add on that would allow me to add notes to this product page, but only to certain products?

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

    Default Re: Adding notes to certain product pages

    Install Additional Image Titles from Free Addons. It will let you give individual titles to specific additional images.

    If you only want this sizing guide link on products where you also have the additional image, you can combine the title and the link as HTML content on separate lines.
    Last edited by gjh42; 6 Jan 2012 at 06:38 AM.

  3. #3
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding notes to certain product pages

    Quote Originally Posted by gjh42 View Post
    If you only want this sizing guide link on products where you also have the additional image, you can combine the title and the link as HTML content on separate lines.
    Yes I want this exact text: "[FONT=monospace]Frame Profile Detail[/FONT]" to appear below all the additional images (if they are showing and uploaded) regardless of which additional image is showing. So if I have an additional image showing (regardless of image) I want it to say: "Frame Profile Detail" below.

    I am not sure how to add this html to the PHP page. Also, would I install the Additional Image Titles (which looks to be very specific to the exact image showing and I want broad) or just add the code to the: /tpl_product_info_display.php?

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

    Default Re: Adding notes to certain product pages

    Additional Image Titles would require duplicating the define for each different image file (not each product).

    If you really want that particular text for every single instance of an additional image, you can add the HTML to tpl_modules_additional_images.php, somewhere inside the loop so that it only triggers after an image has been output.

    You can see the appropriate location in the AIT copy of that file.

  5. #5
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding notes to certain product pages

    Thank you Black Belt this worked great! For those of you who wish to use this you must have the add-on: "Additional Product Images" in order for this method to work.

    If you would like to use this method, here is the code that needs modified in: includes>templates>template_default>templates>tpl_modules_additional_imagess.php

    Around Line#24 I added this code: <p>PUT YOUR TEXT HERE!</p>
    Code:
    <div id="productAdditionalImages">
    <?php
        while(!$additional->EOF) {
            echo '<div class="additional-images">'.zen_image(DIR_WS_IMAGES . $additional->fields['additional_image'], '', ADDITIONAL_SMALL_IMAGE_WIDTH, ADDITIONAL_SMALL_IMAGE_HEIGHT).'</div>';
            $additional->MoveNext();
        }
     ?><p>PUT YOUR TEXT HERE!</p>
    </div>
    This put the words directly below the additional image and only shows when an additional image shows.

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

    Default Re: Adding notes to certain product pages

    Note: DO NOT edit the original file in /template_default/.
    Copy it to /includes/templates/your_template/templates/tpl_modules_additional_images.php, and edit that copy.


    Also, there is no need to have any additional images mod installed. The stock tpl_modules_additional_images.php file is not amenable to adding the text, but you can easily add it in /includes/modules/your_template/additional_images.php. Find this at the bottom of the file
    PHP Code:
        $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif 
    and add your text wrapped in this

    $list_box_contents[$row][0]['text'] .= '<p>PUT YOUR TEXT HERE!</p>';

    just above the last } to get
    PHP Code:
        $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
      
    $list_box_contents[$row][0]['text'] .= '<p>PUT YOUR TEXT HERE!</p>';
    // endif 
    Last edited by gjh42; 13 Jan 2012 at 11:14 AM.

  7. #7
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding notes to certain product pages

    Yes I noticed that I should have put that file my custom template under: MY TEMPLATE instead of default. I should have specified that.

    You state this:
    Code:
    Also, there is no need to have any additional images mod installed. The  stock tpl_modules_additional_images.php file is not amenable to adding  the text, but you can easily add it in  /includes/modules/your_template/additional_images.php.
    Which confused me. Are you telling me that I do not need additional images add-on to show a second image on the product page? Please look here: http://www.framesforlife.com/copy-ex...example-1-p-21

    (The second image is the frame profile detail for each picture frame). Meaning the stock zen cart comes with the ability to add the second image below the first?

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

    Default Re: Adding notes to certain product pages

    Absolutely. Additional images have been a basic feature of Zen Cart for many years. See the tutorials.

    There are mods that alter how the additional images display.

  9. #9
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding notes to certain product pages

    Ohhhhh... You are talking about this: https://www.zen-cart.com/tutorials/index.php?article=58 I always thought that was for using the same image. One thumbnail for the multiple products category page, and/or a medium image for the product page, and then the larger detailed image if you click on this product page image to view. I had no idea you could use this for different images.

    Even so for me it's easier to just use additional images add-on. Here are the reasons:

    1. My clients don't have the ability to use FTP to upload their own images. This is too difficult for non webmasters. (Too bad this could not be done directly in the product area below upload image 1)
    2. I can turn off additional images here: Admin->Catalog->Product Types->Product General->Edit Layout->Show Additional Images = 0 and do not have to worry about the wrong images showing on the wrong products (this has happened to me on more than one store, and always means I have to have one more training session for my clients).

    While it is not located on the product edit page and requires additional steps because it is in a different area of the store, the additional images add-on is an easier solution for my clients.

    Thank you for your help Black Belt I really do appreciate your time!

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

    Default Re: Adding notes to certain product pages

    I understand making tasks more foolproof for untrained or training-resistant users:) The stock additional images function does actually require users to understand and follow a full set of rules, with latent consequences if they are not followed.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Adding another 'notes' box during checkout
    By lEWISm in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 14 Sep 2012, 08:40 PM
  2. v150 Adding Notes to Per Ordered Item
    By dencom in forum General Questions
    Replies: 1
    Last Post: 16 Aug 2012, 06:23 AM
  3. Adding notes about customers
    By Ayperi in forum Customization from the Admin
    Replies: 0
    Last Post: 21 Mar 2011, 09:59 PM
  4. Removing Add to cart on certain product pages
    By robiny in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 13 Oct 2007, 08:43 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