Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Show option value's on productlisting just show them, nothing else?

    Is there a way to show options value ( like size) on the productlisting? The only thing i find is showing attributes and put them in de shoppingcart directly from the productlisting. Thats not wat i need, i only want the size to show on de productlisting page. To make clear what i want here is a picture:
    Name:  matenopproductlijst.jpg
Views: 357
Size:  63.7 KB
    The red sizes are put there with gimp.
    Can someone put me in the right direction?

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: How to show option value's on productlisting just show them, nothing else.

    It's not clear if you want the customer to be able to choose a size from the product listing or if you just want to list sizes available.

  3. #3
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: How to show option value's on productlisting just show them, nothing else.

    I want the costumer to see in which sizes the underwear is available, no need to choose. They can choose from de product info page. :-)
    I have zencart 151 and i use stock-with-attibutes.
    Thank you for asking :-)
    link: https://www.domak.nl/boxershorts

  4. #4
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

    Default Re: How to show option value's on productlisting just show them, nothing else.

    You'll need to simply output the attribute names in the loop - to the screen in this case the product listing. The product info page takes the array data and publishes it in your chosen dropdown/radio button etc.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  5. #5
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: How to show option value's on productlisting just show them, nothing else.

    Don't i need som information from attributes.php? I use grid for showing my attributes on the product_info page. If i look up what seems to generated the size on the product page its this line in attributes.php:

    $grid_records['V']['options'][$grv]['name']

    But if i put that line in product_listing.php nothing happens and i think that's because the info page requires tpl_modules_attributes.php
    So i think i have to do some copying. I was kind of hoping there was an easy way to place my size's on the listing page.
    I'l struggle further hoping someone will point me in the right direction :-)

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

    Default Re: How to show option value's on productlisting just show them, nothing else.

    It's a loop, it cycles through the available attributes and displays them if it finds them in the array. You have one piece of the loop in that code, try using the entire loop on the product listing page...
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  7. #7
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: Show option value's on productlisting just show them, nothing else?

    I'm still struggeling with this. The problem is i dont know wat to put in the product_listing. i tried this:

    Code:
     $lc_text =$listing->fields['products_quantity'] . '<br/><a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a><br/>';
    This works what i get is the quantity of the products in total.

    What i want is just the name of the attributes so i looked around in the codes and found in /includes/classes/order.php this line // 'products_options_values' => $attributes_values->fields['products_options_values_name'], so i tried:
    Code:
     $lc_align = '';
            $lc_text = $attributes_values->fields['products_options_values_name'] . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a><br/>';
      break;
    Can someone point me in the right direction? I unterstand it is a loop, but in dont understand to make this loop. In a ideal world i only want to display the attribute when its product_options_id is 1 or 4 and the quantity is > 0
    I'm learning but now im stuck. Help?

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

    Default Re: Show option value's on productlisting just show them, nothing else?

    Any of those arrays you are posting will only exist on a page where they have been created or populated by other code (not the product listing page). What you want is simpler than the other situations, so the best bet would probably be to add a SQL query to the file (probably main_template_vars.php) that builds the data for use in the listing. I would have to examine the files to see exactly what form that would take; it might be possible to extend an existing query, or maybe make a new one which then adds its data to the main array.

  9. #9
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: Show option value's on productlisting just show them, nothing else?

    Ok, i'm using Attributes grid on my product_info page, and i figured a query i can use must be in there. But indeed its is much more complex then i need, so i get confused. I forgot to check main_template_vars.php thats the next thing i'm going to do. Thank you :-) i really want to figure this out. I'm going to try to write a SQL query an post it here. which main_template_vars.php is the best one to put the new sql in? product_info or document_product_info?

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

    Default Re: Show option value's on productlisting just show them, nothing else?

    Whichever one corresponds to the product type you are using. Ordinary products will use product_info.php.

 

 

Similar Threads

  1. How to Just display item/info and price on page, nothing else?
    By ghurty in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 May 2009, 04:15 AM
  2. option name and option value not show
    By wowemall in forum Customization from the Admin
    Replies: 2
    Last Post: 3 Feb 2009, 02:36 AM
  3. Is it possible to apply javascript to show option value images?
    By mumzie in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Jan 2009, 07:16 PM
  4. Attribute Option Values Don't show correct Value!?
    By notfarnow in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 27 Sep 2007, 08:45 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