Displaying manufacturer name on a product details page

Can someone explain how to display Manufacturer logo with link on Product Detail page may be top at product image ?



or is this work for 2.X ?



[url]CS-Cart Documentation — CS-Cart 4.15.x documentation

This will put the manufacturer image on the right side of the top of the page directly accross from the sku number.



First create a file called:



skins/your-skin/customer/views/products/components/product_image.tpl



put in this code:


{* $Id: product_features.tpl 7450 2009-05-08 06:00:56Z angel $ *}

{foreach from=$product_features item="feature"}
{if $feature.feature_type != "G"}
{strip}
{if $feature.prefix}{$feature.prefix}{/if}
{if $feature.feature_type == "S" || $feature.feature_type == "E"}
{foreach from=$feature.variants item="var"}
{if $var.selected} {if $var.image_pair}


{include file="common_templates/image.tpl" images=$var.image_pair object_type="feature_variant image_width=50px image_height=50px}

{/if}{/if}
{/foreach}
{else}
{$feature.value|default:"-"}
{/if}
{if $feature.suffix}{$feature.suffix}{/if}
{/strip}
{/if}
{/foreach}




You will notice that I set the width and hight to 50px. Depending on the size of your images this might work. There probably is a better way of doing this, but I don’t know it.



Edit skins/your-skin/customer/views/products/components/buy_now.tpl



Below:


{/if}
{if $product.avail_since > $smarty.const.TIME}
{include file="common_templates/coming_soon_notice.tpl" avail_date=$product.avail_since add_to_cart=$product.buy_in_advance}
{/if}
{/if}
{/capture}




Put:


{if $product.product_features}


{include file="views/products/components/product_image.tpl" product_features=$product.product_features details_page=true}

{/if}




You will notice that I used the class float-right. If you want the location somehow different you could probably just change this to your own class.



I hope this helps,



Brandon

Hi Brandon,



I have read the code but I didn’t understand it. On which location do you set the manufacturer image, on the features page?

When I set up my manufacturers I chose these options:







To add an image I filled out this stuff:







I hope this helps,



Brandon

Thank you, I iadded the code but I get an error message, see: [url]http://www.maridonbv.nl/maridonbv/voetbescherming/grisport-703l-s3.html[/url]



Do you know how I can fix this?

I honestly don’t know. I just tried this mod again and it worked fine on the basic skin. Maybe you didn’t copy everything over right?



Brandon

[quote name=‘brandonvd’]Edit skins/your-skin/customer/views/products/components/buy_now.tpl[/QUOTE]

There is no buy_now.tpl at all :slight_smile:

[quote name=‘moro1’]There is no buy_now.tpl at all :)[/QUOTE]

True, the code has changed since this tip was written six months ago. However, a quick search of the code tree turns up this exact block of code in /skins/YOURSKIN/customer/common_templates/product_data.tpl. Try making the changes there.



Bob

[quote name=‘jobosales’]True, the code has changed since this tip was written six months ago. However, a quick search of the code tree turns up this exact block of code in /skins/YOURSKIN/customer/common_templates/product_data.tpl. Try making the changes there.



Bob[/QUOTE]

I have tried, it doesn’t work.

Hi for all that tried and didn’t get it to work, there was actually some typos in the code provided.



Here is the code to use (works on 2.0.15)



{* $Id: product_features.tpl 7450 2009-05-08 06:00:56Z angel $ *}



{foreach from=$product_features item=“feature”}

{if $feature.feature_type != “G”}

{strip}

{if $feature.prefix}{$feature.prefix}{/if}

{if $feature.feature_type == “S” || $feature.feature_type == “E”}

{foreach from=$feature.variants item=“var”}

{if $var.selected} {if $var.image_pair}



{include file=“common_templates/image.tpl” images=$var.image_pair object_type=“feature_variant” image_width=50}



{/if}{/if}

{/foreach}

{else}

{$feature.value|default:“-”}

{/if}

{if $feature.suffix}{$feature.suffix}{/if}

{/strip}

{/if}

{/foreach}

So I just realized there was these ‘extended’ product features, which is great, but what normally links to it? Besides this mod, how are people supposed to find a link to the index.php?dispatch=product_features.view&variant_id=## ?



Is there a page that lists all the variants for a feature?



EDIT:

Ok, I found the product filter block. Apparently that’s the only place, yes?

In my case, I used this:



{include file=“common_templates/image.tpl” images=$var.image_pair object_type=“feature_variant” image_width=85}



Hope it helps

I know this is a very old topic but this is exactly what I’m looking for and wondered if anyone has this working in 2.1.x at all? The code above doesn’t appear to work. What is the point of the image in features setup anyhow as it’s never displayed anywhere?



Regards