Jump to content

"ADD TO CART" appears even if option set to No


Recommended Posts

Hi All,
 
I'm building my first Prestashop for a business I'm starting.
 
I'm using V1.5.6.2
 
I'm having a strange problem with ADD TO CART text appearing on an out of stock product.
 
It's not an Add to cart button, but just text with a bounding box around it.
 
It doesn't have the style attributes that I applied to my functional ADD TO CART button which works just fine on my in stock products.
 
In the BO, under 'Preferences > Products > Products stock' I selected 'No' for Allow ordering of out-of-stock products
 
When I select 'Yes' my functional ADD TO CART button replaces the text and has the proper style applied.
 

This is the relevant code that is driving the errant text:

 

{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}

<p id="add_to_cart" class="buttons_bottom_block">
<span class="exclusive">
{l s='Add to cart'}
</span>
</p>
{else}
<p id="add_to_cart" class="buttons_bottom_block">
<input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" />
</p>
{/if}
</form>
{/if}

 

Can anyone suggest what might be going wrong?

 

Thanks.

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

Well, I seem to have solved it but I don't know what, if any, repercussions there might be in the future.

 

I just commented out the first part of the loop.

 

{*<p id="add_to_cart" class="buttons_bottom_block">
<span class="exclusive">
{l s='Add to cart'}
</span>
</p>*}

 

I also have no idea where this problem stems from.

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