Page 2 of 2

Re: Category on Product Page? [SOLVED]

Posted: Wed Sep 26, 2018 1:32 pm
by Stergios
Hello,

I have tried your ocmod at Version 3.0.2.0 but didn't work.
Mention that I edit the operation <file path="catalog/view/theme/*/template/product/product.twig"> to fit with my custom theme.
No errors but category link does not appear in product page.
Maybe something is change at Version 3.0.2.0.

Any ideas?
Thanks in advance!

Re: Category on Product Page? [SOLVED]

Posted: Wed Sep 26, 2018 2:52 pm
by kestas
After you installing something do not forget refresh admin modifications and clear cache in admin dashboard.

Re: Category on Product Page? [SOLVED]

Posted: Sat Jun 08, 2019 1:56 am
by ktran
Hi there, any chance to have this working on Journal 3, OC 2.3.0.2? I am not too great with coding but would love to have a category link just under "Brand" on the standalone product page :)

Re: Category on Product Page? [SOLVED]

Posted: Sat Jun 08, 2019 9:02 am
by IP_CAM
You'll sure find one, by posting a request in the commercial Forum
for this.
Ernie

Re: Category on Product Page?OC version 3.0.x

Posted: Mon Oct 05, 2020 7:20 am
by aitechbg
Amazing work done here! Ataching same file modded for Journal 3 theme.
kestas wrote:
Thu Sep 13, 2018 6:46 pm
jfn99 wrote:
Thu Sep 13, 2018 3:13 pm
How can I do this on opencart version 3? anyone?
thanks
download and enjoy :) there I have rewrote code which was placed by Ernie ;)

Cheers

Re: Category on Product Page?OC version 3.0.x

Posted: Tue Jul 06, 2021 6:45 pm
by MrBasic
Hi Kestas,

I modified the code for working with Journal3 and it's working great. Thanks for this.
But I only need the last category displayed. Can you please help?
kestas wrote:
Thu Sep 13, 2018 6:46 pm
jfn99 wrote:
Thu Sep 13, 2018 3:13 pm
How can I do this on opencart version 3? anyone?
thanks
download and enjoy :) there I have rewrote code which was placed by Ernie ;)

Cheers

Re: Category on Product Page? [SOLVED]

Posted: Tue Dec 14, 2021 9:29 pm
by stanpollster
Hi there,
When I install this module, the category not show on product page.
Before I install, I make the necessary changes in file paths.
After installation, this module is missing in modifications.
Please help me to fix this,
Thank you!

Opencart ver. 3.0.3.8
Journal ver 3.1.8

Re: Category on Product Page? [SOLVED]

Posted: Sat Feb 26, 2022 6:27 am
by sogrbilja
I had a problem with some products so I had to change this code a bit:

Code: Select all

        $data['text_linked_categories'] = $this->language->get('text_linked_categories');
        $query_linked_categories = $this->model_catalog_product->getCategories($product_id);
        $linked_categories = array();
        foreach( $query_linked_categories as $linked_category_data ) {
          $linked_category = $this->model_catalog_category->getCategory($linked_category_data['category_id']);
          if (!empty($linked_category)){
            $linked_category_info['id'] = $linked_category_data['category_id'];
            $linked_category_info['href'] = $this->url->link('product/category', 'path=' . $linked_category_data['category_id']);
            $linked_category_info['name'] = $linked_category['name'];
            $linked_categories[] = $linked_category_info;
          }
        }