Zen Cart Logo
Forums / All Other Contributions/Addons / Adding notes to certain product pages

Adding notes to certain product pages

Views: 1,034

Results 1 to 13 of 13
6 Jan 2012, 4:41 AM
#1
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

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:

<!--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?**
6 Jan 2012, 5:34 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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.

12 Jan 2012, 10:39 PM
#3
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Adding notes to certain product pages

gjh42:

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: "Frame Profile Detail" 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?

13 Jan 2012, 12:06 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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.

13 Jan 2012, 2:23 AM
#5
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

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>

<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. :smile:
13 Jan 2012, 10:11 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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
$col ++;
if ($col > (IMAGES_AUTO_ADDED -1)) {
$col = 0;
$row ++;
}
} // end for loop
} // endif


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

 just above the last } to get ```php
    $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
13 Jan 2012, 6:28 PM
#7
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

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:

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-examples-c-18/new-frame-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?**
13 Jan 2012, 7:05 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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.

14 Jan 2012, 8:01 PM
#9
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

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! :D

14 Jan 2012, 8:24 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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.

22 Jan 2012, 9:24 PM
#11
lissa8723 avatar

lissa8723

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Re: Adding notes to certain product pages

I have been looking for a certain thing but am unable to find it. Can you tell me if there is a way too add "notes to product pages" that are only in the admin area, so they are hidden from the consumers?
Such as recipes for the item. Stuff you do not want leaked away but you can reference your product for the recipe as a guide to keep track of each recipe for each product?
Please let me know.
Thanks

22 Jan 2012, 10:45 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding notes to certain product pages

Not built into stock Zen Cart. There might be a mod in Free Addons that does something like that... look and see. If not, you would have to code it or have it done.

23 Jan 2012, 7:19 PM
#13
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Adding notes to certain product pages

I found this add-on: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1210 It does look like you can add it to the product pages.

FYI There is a notes area in the order section. But if you put private notes in this section make sure you uncheck: send e-mail. If you don't it will send an e-mail to your customer with what you have written. Sometimes I put semi-private notes in that area.