Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Showing Attributes from List Page

    I would like to show attributes of my products in the product list. This allows visitors to compare the various similar products from a single screen.

    Zen Cart shows the following columns in the product list:
    Product Image :: Item Name :: Price

    I would like to show additional "attributes":
    UN Rating :: Size :: Cover Type :: Ring Type :: Dimensions :: Weight

    Is there a way to add attributes to a product and show these values when showing the products in the list? I am new to this, so maybe I am barking up the wrong tree.

  2. #2
    Join Date
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Showing Attributes from List Page

    I started to look at the data model and code to see if I can get closer to an answer. So this may be a little technical.

    From the documentation I could find, zen_products_attribute has a many to one relationship with products, products_id being the foreign key to the products table. So for each product you can have several attributes.

    Each zen_products_attribute has a value key (zen_products_options_values) and a option key (zen_products_options). I was able to write sql to get to the information I need:

    select
    g.products_options_name,
    h.products_options_values_name
    from
    bc_products_attributes as e,
    bc_products_options_values as h,
    bc_products_options as g
    where
    e.options_values_id = h.products_options_values_id
    and e.options_id = g.products_options_id
    and e.products_id = 1

    I haven't yet determined if there is a field in the attributes table that will indicate which attributes should show up on a list like the product list for a product comparison. I am thinking of adding a field, attributes_display_on_listing. Also, I am new to php and the many template files. I don't know which template files would contain my sql and other code. Can anyone help with this? Thanks in advance. Please let me know if these questions should be submitted elsewhere.

    Dwaz

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

    Default Re: Showing Attributes from List Page

    "...a field in the attributes table that will indicate which attributes should show up on a list like the product list for a product comparison."

    The attributes are designed to all display in the product info page, and none of them anywhere else. You are correct that you will need to do some extensive custom coding to accomplish what you want as "attributes", especially if you want to process choices on the listing page.

    However, the things you are talking about seem to fit the "product details" category better. Attributes are designed for the customer to make choices when ordering. You apparently just want to display relevant details about the product. The easy way to do this is to include them in the description, with HTML to make a bulleted list or whatever you want. You would then have to enable HTML display in the product listing. It's easy - search for zen_clean_html in the forum: html links in product description (on listing page).

    The complicated way is to make new fields for more product details paralleling weight and model, and then get them displayed.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 28 Jun 2014, 05:16 AM
  2. Showing list of categories on another page?
    By bobmoss in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Dec 2010, 10:35 PM
  3. Remove double spacing from product attributes list?
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 11 Jun 2009, 04:01 PM
  4. Remove products or categories from global attributes list
    By kanjigirl in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 21 Sep 2008, 10:27 PM
  5. Product list page including attributes?
    By hemz in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 21 Apr 2008, 01:32 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