Jump to content

Edit History

Ray UK

Ray UK

Ok so I have got a little further.

Ive got this far by doing this:

I created a add-to-cart-button.tpl and Inside the miniature/product.tpl i used this

{block name='product_variants'}
	{include file='catalog/_partials/add-to-cart-button.tpl' variants=$product.main_variants}
{/block}

and then used the condition

{if $variants|@count >1} 

Now this is working, but only for products that have colour attributes. (see pic)

image.png.c0cda867bc9ba25acb8a5be2d89d37f7.png

So is there another way of calling my add-to-cart-button.tpl that will also include other combinations and not just the colours. (in the example above this would include the paper types)

 

Ray UK

Ray UK

Ok so I have got a little further.

Ive got this far by doing this:

I created a add-to-cart-button.tpl and Inside the miniature/product.tpl i used this

{block name='product_variants'}
	{include file='catalog/_partials/<add-to-cart-button></add-to-cart-button>.tpl' variants=$product.main_variants}
{/block}

and then used the condition

{if $variants|@count >1} 

Now this is working, but only for products that have colour attributes. (see pic)

image.png.c0cda867bc9ba25acb8a5be2d89d37f7.png

So is there another way of calling my add-to-cart-button.tpl that will also include other combinations and not just the colours. (in the example above this would include the paper types)

 

Ray UK

Ray UK

Ok so I have got a little further.

Ive got this far by doing this:

I created a add-to-cart-button.tpl and Inside the miniature/product.tpl i used this

{block name='product_variants'}
	{include file='catalog/_partials/<add-to-cart-button></add-to-cart-button>.tpl' variants=$product.main_variants}
{/block}

and then used the condition

{if $variants|@count >1} 

Now this is working, but only for products that have colour attributes. (see pic)

image.png.c0cda867bc9ba25acb8a5be2d89d37f7.png

So is there another way of calling my add-to-cart-button.tpl that will also include other combinations.

 

Ray UK

Ray UK

Ok so I have got a little further.

So far I have this

 

Now the numbers, 2 0 3 4 4 0 is ths number of combinations for that products.

As you can see, they are only counting the number of colour variations and not the "Paper Types"

Ive got this far by doing this:

I created a add-to-cart-button.tpl and Inside the miniature/product.tpl i used this

{block name='product_variants'}
	{include file='catalog/_partials/<add-to-cart-button></add-to-cart-button>.tpl' variants=$product.main_variants}
{/block}

and then used the condition

{if $variants|@count >1} 

Now this is working, but only for products that have colour attributes. (see pic)

image.png.c0cda867bc9ba25acb8a5be2d89d37f7.png

So is there another way of calling my add-to-cart-button.tpl that will also include other combinations.

 

×
×
  • Create New...