Jump to content

Brands over the product title


Recommended Posts

Love community

 

I would like the logo of the manufacturer to appear above the product title. I have found some posts, but they are very old or the links to tutorials do not work.
Can someone help me here and say which file and especially which code needs to be added exactly to make sure the logo is displayed in the right place?

image.thumb.png.ed345802647e4b236864d216738f6a3a.png

 

i have the perstashop version 1.7.5.1 and i do not use the default template. 

 

thank in advance for your help.

Link to comment
Share on other sites

Hi..
you need to modify the product.tpl file which is locate in

themes/yourthemes/templates/catalog/product.tpl 

if you use "classic" default themes then put this code approx. line number  78 see image here

https://ibb.co/7C3f2xZ

{if isset($product_manufacturer->id)}
            <div class="product-manufacturer">
              {if isset($manufacturer_image_url)}
                <a href="{$product_brand_url}">
                  <img src="{$manufacturer_image_url}" class="img img-thumbnail manufacturer-logo" alt="{$product_manufacturer->name}">
                </a>
              {else}
                <label class="label">{l s='Brand' d='Shop.Theme.Catalog'}</label>
                <span>
                  <a href="{$product_brand_url}">{$product_manufacturer->name}</a>
                </span>
              {/if}
            </div>
            {/if}

Thanks

Link to comment
Share on other sites

vor 3 Stunden schrieb Nishith:

Hi..
you need to modify the product.tpl file which is locate in

themes/yourthemes/templates/catalog/product.tpl 

if you use "classic" default themes then put this code approx. line number  78 see image here

https://ibb.co/7C3f2xZ


{if isset($product_manufacturer->id)}
            <div class="product-manufacturer">
              {if isset($manufacturer_image_url)}
                <a href="{$product_brand_url}">
                  <img src="{$manufacturer_image_url}" class="img img-thumbnail manufacturer-logo" alt="{$product_manufacturer->name}">
                </a>
              {else}
                <label class="label">{l s='Brand' d='Shop.Theme.Catalog'}</label>
                <span>
                  <a href="{$product_brand_url}">{$product_manufacturer->name}</a>
                </span>
              {/if}
            </div>
            {/if}

Thanks

Hiii 

 

thank you very much, that was so helpful, i have add this code to my template and it works:

image.png.2d73336052a5445ee9e88f95c936c9a9.png

 

Can you tell me, how can i make a space between the Logo and the title? 

 

thanks in advanced for your help.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
Am 25.5.2019 um 7:41 AM schrieb Nishith:

Hi..
yes put this code in your themes custom.css end of the file which is locate in 

themes/yourthemes/assets/css/product.tpl 


.product-manufacturer{
  margin-bottom: 15px;
}

Thanks

Sorry for the delay. but that was the solutions. thank you very much 🙂

on the front site, are the products (featured, new Products, best sellers) in one row.

i want to add the manufacture logo an the thumbnails. an example is attached as a picture.

I think I have found the right file: /httpdocs/themes/PRS01/templates/catalog/_partials/miniatures/product.tpl

image.thumb.png.ffb2686fc9c1a91066af47519c5af82c.png

 

can you give me a hint what and where I have to insert exactly?

 

thank you in advance for your help.

 

dashmir

04-06-_2019_09-28-49.png

Link to comment
Share on other sites

i have an other question...

I want the brand before the product name, i think the variable are this here 

{$product_manufacturer->name}

this Variable have to be on this place: 

 <div class="col-md-6 pb-right-column">    
          {block name='page_header_container'}
            {block name='page_header'}
              <h1 class="h1 tt-producttitle" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1>
            {/block}
          {/block}

I do not know how to insert the variable so that it is displayed correctly.

/httpdocs/themes/PRS01/templates/catalog/product.tpl


Example
 

image.png.c65d6779df5bcbf1bba60fc2136cecd4.png

thanks in advance for your help

Link to comment
Share on other sites

Hi..you have right way going see below my code 

if you need display before the product name then put  like this 
 

{block name='page_header_container'}
    {block name='page_header'}
      <h1 class="h1 tt-producttitle" itemprop="name">
         {block name='page_title'}
            {if isset($product_manufacturer->id)}
                {$product_manufacturer->name} - {$product.name}
            {else}
                {$product.name}
            {/if}
        {/block}
      </h1>
    {/block}
{/block}

Thanks

Edited by Nishith (see edit history)
Link to comment
Share on other sites

vor 3 Stunden schrieb Nishith:

Hi..you have right way going see below my code 

if you need display before the product name then put  like this 
 


{block name='page_header_container'}
    {block name='page_header'}
      <h1 class="h1 tt-producttitle" itemprop="name">
         {block name='page_title'}
            {if isset($product_manufacturer->id)}
                {$product_manufacturer->name} - {$product.name}
            {else}
                {$product.name}
            {/if}
        {/block}
      </h1>
    {/block}
{/block}

Thanks

thank you very much. it works 🙂

 

 

Link to comment
Share on other sites

Am 4.6.2019 um 9:51 AM schrieb dashmir:

Sorry for the delay. but that was the solutions. thank you very much 🙂

on the front site, are the products (featured, new Products, best sellers) in one row.

i want to add the manufacture logo an the thumbnails. an example is attached as a picture.

I think I have found the right file: /httpdocs/themes/PRS01/templates/catalog/_partials/miniatures/product.tpl

image.thumb.png.ffb2686fc9c1a91066af47519c5af82c.png

 

can you give me a hint what and where I have to insert exactly?

 

thank you in advance for your help.

 

dashmir

04-06-_2019_09-28-49.png

 

 

do you have an idea for this request? 😐

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