Jump to content

[Solved] Can anyone explain to me why the 'Add to Cart' button displays in Catalog mode?


Recommended Posts

by default this button should disappear. It works like you said.

 

so here are several possibilities:

  1. you use non default theme which isn't supporting this feature
  2. this may be also related to shop "cache" issue, in this case you will have to recompile the theme / clear shop cache
  • Like 1
Link to comment
Share on other sites

it is odd...our private shop modules manipulate catalog mode by session, so I've certainly seen this before.  Most custom themes do not display the button, the default does.

 

themes/yourtheme/product.tpl

 

find this

			{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}
				<span class="exclusive">
					<span></span>
					{l s='Add to cart'}
				</span>
			{else}
				<p id="add_to_cart" class="buttons_bottom_block">
					<span></span>
					<input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" />
				</p>
			{/if}

and change it to

			{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}
			{else}
				<p id="add_to_cart" class="buttons_bottom_block">
					<span></span>
					<input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" />
				</p>
			{/if}

  • Like 1
Link to comment
Share on other sites

Okay, thanks. This fixed it. Looks dynamic as well because when switching off catalog mode, an add to cart button shows. Excellent.

 

Still not sure why default theme without modifying shows add to cart in catalog mode, but functionally it's good now, so I won't worry about why. Thanks again.

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

Okay, thanks. This fixed it. Looks dynamic as well because when switching off catalog mode, an add to cart button shows. Excellent.

 

Still not sure why default theme without modifying shows add to cart in catalog mode, but functionally it's good now, so I won't worry about why. Thanks again.

 

you are welcome...and if you ever need a catalog mode switch by session, check out my private shop modules.

Link to comment
Share on other sites

  • 4 months later...
×
×
  • Create New...