Jump to content

image id returns nothing


Recommended Posts

Hi, I'm curently trying to add the wishlist to the shopping cart footer but I have an issue when I try to get the product image paht. Product name and link are returned without any problem but not the image id.

I'm using:

 

{foreach from=$wishlist_products key=i item=product name=prods}						
	<div style="{if $smarty.foreach.prods.index % 2 ==0 }background-color:#eff0f1;{else}background-color:#fff;{/if}">							
		<div>
			<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{l s='Product detail' mod='blockwishlist'}">
				<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'default')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" />
			</a>
		</div>								
		<div>
			<a class="cart_block_product_name" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{$product.name|escape:'html':'UTF-8'}">{$product.name|escape:'html':'UTF-8'}</a>
		</div>
		<div">
		        <a class="exclusive ajax_add_to_cart_button add-to-cart-in-wl" href="{$link->getPageLink('cart', true, NULL, 'qty={$product.quantity|intval}&id_product={$product.id_product|intval}&add')|escape:'html':'UTF-8'}" data-id-attribute="{$product.id_product_attribute}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{$product.quantity|intval}" title="{l s='Add to cart' mod='blockwishlist'}">
		                <span>{l s='Add to cart' mod='blockwishlist'}</span>
		        </a>
		</div>  													
	</div>
{/foreach}

I recieve: myshop.com/-default/PRODUCTNAME
while the link is correct and recieves the product id like: myshop.com/ID-default/PRODUCTNAME

Note: Product id and Image id are not the same. Some products have many images.
 

thanks in advance,

Link to comment
Share on other sites

  • 2 weeks 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...