Jump to content

Product in menu with multistore


Recommended Posts

Hi,

 

I create shop with multistore. There is 5 shops for different languages with little different products.

 

I display product in menu with script

{assign var="idpro" value=0}
				{foreach from=$products item=product}
					
					{if $product.id_category == $catid && $product.active == 1 && $product.id_product != $idpro}
						{assign var="idpro" value=$product.id_product}
						<li>
							<span class="arrow">></span><a href="{$link->getProductLink($product.id_product, $product.link_rewrite)|escape:'htmlall':'UTF-8'}">
							{$product.name|escape:'htmlall':'UTF-8'|truncate:50:'...'}
							</a> {if isset($product.on_sale) && $product.on_sale == 1}<span class="sale">SALE</span>{/if}
						</li>
					{/if}
				{/foreach}

, but this script display all products, too products not avalaible from choiced shop.

I want add to

{if $product.id_category == $catid && $product.active == 1 && $product.id_product != $idpro} 

condition that check if product is avalaible for this shop version.

 

 

Now half of products in menu are non avalaible because is assign for  other shops.

Link to comment
Share on other sites

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