Post by alikhan99 » Mon May 25, 2020 1:58 am

Version 3.0.3.2
Hello friends,
I am trying to display manufacturer logo on manufacturer listing page. To do so i added the following line in;

catalog/controller/product/manufacture

Code: Select all

'logo' => $this->model_tool_image->resize($result['image'], 70, 70),
catalog/view/theme/*/template/product/manufacture twig

Code: Select all

	<div class="brandbox">
          {% if manufacturer.logo %}
          <a href="{{ manufacturer.href }}" class="brand-title-logo"><img src="{{ manufacturer.logo }}" alt="{{ manufacturer.name }}" class="img-fluid" /><span>{{ manufacturer.name }}</span></a>
          {% else %}
          <a href="{{ manufacturer.href }}" class="brand-title">{{ manufacturer.name }}</a>
          {% endif %}
          </div>
PROBLEM
Even those brands which do not have the logos, a text bases image appears in the place of image log, hence such brands showing double names, one as image and one as text.

Any help please, Thank you

Active Member

Posts

Joined
Fri Jun 29, 2012 4:57 pm

Post by letxobnav » Mon May 25, 2020 10:06 am

'logo' => ($result['image'] ? $this->model_tool_image->resize($result['image'], 70, 70) : false),

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by alikhan99 » Mon May 25, 2020 3:33 pm

letxobnav wrote:
Mon May 25, 2020 10:06 am
'logo' => ($result['image'] ? $this->model_tool_image->resize($result['image'], 70, 70) : false),
the problem seems to be that the path exists for images in default dummy data in OC even when logo does not exists. I had to manually remove the path to make this work.

Active Member

Posts

Joined
Fri Jun 29, 2012 4:57 pm
Who is online

Users browsing this forum: Google [Bot], OSWorX, pprmkr and 474 guests