Jump to content

Add to Cart Button / Options ?


Recommended Posts

Hi all,

 

Im looking at this piece of code on product-list.tpl

 

<p class="prodbutt">
{if ($product.allow_oosp || $product.quantity > 0)}
	   {if isset($static_token)}

				    <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", true)}" title="{l s='Add to cart'}">1{l s='Add to cart'}</a>
				    <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="button">View</a>
	   {else}
		   <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", true)}" title="{l s='Add to cart'}">2{l s='Add to cart'}</a>
	   {/if}					  
   {else}
	   <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="button">3Out of Stock</a>
{/if}
</p>

 

I see 3 options there

 

If the qty is above 0, do 1 or 2 ?

 

else do 3 (Out of stock)

 

what are the 1st 2 options ?

 

I do need 3 options here but cant figure it out.

 

1. Item in stock [ADD TO CART] [VIEW]

2. Item in stock with combinations [VIEW OPTIONS]

3. Item out of stock [OUT OF STOCK]

 

Does anybody know how I can modify this code to achieve this ?

 

The site I am trying to do this on is http://www.electroniccigarettee-liquid.co.uk/7-atomisers-tanks-parts

 

I have added 4 products to this.

 

I have the [OUT OF STOCK] working on the 2 products, but one of them shows a price of £0.00, yet the other shows the correct price ?

 

Any help is appreciated.

 

Ray

Link to comment
Share on other sites

  • 10 months later...

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