What's the abbreviation (like {{ text_manufacturer }} ) for MPN, EAN and weight?
Thank in advance!
find:
Code: Select all
$data['points'] = $product_info['points'];
Code: Select all
$data['mpn'] = html_entity_decode($product_info['mpn'], ENT_QUOTES, 'UTF-8');
$data['ean'] = html_entity_decode($product_info['ean'], ENT_QUOTES, 'UTF-8');
$data['weight'] = $this->weight->format($product_info['weight'], $this->config->get('config_weight_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point'));
add at the bottom:
Code: Select all
$_['text_mpn'] = 'MPN:';
$_['text_ean'] = 'EAN:';
$_['text_weight'] = 'Weight:';
Code: Select all
{% if mpn %}
{{ text_mpn}} {{ mpn }}
{% endif %}
{% if ean %}
{{text_ean}} {{ ean }}
{% endif %}
{% if weight %}
{{text_weight}} {{ weight }}
{% endif %}
Then, ensure to apply these steps: viewtopic.php?f=176&p=725084#p718325
This should resolved the issue.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
Thanks for the post as this is an issue I am looking at and cannot resolve. Here is the code that I am applying in the different files in context:
$data['product_id'] = (int)$this->request->get['product_id'];
$data['manufacturer'] = $product_info['manufacturer'];
$data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);
$data['model'] = $product_info['model'];
$data['reward'] = $product_info['reward'];
$data['points'] = $product_info['points'];
$data['mpn'] = html_entity_decode($product_info['mpn'], ENT_QUOTES, 'UTF-8');
$data['ean'] = html_entity_decode($product_info['ean'], ENT_QUOTES, 'UTF-8');
$data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES,
$_['text_week'] = 'week';
$_['text_semi_month'] = 'half-month';
$_['text_month'] = 'month';
$_['text_year'] = 'year';
$_['text_mpn'] = 'MPN:';
{% if additionalfields %}
{% for key, additionalfield in additionalfields %}
<li id="customfield-{{ key }}">
<span class="text-bold">{{ additionalfield.title }}:</span> {{ additionalfield.text }}
</li>
{% endfor %}
{% endif %}
{% if mpn %}
{{ text_mpn}} {{ mpn }}
{% endif %}
{% if ean %}
{{text_ean}} {{ ean }}
{% endif %}
<li><span class="text-bold">{{ text_stock }}</span> <span class="{{ stock_color }}-text text-darken-1 text-bold">{{
stock }}</span></li>
{% if type_remainder == 'numerical' %}
<li><span class="text-bold">{{ text_remainder }}</span>: {{ remainder }}</li>
{% endif %}
I have done all the refreshes on Mods/Dashboard and even clear vqmod caches but nothing seems to work. Can you advise? Opencart 3.0.2.0. Thanks for your attention.
The result in product page is:
Attachments
screen.png (12.07 KiB) Viewed 412 times
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
I am trying to get the mpn etc to appear on product page as this thread suggests. I have followed your instructions. The additional fields are not my construction they were there as part of the theme I am using. I simply added the code as described in the thread.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
Users browsing this forum: No registered users and 17 guests