Pepperama Posted October 27, 2010 Share Posted October 27, 2010 I have completed my cart but on a combination product the Add To Cart button is greyed out. How can I fix this?I am capable of editing code if it needs to be done.My site address is www.thecougarshop.eastkeilorfc.com Link to comment Share on other sites More sharing options...
rocky Posted October 28, 2010 Share Posted October 28, 2010 I can't find any disabled "Add to cart" buttons. I did notice that the "Add to cart" button was hidden for a few combinations though. From the message "Availability:The product does not exist in this model. Please choose another.", it seems you haven't created that combination on the "3. Combinations" tab. Can you provide a link to the product that has a disabled "Add to cart" button? Link to comment Share on other sites More sharing options...
Pepperama Posted October 28, 2010 Author Share Posted October 28, 2010 On the front page of the site on the second row is the pee season singleton that can be personalised. You will see the button isn't active on the home page. Link to comment Share on other sites More sharing options...
rocky Posted October 28, 2010 Share Posted October 28, 2010 I see it now. It looks like PrestaShop decided to disable the "Add to cart" button whenever a product has customisation enabled. That makes sense if it is the customisation is required before adding to the cart. It seems that your customisation is optional though. To enable the "Add to cart" button for personalised products, change line 20 of modules/homefeatured/homefeatured.tpl and line 21 of themes/prestashop/product-list.tpl from: {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} to: {*{if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2}*}{if $product.quantity > 0 OR $product.allow_oosp} This will remove the customisation check, but keep the old code there for your reference. Link to comment Share on other sites More sharing options...
Pepperama Posted October 28, 2010 Author Share Posted October 28, 2010 I has aslo happened on the category page as well (see link below);http://www.thecougarshop.eastkeilorfc.com/category.php?id_category=5What page do I need to edit? Link to comment Share on other sites More sharing options...
rocky Posted October 28, 2010 Share Posted October 28, 2010 I guess you missed the second file I mentioned above. It is line 21 of themes/prestashop/product-list.tpl that you need to change in the same way. Link to comment Share on other sites More sharing options...
Pepperama Posted October 28, 2010 Author Share Posted October 28, 2010 I have changed it. See below: > {if isset($products)} <!-- Products list --> </pre> <ul> {foreach from=$products item=product name=products} getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" /> {if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {*{if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2}*}{if $product.quantity > 0 OR $product.allow_oosp}{l s='Available'}{else}{l s='Out of stock'}{/if} {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Add to cart'} {else} {l s='Add to cart'} {/if} {l s='View'} {/foreach} </ul> <br> <!-- /Products list --><br>{/if Link to comment Share on other sites More sharing options...
rocky Posted October 28, 2010 Share Posted October 28, 2010 You changed the wrong line. You should change the one two lines down from that one. Link to comment Share on other sites More sharing options...
scumdk Posted November 1, 2010 Share Posted November 1, 2010 I seem to have the same problem as Pepper, only the solution you posted here isnt working out for me rocky :-(I have 2 Attribute Groups. 1 named Color and 1 named Sizes. When i add a product, i select ex. White and Black. Then i put in 3 sizes, Small, Medium and Large. If i havent added a combination with Black AND large, the system will tell me that the combination i selected isnt avalable.Is there a way to completely turn this feature off, as i have to edit and modify about 200 products if not? :-(I really hope u can help me out. Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 So you want the customer to be able to add out-of-stock products to the cart? You edit the product and change "When out of stock" to "Allow orders". Link to comment Share on other sites More sharing options...
scumdk Posted November 1, 2010 Share Posted November 1, 2010 Yes i do and thats allready done. What i want is customers to select and add customized products to cart that dont exist as a combination in the attributes/groups.I have 2 Attribute groups. 1 is Color and 1 is Sizes. These 2 attribute groups have all the sizes and colors of all product in the shop, independant of each other. So when put a product on my shop i add 3 colors and 3 sizes to the drop downs and the customer can freely choose from the options.i hope this makes sense.... :-) Link to comment Share on other sites More sharing options...
scumdk Posted November 1, 2010 Share Posted November 1, 2010 Maybe in other words i dont want the shop to hide the add-to-cart button if a product is not in stock, not the right combination of attributes or the likes of that :-) Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 You can display the "Add to cart" button when a combination is out of stock, but I'm not sure whether it is possible to display the "Add to cart" button for combinations that don't exist. Try going to Preferences > Products and changing "Display unavailable product attributes on product page" to "Yes". If that doesn't work, your only choice is to use the "Product combinations generator" to generate the missing combinations. Link to comment Share on other sites More sharing options...
scumdk Posted November 1, 2010 Share Posted November 1, 2010 That is allready set to yes and im afraid didnt help me :-(Isnt it possible to Disable the check completely? No matter what combination i pick from the 2 dropdowns, the shop shall not check to see if that spcific product is in stock, available or anything else. Just show that Add-to-Cart button 100% allways Thanks for your inputs so far, i really appreciate it. Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 No, since PrestaShop requires an existing id_product_attribute to display the combination in the cart and order. Without it, you'll end up adding the product to the cart without any attributes selected. 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