Post by mfadel » Wed Jan 03, 2018 6:49 pm

Hello everyone,

I have added this line to catalog/controller/product/category.php

Code: Select all

$data['string1'] = "string 1";
before this line

Code: Select all

$this->response->setOutput($this->load->view('product/category', $data));
and in catalog/view/theme/journal2/template/product/category.twig replaced

Code: Select all

 <h4 class="name"><a href="{{ product.href }}">{{ product.name }} </a></h4> 
with this line

Code: Select all

<h4 class="name"><a href="{{ product.href }}">{{ product.name }}  {{  string1 }} </a></h4>
I have removed caches from storage/cache, and set cache to none in developer options,
I have disabled twig cache also from Environment.php,
but it shows nothing, what did I miss?

Thanks in advance.

Newbie

Posts

Joined
Tue Oct 28, 2014 11:39 pm

Post by cyclops12 » Wed Jan 03, 2018 11:50 pm

Must be a cache problem as it works ok here

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by mfadel » Thu Jan 04, 2018 7:50 pm

Thanks, as you said it is a cache problem,
I have solved it, I forgot to refresh modification. That was the problem. Extension -> Modification -> refresh.

Newbie

Posts

Joined
Tue Oct 28, 2014 11:39 pm

Post by cyclops12 » Fri Jan 05, 2018 2:47 am

Glad its working for you now.
Versions 3. are bad for caching so any changes you make in futurer be sure to clear ALL caches

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 29 guests