Insert conditional statement
Posted: Thu Sep 03, 2009 1:37 am
Hi, I'm a total noob when it comes to php so was wondering if anyone here can help me with a simple request. I'm using PrestaShop and am trying to figure out a way to delete the words "Available" and "Add to cart" just in the Travel section of my website, but retain them in all the other sections. Here's the link to show you what I mean:
http://www.baby-international.com/35-travel
I understand that I need to identify that Travel section in the code somehow and insert a conditional statement? I've been playing around with the code without much luck. Can anyone nudge me in the right direction? Here's the snippet of php code that I think I need to modify somehow:
<span {if ($product.allow_oosp OR $product.quantity > 0)}class="availability"{else}class="outofstock"{/if}>{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}</span>
{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$base_dir}cart.php?add&id_product={$product.id_product|intval}&token={$static_token}">{l s='Add to cart'}</a>
{else}
<span class="exclusive">{l s='Add to cart'}</span>
Any help would be greatly appreciated. Many thanks.
http://www.baby-international.com/35-travel
I understand that I need to identify that Travel section in the code somehow and insert a conditional statement? I've been playing around with the code without much luck. Can anyone nudge me in the right direction? Here's the snippet of php code that I think I need to modify somehow:
<span {if ($product.allow_oosp OR $product.quantity > 0)}class="availability"{else}class="outofstock"{/if}>{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}</span>
{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$base_dir}cart.php?add&id_product={$product.id_product|intval}&token={$static_token}">{l s='Add to cart'}</a>
{else}
<span class="exclusive">{l s='Add to cart'}</span>
Any help would be greatly appreciated. Many thanks.