Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default $products_name on tpl_product_reviews_default.php

    I've noticed that the $products_name string contains the following data (on the end) only when the current page is tpl_product_reviews_default.php.

    Code:
    <br /><span class=\"smallText\">[PRODUCT-MODEL-NUMBER-HERE]</span>
    Is there any reason for this? I've noticed that the $title string returns the product name without the above code on the end. Would that be the correct string to use on this page?

    Thanks in advance! :)

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: $products_name on tpl_product_reviews_default.php

    You can see in the header_php.php code for that page that the model number gets appended if it exists:
    Code:
      if (zen_not_null($review->fields['products_model'])) {
        $products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
      } else {
        $products_name = $review->fields['products_name'];
      }
    You can review this and other variables available inside the header_php.php file, or in the case of other pages, the main_template_vars.php file for the given page. You can add your own if you so desire as well.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: $products_name on tpl_product_reviews_default.php

    Thanks for this. It's all beginning to make sense! :)

 

 

Similar Threads

  1. v151 Purposes, tpl_reviews_default.php and tpl_product_reviews_default.php (query)
    By KenBaker in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Apr 2014, 12:14 AM
  2. Help with $products_name
    By limelites in forum General Questions
    Replies: 3
    Last Post: 24 Jun 2009, 11:11 AM
  3. new_products.php - replacing $new_products->fields['products_name'] with manufacturer
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Mar 2009, 10:18 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