Jump to content

Add To Cart button grayed out


Recommended Posts

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

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

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

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...