Post by BGamer » Tue Oct 22, 2019 8:26 pm

Hello, how do I show the product code in the category graph? ( list / grid ) I have seen old reviews but do not fit my version 3.0.2.0

Newbie

Posts

Joined
Tue Oct 23, 2018 7:56 pm

Post by DigitCart » Tue Oct 22, 2019 9:24 pm

Hi

in this file:
catalog\controller\product\category.php

Find:

Code: Select all

$data['products'][] = array(
Add after it:

Code: Select all

'model' => $result['model'],
in this file:
catalog\view\theme\default\template\product\category.twig

Find:

Code: Select all

<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
Add after it:

Code: Select all

{% if product.model is defined %}Product Code: {{ product.model }}{% endif %}
This is for default theme.
you may need to refresh the modification and clear the caches.

My Extensions / DigitCart


User avatar
Active Member
Online

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by BGamer » Wed Oct 23, 2019 3:09 pm

Thank you, this method works in 3.0.2.0 ::)

Newbie

Posts

Joined
Tue Oct 23, 2018 7:56 pm

Post by DigitCart » Wed Oct 23, 2019 4:39 pm

You are welcome.

My Extensions / DigitCart


User avatar
Active Member
Online

Posts

Joined
Thu Jun 22, 2017 5:32 pm

Who is online

Users browsing this forum: YaCy [Bot] and 9 guests