Hi
I am building a book specific site on localhost with Opencart 3.0.2.0 and will have a 'manufacturer's' list which is a list of authors.of around 500. Everything is fine with the language files all changed appropriately, but I want to be able to quickly see if there is an author's image with each entry. I therefore want to place the manufacturer's logo on the Manufacturer's list, just before the name.
I have looked at the 'manufacturer list twig file in admin\view\template\catalog\' and have changed it thus;
<tbody>
{% if manufacturers %}
{% for manufacturer in manufacturers %}
<tr>
<td class="text-center">{% if manufacturer.manufacturer_id in selected %}
<input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" />
{% endif %}</td>
<td class="text-left"> <a href="" id="manufacturer-image" data-toggle="image" class="img-thumbnail"><img src="{{ manufacturer.image}}" alt="" /></a></td>
<td class="text-left">{{ manufacturer.name }}</td>
<td class="text-right">{{ manufacturer.sort_order }}</td>
<td class="text-right"><a href="{{ manufacturer.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
The placeholder has a link to load an image file but it is not retained when list closed. Can anybody help to show me what I need to do to get the manufacturer image to automatically appear from the database and to remain.
Grateful for any help.
What about something like this?
Code: Select all
{% if manufacturer_logo and manufacturer_url and manufacturer_name %}
<a href="{{ manufacturer_url }}"><img src="{{ manufacturer_logo }}" alt="{{ manufacturer_name }}" title="{{ manufacturer_name }}"></a>
{% endif %}
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Guru Member
Well, inspired by you
Take a look here: Tutorial - Add Manufacturer image to Admin Panel
viewtopic.php?f=202&t=207184
Take a look here: Tutorial - Add Manufacturer image to Admin Panel
viewtopic.php?f=202&t=207184
Thanks Guys,
The first suggestion did not produce any result but the second worked perfectly.
Thank you for your help. I had searched the forum for a solution and dd not come across that post. So thank you for pointing it out.
Really appreciated.
Subbie
The first suggestion did not produce any result but the second worked perfectly.
Thank you for your help. I had searched the forum for a solution and dd not come across that post. So thank you for pointing it out.
Really appreciated.
Subbie
You are welcome
Who is online
Users browsing this forum: No registered users and 519 guests