Jump to content

Manufacture Name


bilusunny

Recommended Posts

Try changing line 38 of admin/themes/default/template/controllers/orders/_product-line.tpl from:
			<span class="productName">{$product['product_name']}</span><br />

to:

			<span class="productName">{if $product['id_manufacturer'] > 0}{Manufacturer::getNameById($product['id_manufacturer'])} {/if}{$product['product_name']}</span><br />

This will add the manufacturer name in front of the product name.

Link to comment
Share on other sites

You can make a similar change in shopping-cart.tpl in your theme's directory by changing:

		<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute, false, false, true)|escape:'html':'UTF-8'}">{$product.name|escape:'html':'UTF-8'}</a></p>

to:

		<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute, false, false, true)|escape:'html':'UTF-8'}">">{if $product.id_manufacturer > 0}{Manufacturer::getNameById($product.id_manufacturer])} {/if}{$product.name|escape:'html':'UTF-8'}</a></p>

Though your custom theme may have different code.

 

You may want to change order-detail.tpl too.

Link to comment
Share on other sites

i see this in backoffice but how do I get it in the frontoffice?? Is this the code that I should be editing:line 119

 

<a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, null, $lastProductAdded.id_product_attribute)|escape:'html':'UTF-8'}">

Link to comment
Share on other sites

Yes, but it should be the <td>, not the <th>. Make sure you're editing shopping-cart-product-line.tpl, not shopping-cart.tpl. You should see a line like this under it:

		<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute, false, false, true)|escape:'html':'UTF-8'}">{$product.name|escape:'html':'UTF-8'}</a></p>
Link to comment
Share on other sites

td class="cart_description">

 

<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}">{$product.name|escape:'html':'UTF-8'}</a></p>

 

        {if $product.reference}<small class="cart_ref">{l s='SKU'} : {$product.reference|escape:'html':'UTF-8'}</small>{/if}

 

{if isset($product.attributes) && $product.attributes}<small><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}">{$product.attributes|escape:'html':'UTF-8'}</a></small>{/if}

 

</td>

 

 

Is this the one??

Link to comment
Share on other sites

That's it. Change:

<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}">{$product.name|escape:'html':'UTF-8'}</a></p>

to:

<p class="product-name"><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}">{if $product.id_manufacturer > 0}{Manufacturer::getNameById($product.id_manufacturer)} {/if}{$product.name|escape:'html':'UTF-8'}</a></p>
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...