Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    7
    Plugin Contributions
    0

    Default Changing Breadcrumb Value for Page Type

    Hey,

    I'm looking for a way to change the breadcrumb value for product pages to 'Product'. So, for example, rather than seeing "Zen Cart Store > Hardware Products > Keyboards > Logitech G15 Gaming Keyboard" in the breadcrumb trail, they would see "Zen Cart Store > Hardware Products > Keyboards > Product".

    That's about it. Unfortunately, I can't link to my install as it is run locally, but I don't think you need to see my install to see what I'm saying.

    Thanks in advance for any help you can offer, and please let me know if you would like clarification on what I'm asking.

  2. #2
    Join Date
    Apr 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Changing Breadcrumb Value for Page Type

    Ah-ha, worked it out. Here's what I did:

    includes/init_includes

    Copy init_add_crumb.php to /overrides (if there isn't already one there) and open it

    Lines 67-69 (from original):
    PHP Code:
      if ($productname->RecordCount() > 0) {
        
    $breadcrumb->add($productname->fields['products_name'], zen_href_link(zen_get_info_page($_GET['products_id']), 'cPath=' $cPath '&products_id=' $_GET['products_id']));
      } 
    Change that to:
    PHP Code:
      if ($productname->RecordCount() > 0) {
        
    $breadcrumb->add("Product");
      } 
    Edit 'Product' with what you want the last value in a breadcrumb trail on a product page to read. Works perfectly.

  3. #3
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Changing Breadcrumb Value for Page Type

    Thanks for posting your solution. It'll help others looking to do the same thing.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

 

 

Similar Threads

  1. Changing a breadcrumb link
    By Joanna in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 22 May 2008, 05:13 PM
  2. Changing Text color for 'display only' value
    By v.kirk in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 31 Jan 2007, 07:03 PM
  3. How to create new option type with value for gift certificate
    By Beez in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 7 Dec 2006, 02:44 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR