ruslan1984 Posted March 14, 2014 Share Posted March 14, 2014 (edited) Guys, I have tried the solutions provided on the forum to achieve this, but nothing works. I either get the blank screen or blank screen:) I want to show available sizes of clothes right under the product images on the product list. I'm using default theme, version 1.5.6.1. However I have modified product list tpl and css file for the grid view. My domain is sweet5.kg Can anybody help me with the code? I quite stranger to the php and smarty:) Thank you in advance. Regards, Edited March 18, 2014 by ruslan1984 (see edit history) Link to comment Share on other sites More sharing options...
math_php Posted March 14, 2014 Share Posted March 14, 2014 Hello, If available sizes are features you can : - activate smarty debug and then look if needed features are send when you watch product list - look at product tpl to see code example that deals with features If you are lucky enough you will only have to modify product-list.tpl Regards Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 Guys, I have tried the solutions provided on the forum may i know which ones ? can you share url to the threads? Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 14, 2014 Author Share Posted March 14, 2014 http://www.prestashop.com/forums/topic/279551-how-to-show-product-attribute-option-in-product-list/ http://www.prestashop.com/forums/topic/81210-colors-on-product-listtpl/page-6 Link to comment Share on other sites More sharing options...
math_php Posted March 14, 2014 Share Posted March 14, 2014 Ok wrong for me sizes must be combinations not features Then just modifying tpl will not do the job, php code modifications are required. Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 14, 2014 Author Share Posted March 14, 2014 I believe so. Probably some community members or moderators can help me out with the code. I really need this:) Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 it will not be as easy as it seems, but it's possible. i can do it step by step with you. for the first please create new hook, call it, for exaple displayProductOnListand insert {Hook::exec('displayProductOnList')} to the product-list.tpl filefor example, right below the: {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <span class="exclusive"><span></span>{l s='Add to cart'}</span><br /> {/if} {/if} {Hook::exec('displayProductOnList')} if it will be ready, let me know Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 14, 2014 Author Share Posted March 14, 2014 Done, Vekia. By the way I really appreciate your time and effort to assist me with this Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 ok now in product-list.tpl change {Hook::exec('displayProductOnList')} to {Hook::exec('displayProductOnList', $product)} (it was my mistake) and install this module that i created: https://www.dropbox.com/s/vvigcko4ypicws9/attributes.zip 6 Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 16, 2014 Author Share Posted March 16, 2014 (edited) Ok, I renamed the hook and installed the module. Cleared the cache and the available sizes appeared I gave it a try and I really like it, however I have a problem. If the product is sold out and not available, the item still shows the sizes it had when was originally posted. And if one size of a product is also sold it is not removed from the list of available sizes it is displayed. How can this be fixed. Edited March 17, 2014 by ruslan1984 (see edit history) Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 18, 2014 Author Share Posted March 18, 2014 ?? Link to comment Share on other sites More sharing options...
math_php Posted March 18, 2014 Share Posted March 18, 2014 Tested, it works well, Vekia has done a good job. Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 18, 2014 Author Share Posted March 18, 2014 No argument there, math_php. However I have slight problem. Hope he answers whenever:) Link to comment Share on other sites More sharing options...
math_php Posted March 18, 2014 Share Posted March 18, 2014 You can modify combinations.tpl in Vekia's module this way : {foreach $combinations as $k=>$v} {if $v.quantity>0} <strong> {$v.group_name}:</strong> {$v.attribute_name} | {/if} {/foreach} 1 Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 18, 2014 Author Share Posted March 18, 2014 Thanks math_php. This works like a charm. I really appreciate guys you helped with this. Regards. Problem is solved. Link to comment Share on other sites More sharing options...
vekia Posted March 18, 2014 Share Posted March 18, 2014 ohh i missed this topic, anyway glad to hear that it works. so, finally we have working solution i will release free module based on this topic, it's worth to publish it any suggestions? 3 Link to comment Share on other sites More sharing options...
ruslan1984 Posted March 19, 2014 Author Share Posted March 19, 2014 Hello Vekia, Yes, i think it's worth to publish it. Very useful for clothing store. Thanks again for helping me. Link to comment Share on other sites More sharing options...
Sam Minerve Posted April 24, 2014 Share Posted April 24, 2014 Hello, I also want the product sizes to be displayed with the quick view but I'im using version 1.6 of Prestashop. Can someone lend me a hand, please ? Thank you Link to comment Share on other sites More sharing options...
PrestaShark Posted April 30, 2014 Share Posted April 30, 2014 (edited) Top notch solution vekia! But how to separate attributes? Size: M, L, XL, XXL Color: Red, Blue, Green because now we have something like this (combination of 9 colors and 3 sizes) a little bit messy! Color: Blue | Size: XS | Color: Pink | Size: XS | Color: Green | Size: XS | Color: Orange | Size: XS | Color: Black | Size: XS | Color: Purple | Size: XS | Color: Yellow | Size: XS | Color: Red | Size: XS | Color: Blue | Size: S | Color: Pink | Size: S | Color: Green | Size: S | Color: Orange | Size: S | Color: Black | Size: S | Color: Purple | Size: S | Color: Yellow | Size: S | Color: Red | Size: S | Color: Blue | Size: M | Color: Pink | Size: M | Color: Green | Size: M | Color: Orange | Size: M | Color: Black | Size: M | Color: Purple | Size: M | Color: Yellow | Size: M | Color: Red | Size: M | or how to view only one attribute Size (without Colors)? Thanks! Edited April 30, 2014 by kisweb (see edit history) 2 Link to comment Share on other sites More sharing options...
PrestaShark Posted May 5, 2014 Share Posted May 5, 2014 @bump! Anybody? Link to comment Share on other sites More sharing options...
vekia Posted May 5, 2014 Share Posted May 5, 2014 you can create if condtions in tpl file to display only sizes. i dont remember array structure but you can use |print_r on variable with attribute, then you will see probably something like attribute_group (as far as i remember) then create if condition like {if $variable.attribute_group==2} {$variable} {/if} Link to comment Share on other sites More sharing options...
cocodeluxe Posted June 4, 2014 Share Posted June 4, 2014 you can create if condtions in tpl file to display only sizes. i dont remember array structure but you can use |print_r on variable with attribute, then you will see probably something like attribute_group (as far as i remember) then create if condition like {if $variable.attribute_group==2} {$variable} {/if} Vekia help me please This is the way ¿?, no works me {if $combinations.group.name=="Size"}More sizes{/if} Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2014 Share Posted June 4, 2014 no it's not right way. what is your variable name that are a part of foreach loop? Link to comment Share on other sites More sharing options...
cocodeluxe Posted June 4, 2014 Share Posted June 4, 2014 {foreach $combinations as $k=>$v} {if $v.quantity>0} <strong> {$v.group_name}:</strong> {$v.attribute_name} | {/if} {/foreach} I try it also with and no works {if $v.group_name=='Size'}More sizes{/if} I just want that when a product has a certain attribute display a message Very thanks Link to comment Share on other sites More sharing options...
cocodeluxe Posted June 5, 2014 Share Posted June 5, 2014 A little bit help with this please Link to comment Share on other sites More sharing options...
cocodeluxe Posted June 6, 2014 Share Posted June 6, 2014 I think I have try all statement posibilities and no works imposible for me Link to comment Share on other sites More sharing options...
PrestaShark Posted June 18, 2014 Share Posted June 18, 2014 This module dont work good with cache on. When is on module works weird and shows product attribute that is not assigned for. ExShoes have XL,M,L sizesTshirts have shoe sizes When the cache is off all attributes are good.Any clue? Link to comment Share on other sites More sharing options...
zbi Posted September 10, 2014 Share Posted September 10, 2014 Whether for prestashop 1.6 is a solution for the attributes size for product-list? Link to comment Share on other sites More sharing options...
garyjj127 Posted September 24, 2014 Share Posted September 24, 2014 Hi Vekia Are you any closer to releasing this as a module? Link to comment Share on other sites More sharing options...
PrestaShark Posted September 24, 2014 Share Posted September 24, 2014 Hi Vekia Are you any closer to releasing this as a module? Hi. This is a module: https://www.dropbox.com/s/vvigcko4ypicws9/attributes.zip (Vekia upload link from this topic) Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2014 Share Posted September 24, 2014 it's still not well working solution, it's only a template of idea i totally forgot about that stuff lol Link to comment Share on other sites More sharing options...
PrestaShark Posted September 24, 2014 Share Posted September 24, 2014 To do list: - fix problem when store cache is on, - make a posibility to separate each of attribute ex (view only size when product have size/color option) Link to comment Share on other sites More sharing options...
garyjj127 Posted September 25, 2014 Share Posted September 25, 2014 Hi Prestashark Thanks for the link. How do I configure it? Is there any instructions on the forum? Thanks again! Link to comment Share on other sites More sharing options...
garyjj127 Posted September 25, 2014 Share Posted September 25, 2014 Sorry! All the information was right here in this thread All working now thanks! Link to comment Share on other sites More sharing options...
garyjj127 Posted October 13, 2014 Share Posted October 13, 2014 (edited) Hi Regarding this module, is there a way of displaying "Size" in front of the available sizes? I've modified the tpl file as below: <div class="combos">{foreach $combinations as $k=>$v} {if $v.quantity>0} {$v.attribute_name}, {/if} {/foreach}</div> This shows the available sizes. I'd like to have it to show "Sizes: Small, Medium". So far, if I put the "size" text in the foreach command the word sizes obviously shows for every size. If i place the "size" text outside it, the text shows up even for items which have no sizes. Also, would there be a way of translating the attributes? For instance, my attributes are called "Small, Medium, etc...", but I'd like them displayed on the product list as "S, M, etc...", while keeping the longer attribute names for the actual product page. Any help appreciated!! Edited October 13, 2014 by garyjj127 (see edit history) Link to comment Share on other sites More sharing options...
Maxim_z Posted October 23, 2014 Share Posted October 23, 2014 (edited) Hi Vekia, can you please give a little advice for Prestashop 1.6. How can I create a hook here? I can only choose a modul and then Hoot it in some region. Help please if u have time! Edited October 23, 2014 by Maxim_z (see edit history) Link to comment Share on other sites More sharing options...
PrestaShark Posted October 23, 2014 Share Posted October 23, 2014 Hi Vekia, can you please give a little advice for Prestashop 1.6. How can I create a hook here? I can only choose a modul and then Hoot it in some region. Help please if u have time! Hello Maxim_z You dont need to create any hook or move module to other place via change module positions. Just add {Hook::exec('displayProductOnList', $product)} in product-list.tpl file located in Your template folder themes/default-bootstrap/product-list.tpl and product attribute will be available in homepage featured products and product in categories without any hassle. Let me know if this help 1 Link to comment Share on other sites More sharing options...
Maxim_z Posted October 23, 2014 Share Posted October 23, 2014 Thanks PrestaShark a lot, It worked Now it shows attributes. But I actually hoped that it would be possible to choose attributes also and put than product in the card. Do you know maybe if somebody has done it before? Link to comment Share on other sites More sharing options...
Maxim_z Posted October 23, 2014 Share Posted October 23, 2014 If its can't be done, I would like to just hide the button "Add to card" if the product has attributes. As i understand I have to change product-list.tpl. Do somebody know how its can be done? Thanks! Link to comment Share on other sites More sharing options...
PrestaShark Posted October 23, 2014 Share Posted October 23, 2014 Its more complex and everyone in this thread pray for Vekia help in this matter This module shows only active products attributes. "Add to cart" function is more complex to make. You should use paid Attribute module from PrestoChangeo Link to comment Share on other sites More sharing options...
garyjj127 Posted October 23, 2014 Share Posted October 23, 2014 Is it possible to have translations for the sizes? For example, My sizes appear on the product pages as "UK 3, UK 4" etc... But I'd like them to show on the product list page as 3, 4, 5, etc, as it looks less cluttered, especially for clothing sizes (i.e. "S, M, L" instead of "Small, Medium, Large"). Link to comment Share on other sites More sharing options...
Maxim_z Posted October 25, 2014 Share Posted October 25, 2014 Thanks a lot PrastaShark. Its great, that this opportunity exists. Link to comment Share on other sites More sharing options...
pawlus1993 Posted November 7, 2014 Share Posted November 7, 2014 Hi guys! I installed this module and i get this: https://drive.google.com/file/d/0B05Med9lT9TTMjZ4UWJWaTlLQlk/view?usp=sharing It is possible to separate each size with "enter" no " | " ? Plese help me, its very important to me. Where and how should i edit tpl file? Link to comment Share on other sites More sharing options...
PrestaShark Posted November 7, 2014 Share Posted November 7, 2014 (edited) Hi! Cześć!Please open template product-list.tpl file and replace {Hook::exec('displayProductOnList', $product)} to <span style="color:#666;font-size:11px;">{l s='Available sizes'}: {Hook::exec('displayProductOnList', $product)}</span> And in modules/attributes/ edit combinations.tpl and replace to: {foreach $combinations as $k=>$v} {$v.attribute_name} <- put here one blank space but , or | separator will be better imho {/foreach} Edited November 7, 2014 by PrestaShark (see edit history) Link to comment Share on other sites More sharing options...
pawlus1993 Posted November 7, 2014 Share Posted November 7, 2014 (edited) Its work but still size is separated by | For example: 34 | 36 | 39 | etc. Its possible to get something like that? : 34 36 39 etc... Edited November 7, 2014 by pawlus1993 (see edit history) Link to comment Share on other sites More sharing options...
pawlus1993 Posted November 7, 2014 Share Posted November 7, 2014 Ok, its work fine now. My bad Thank u very much! 1 Link to comment Share on other sites More sharing options...
PrestaShark Posted November 7, 2014 Share Posted November 7, 2014 Ok, its work fine now. My bad Thank u very much! Glad to help Share the love and Like my post that help solve Your problem Pozdrawiam! Link to comment Share on other sites More sharing options...
pawlus1993 Posted November 7, 2014 Share Posted November 7, 2014 By the way, it is possible to get something like that? And how? https://drive.google.com/file/d/0B05Med9lT9TTT2tGYTlRbjNseW8/view?usp=sharing Link to comment Share on other sites More sharing options...
PrestaShark Posted November 7, 2014 Share Posted November 7, 2014 Yes its is possible via Paid Module http://www.presto-changeo.com/en/attribute-modules/59-product-list-attributes.html You can hide available product sizes via css and show after user hover on product box like here -> www.basketplanet.pl (hover on product) Link to comment Share on other sites More sharing options...
garyjj127 Posted November 10, 2014 Share Posted November 10, 2014 Is it possible to have translations for the sizes? For example, My sizes appear on the product pages as "UK 3, UK 4" etc... But I'd like them to show on the product list page as 3, 4, 5, etc, as it looks less cluttered, especially for clothing sizes (i.e. "S, M, L" instead of "Small, Medium, Large"). Link to comment Share on other sites More sharing options...
expol Posted November 19, 2014 Share Posted November 19, 2014 Hi, a few days to try and nothing How do I change combination.tpl if I want to display ONLY size, there is also the color ot want it. Can someone help me ............please ...... Thank you. 1 Link to comment Share on other sites More sharing options...
julien_wmx Posted November 20, 2014 Share Posted November 20, 2014 you can create if condtions in tpl file to display only sizes. i dont remember array structure but you can use |print_r on variable with attribute, then you will see probably something like attribute_group (as far as i remember) then create if condition like {if $variable.attribute_group==2} {$variable} {/if} First, thanks a lot for this module I'd like to display it differently but I need some more options... I'd like to display it like this: Size: XXX Color: XXX but how can I find the attribute group ? .attribute_group, .group_type don't work... Could you help me please ? Thanks Link to comment Share on other sites More sharing options...
zeisei Posted January 23, 2015 Share Posted January 23, 2015 Hello everyone, I tried this in ps 1.5.4.1 including the hook and then installed the module and also emptied cachec but there are no attributes appearing in product list. Does anyone use similar version that works. I dont suppose i am the only to whom it doesnt work. Any ideas what i could be doing wrong? Thank you Link to comment Share on other sites More sharing options...
zeisei Posted January 23, 2015 Share Posted January 23, 2015 (edited) It doesnt work in ps 1.5.4.1. Anyone had it working in that 1.5 version Edited January 31, 2015 by zeisei (see edit history) Link to comment Share on other sites More sharing options...
amsawad Posted January 31, 2015 Share Posted January 31, 2015 Hi, How to remove duplicate values (in smarty) ?I have several attributes values that are the same (L, M, XL, M, XL ...) comming from {$ v.attribute_name}In php I use array_unique but it's not working in smarty thank you Link to comment Share on other sites More sharing options...
SteG Posted February 5, 2015 Share Posted February 5, 2015 Hi all, i editing Vekia Module combination.tpl with this code: {foreach $combinations as $k=>$v} {if $v.id_attribute_group==1} {$v.attribute_name} | {/if} {/foreach} but with this code i have this situation: 1 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 | 4 | 4 | 4 because i have for esample 3 color: 1/skin 1/black 1/white 2/skin 2/black 2/white.... etc... how to modify this code so that it can give only one attribute? example: 1 | 2 | 3 thank you all for the help Link to comment Share on other sites More sharing options...
max.grafix Posted February 8, 2015 Share Posted February 8, 2015 Dont know about efficiency of code but it works fine for me. Modify combination.tpl as: {$sizes = array()} {$i = 0} {foreach $combinations as $k=>$v} {if $v.quantity > 0 && $v.id_attribute_group == 1} {$sizes[$i] = $v.attribute_name} {$i = $i+1} {/if} {/foreach} {$sizes = array_unique($sizes)} {if $i > 0} <div class="size-area"> <span>Sizes: </span> {foreach $sizes as $a} <p>{$a}</p> {/foreach} </div> {/if} Link to comment Share on other sites More sharing options...
Szakalmos Posted February 27, 2015 Share Posted February 27, 2015 (edited) Hi guys! Uncle google told me that i can find solution for my problem in this topic. What i want to archieve, is to show available colours of my products in my clothes store. First i tried to seperate product attributes (colours) as individual products, but i have found it very hard to make and there is big risk of messing with the code ( it was sth about deleting product ID) Then i found the solution presented in this topic and I also face problems which ruslan1984 and prestashark in post #19 did. Unfortunately i have no idea how to implement it in my store and i'm looking for a person who could do this for cash. I'm also interested in starting multistore , my PS version is 1.5.6.2 PLZ contact me with price offers PS. I speak both polish and english in case. [email protected] Edited February 27, 2015 by Szakalmos (see edit history) Link to comment Share on other sites More sharing options...
papich Posted May 14, 2015 Share Posted May 14, 2015 Hello, someone fix it for 1.6? Link to comment Share on other sites More sharing options...
AdrianaM Posted July 7, 2015 Share Posted July 7, 2015 (edited) Hi, I know that topic is solved, but I have problem related to it, and I can't make it work. My prestashop version is 1.6.0.14, and I created a hook in my database - I checked it exist. I already add attributes module from Vekia and paste a hook: {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {hook h="displayProductPriceBlock" product=$product type="old_price"} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {hook h="displayProductOnList" product=$product} in product-list.tpl file... but it don't work My shop: http://nikboutique.com/12-mezczyzna I want in my product grid on hover appear avilable sizes above the price. Thanks in advance for any help!!! Adriana Edited July 7, 2015 by AdrianaM (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 hello after {Hook::exec('displayProductOnList')} please paste "TEST" does it appear on productl istings? Link to comment Share on other sites More sharing options...
LukasHH Posted January 2, 2016 Share Posted January 2, 2016 (edited) Hello and happy new Year, this modul is very interesting. i have modified the the combination.tpl for output the default combination as excample: {foreach $combinations as $k=>$v} {if $v.default_on==1} <strong>{$v.group_name}:</strong> {$v.attribute_name} {/if} {/foreach} But such as i can change $v.group_name to the puplic_name? this is not work: $v.group_public_namemy ps version is 1.6.1.3 Edited January 2, 2016 by LukasHH (see edit history) Link to comment Share on other sites More sharing options...
Kaper Posted January 8, 2016 Share Posted January 8, 2016 Hello,thanks, i am using 1.6.1.0 and is it working. But Can you please help me? I just want to show only SIZE Combinations of product. For example just: | S | M | L | XL Simple Thanks ! Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2016 Share Posted January 9, 2016 There's plenty topics about it, meaning PS users need it very much - clients need it too for easier moving on the page and for a better look on the page without duplicating same product with just different size or color. I have found also this topic: https://www.prestashop.com/forums/topic/279551-how-to-show-product-attribute-option-in-product-list/ still no full solution, but it is good to try and modify something and share... Link to comment Share on other sites More sharing options...
nosnevetzy Posted February 5, 2016 Share Posted February 5, 2016 Hello there! I tried Vieka's solution and it's works, I made the attributes like a drop down menu so the customer can choose what's attribute they want to order,however, after hitting the "Add to cart" button, it didn't display the attribute I've chose. It displays the default attribute and not what I've chosen. Please help! Link to comment Share on other sites More sharing options...
olivier75 Posted March 14, 2016 Share Posted March 14, 2016 Hi, I know that topic is solved, but I have problem related to it, and I can't make it work. My prestashop version is 1.6.0.14, and I created a hook in my database - I checked it exist. I already add attributes module from Vekia and paste a hook: {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {hook h="displayProductPriceBlock" product=$product type="old_price"} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {hook h="displayProductOnList" product=$product} in product-list.tpl file... but it don't work My shop: http://nikboutique.com/12-mezczyzna I want in my product grid on hover appear avilable sizes above the price. Thanks in advance for any help!!! Adriana Hi, I visited your site, and likes the way you display sizes on hover. How did you manage to do it ? Thanks to everyone for sharing helps !! Thanks Link to comment Share on other sites More sharing options...
kassimi.hn Posted March 18, 2016 Share Posted March 18, 2016 it will not be as easy as it seems, but it's possible. i can do it step by step with you. for the first please create new hook, call it, for exaple displayProductOnList and insert {Hook::exec('displayProductOnList')} to the product-list.tpl file for example, right below the: {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <span class="exclusive"><span></span>{l s='Add to cart'}</span><br /> {/if} {/if} {Hook::exec('displayProductOnList')} if it will be ready, let me know Hi , I'm new on prestashop I have found your solution while searching on the net, what I want to do is to show the size on product listing but I don't know how to do this : create new hook, call it, for exaple displayProductOnList.Can you help me please Link to comment Share on other sites More sharing options...
kineas Posted April 24, 2016 Share Posted April 24, 2016 Hello! Veka, did you make an updated version of the module? I have been trying (and failed) to implement this as well couple times... Would be very helpful for displaying product attributes on the product-list. Link to comment Share on other sites More sharing options...
vekia Posted April 26, 2016 Share Posted April 26, 2016 and what is your prestashop version ? exact number Link to comment Share on other sites More sharing options...
kineas Posted April 26, 2016 Share Posted April 26, 2016 1.6.1.4 ! To be clear I haven't installed your module, having read the entire topic and saw that you where preparing a "non-beta" version. So far I tried to modify the code in the product-list.tpl by taking the same code as in the product.tpl in order to call the variables for attributes. I have to admit not being an expert in development and seing all the discussion here I was a bit confused about the outcome of the subject... Link to comment Share on other sites More sharing options...
kineas Posted May 7, 2016 Share Posted May 7, 2016 Coming back here :-) I realize I wasn't clear enough actually. So yes, the module works just fine. But it only displays the available features. --> Is there a way of, basically, being able to select the feature you want on the product-list, to avoid going on the product page? Basically, I would like the right-column of the product list to be the same as the right column of the product-page --> so no need to click on a product in order to buy it with the feature you want. Link to comment Share on other sites More sharing options...
kineas Posted May 16, 2016 Share Posted May 16, 2016 no one? vekia? I know, I'm persistent ^^ Link to comment Share on other sites More sharing options...
informatikadomicile Posted May 17, 2016 Share Posted May 17, 2016 Hello we're looking for the same way on PS 1.6.0.5 Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2016 Share Posted May 17, 2016 Coming back here :-) I realize I wasn't clear enough actually. So yes, the module works just fine. But it only displays the available features. --> Is there a way of, basically, being able to select the feature you want on the product-list, to avoid going on the product page? Basically, I would like the right-column of the product list to be the same as the right column of the product-page --> so no need to click on a product in order to buy it with the feature you want. with this free modification it is not possible. It requires custom development. Hello we're looking for the same way on PS 1.6.0.5 this is free module that i no longer develop doesnt have this feature. if you want such feature it requires custom development Link to comment Share on other sites More sharing options...
kineas Posted May 20, 2016 Share Posted May 20, 2016 (edited) Hi Vekia -- following this conversation in private message If you agree Edited May 20, 2016 by kineas (see edit history) Link to comment Share on other sites More sharing options...
PatBK Posted June 3, 2016 Share Posted June 3, 2016 Hi, how do I get this in 1.6.1.5? ok now in product-list.tpl change {Hook::exec('displayProductOnList')} to {Hook::exec('displayProductOnList', $product)} (it was my mistake) and install this module that i created: https://www.dropbox.com/s/vvigcko4ypicws9/attributes.zip Link to comment Share on other sites More sharing options...
siledzik Posted October 25, 2016 Share Posted October 25, 2016 hello I use variable {$v.attribute_name} in the combinations.tpl and it shown me all available combinations, but i want to make another line with only first attribute like 1kg. What variable i have to use to show only first attribute? I want to make a line that price is for 1kg and other attributes is 2kg 5kg etc. I hope it is clear Link to comment Share on other sites More sharing options...
spc Posted November 5, 2016 Share Posted November 5, 2016 HelloI use PS 1.6.1.4 and it works great, but wondering one thing, is it possible to get it to product.tplIt´s take so mutch size from my product-list.tplAnd if it possible to show :Available sizes:1, size 1, size 2, size 3, size 42, size 1, size 2, size 3, size 4, size 5Becuse now i have so trubble to show witch options is Available or not.http://prntscr.com/d3g03x Link to comment Share on other sites More sharing options...
Kaper Posted December 4, 2016 Share Posted December 4, 2016 (edited) Hello, please i just want to ask for one thing. I need to show combinations for products which are allowed for back ordering. Can you please help me , what to edit in php or tpl? Thank you so much. Now it is showing attributes but on products, which are in stock. THANKS !!! Edited December 4, 2016 by Kaper (see edit history) Link to comment Share on other sites More sharing options...
ghristo Posted January 23, 2017 Share Posted January 23, 2017 There is any update to work with cache enabled? (PS 1.6) Link to comment Share on other sites More sharing options...
PrestaShark Posted January 23, 2017 Share Posted January 23, 2017 Hi. Just buy this module https://codecanyon.net/item/flexible-size-guidechart-sizes-on-product-list/9785987 This is component from one of the most popular Prestashop theme EVER - WEREHOUSE by IQIT and works flawlessly Link to comment Share on other sites More sharing options...
Agnieszka1983 Posted February 12, 2017 Share Posted February 12, 2017 (edited) Hi ! I use this module in version 1.6.1.10 and works well on the product list with filters, while on the main page in the news, promotions ... does not work well on all products will be the same size. When the first time I'm on the main page is ok, but when I'm on the product list by category and back to the main page then all products will be the same size. Any idea? {if $PS_STOCK_MANAGEMENT && isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)} <span class="unvisible"> {if ($product.allow_oosp || $product.quantity > 0)} <link itemprop="availability" href="https://schema.org/InStock" />{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if} {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <link itemprop="availability" href="https://schema.org/LimitedAvailability" />{l s='Product available with different options'} {else} <link itemprop="availability" href="https://schema.org/OutOfStock" />{l s='Out of stock'} {/if} </span> {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {Hook::exec('displayProductOnList', $product)} Edited February 12, 2017 by Agnieszka1983 (see edit history) Link to comment Share on other sites More sharing options...
xaker Posted April 19, 2017 Share Posted April 19, 2017 ohh i missed this topic, anyway glad to hear that it works. so, finally we have working solution i will release free module based on this topic, it's worth to publish it any suggestions? Hello Vekia! I'm still waiting for your free module where i can find it? Thx a lot Link to comment Share on other sites More sharing options...
JulienGo Posted March 21, 2019 Share Posted March 21, 2019 Hello ! I'm using 1.7.5.1 and i can't figure out how to do, someone can help ? Thank you. Link to comment Share on other sites More sharing options...
jsballarini Posted October 24, 2019 Share Posted October 24, 2019 Folowing for 1.7.6.1 Link to comment Share on other sites More sharing options...
PrestaShark Posted October 24, 2019 Share Posted October 24, 2019 https://www.sunnytoo.com/28109/show-product-attributes-product-listing-pages-homepage-free-prestashop-1-7-module Link to comment Share on other sites More sharing options...
Doopz Posted April 11, 2020 Share Posted April 11, 2020 Using PS 1.6.1.24 - did my best to follow steps for my PS version, but does not seem to display. Perhaps I missed something or did it wrong. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now