Jump to content

When my product is out of stock there is a layout issue


Recommended Posts

Hi

 

Two of my products are out of stock, now on the category page, a cart tab appears with a cross below the image, this looks weird as the cart tab is not displayed on the other products which are available and it throws out the layout of the products.

 

I would like to remove this cart tab as you obviously can't add it to the basket when out of stock anyway, i believe this is the html:

 

<span class="exclusive">Add to cart</span>

 

but even when i delete this the tab is still there.

 

I hope this makes sense, I appreciate any advice

 

Thanks

Link to comment
Share on other sites

unfortunately im using 1.3 here is the file

 

 

{if isset($products)}

<!-- Products list -->

<ul id="product_list" class="clear">

{foreach from=$products item=product name=products}

<li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if}">

<div class="center_block">

<div style="height: 28px;">

{if $product.on_sale}

<span class="on_sale">{l s='On sale!'}</span>

{elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))}

<span class="discount">{l s='Price lowered!'}</span>

{else}

<br/>

{/if}

{if ($product.allow_oosp OR $product.quantity > 0)}<span class="availability">{l s='Available'}</span>{else}<span class="out_of_stock">{l s='Out of stock'}<span>{/if}

</div>

<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>

<h3>{if $product.new == 1}<span class="new">{l s='new'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.legend|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>

<!--<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p>-->

</div>

<div class="right_block">

{if !$priceDisplay || $priceDisplay == 2}

<div>

<span class="price" style="display: inline;">

{convertPrice price=$product.price}</span>

{if $priceDisplay == 2} {l s='+Tx'}{/if}

</div>{/if}

{if $priceDisplay}

<div><span class="price" style="display: inline;">

{convertPrice price=$product.price_tax_exc}</span>{if $priceDisplay == 2} {l s='-Tx'}{/if}

</div>{/if}

{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}

 

{else}

<span class="exclusive">{l s='Add to cart'}</span>

{/if}

 

</div>

<br class="clear"/>

</li>

{/foreach}

</ul>

 

 

thanks for your help!

Link to comment
Share on other sites

×
×
  • Create New...