Manufacturer's image in admin list
Posted: Mon Sep 24, 2018 4:12 pm
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.
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.