Jump to content

Add to Cart button missing on Product List on Homepage when using "Minimum Quantities" option


lateral

Recommended Posts

Hi Everyone.

 

I am using version 1.6.1.23.

 

I have recently started using the Minimum Quantity option for a few of my Products.

 

Please note that I have translated the "Add to Cart" text to display "Add to My List".

 

I just noticed that Products with a Minimum Quantity greater than 1, do not display the "Add to My List" button on the Product List page but does display it on the actual Product page.

Everything else is working well and has been for sometime.

The Mounting Tabs have a Minimum Quantity of "1" and the Exhaust Nut have a Minimum Quantity of "8"

Any help will be greatly appreciated.

image.png.7a68372934f06e7a3f713fd0997c114d.png

Link to comment
Share on other sites

Hi

The issue looks connected to setting the Minimum Quantity to anything greater than “1”.  
 

Have you tried setting this with a Product in one of your test Backends to see if you can reproduce it?

 

I appreciate your help  

 

I have also checked the product-list.tpl and I think this block of code maybe where this issue is?

 

<div class="button-container">
                            {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 btn btn-default" href="{$link->getPageLink('cart',false, NULL, "add=1&amp;id_product={$product.id_product|intval}&amp;token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
                                            <span>{l s='Add to cart'}</span>
                                        </a>
                                    {else}
                                        <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart',false, NULL, 'add=1&amp;id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
                                            <span>{l s='Add to cart'}</span>
                                        </a>
                                    {/if}
                                {else}
                                    <span class="button ajax_add_to_cart_button btn btn-default disabled">
                                        <span>{l s='Add to cart'}</span>
                                    </span>
                                {/if}
                            {/if}
                            </br>
                            <a itemprop="url" class="button lnk_view btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
                                <span>{l s='More'}</span>
                            </a>
                        </div>

 

Cheers 

Greg

 

 

Edited by lateral (see edit history)
Link to comment
Share on other sites

The products do not have any attributes. 
 

I'm pretty sure the issue relates to setting the Minimum Quantity to greater than Zero. 
 

I’ve tried turning options on and off but no difference. 
 

Have you tested this on your own database?

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...