isaque Posted July 5, 2009 Share Posted July 5, 2009 Hi,My store is about clothes and i want to show in product list instead "add to cart" the dropdown list to select the size. After user select the size from drop down, when click, add to cart.I was on product-list tpl file, i think i saw the lines to change, but i dont know how, if somebody can help me...I think the code to change is this one: {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if} {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='View'} {l s='Add to cart'} {else} {l s='Add to cart'} {/if} And maybe the solution is add something like: {foreach from=$groups key=id_attribute_group item=group} {$group.name|escape:'htmlall':'UTF-8'} : {assign var='groupName' value='group_'|cat:$id_attribute_group} {foreach from=$group.attributes key=id_attribute item=group_attribute} {$group_attribute|escape:'htmlall':'UTF-8'} {/foreach} {/foreach} But with a href code, to when user click on size add it to cart.I was some time around it but i nothing....If you can, please help me. Link to comment Share on other sites More sharing options...
bykrmom Posted September 9, 2009 Share Posted September 9, 2009 I had something similar - I wanted the person to go to the product page to order (with sizes, colors, etc) and not try to order from the product-list page. You can force this behavior by removing the "add to cart" function from the product-list.tpl. You do this by altering the following lines in product-list.tpl: {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} <!-- {l s='Add to cart'} --> {else} This isn't the ultimate solution you were looking for, but the end result is the same. Your customer won't be able to order from the product list, but instead will have to view the actual product listing (and see the choices of attributes) before they can purchase.(The code between <!-- and --> will not be viewed in the product list ) Link to comment Share on other sites More sharing options...
Recommended Posts