Post by aljawaid » Fri Oct 16, 2015 4:04 am

Hello

I've searched everywhere and cant find a way to put the categories a product is filed under to show on the product page in OC2.0.3.1

There is a forum topic on it with code for v1.5x but it doesn't work for v2.0.3.1

Has anybody implemented this?
Last edited by aljawaid on Sun Oct 18, 2015 9:30 pm, edited 1 time in total.

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by viethemes » Fri Oct 16, 2015 9:25 pm

Are you using the default theme or a custom theme?
I can make a extension on the default theme.

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by aljawaid » Sat Oct 17, 2015 12:14 am

hello thanks for your message.

I wasn't looking for a paid extension as such though.... but if I know the code to check and replace I would learn more. I'm learning about vqmod which is cool but the code to find to replace isn't so easy always lol.

I'm confused why categories, just like other elements don't show in the core default templates as it is.

I'm on a default template.

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by aljawaid » Sun Oct 18, 2015 5:01 am

Does anyone have any input on this?

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by uksitebuilder » Sun Oct 18, 2015 4:13 pm

Please link the 1.5.x forum topic

The code will be very similar I would think, maybe just need a slight tweak

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by aljawaid » Sun Oct 18, 2015 6:21 pm


Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by uksitebuilder » Sun Oct 18, 2015 6:44 pm

The extension linked to on that post cannot be found

Do you have it ?

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by aljawaid » Sun Oct 18, 2015 6:49 pm

Hello

No but the link within that post may help. It's a vqmod guide but obviously doesnt work for 2.0.3.1

http://forum.opencart.com/viewtopic.php?f=131&t=109349

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by uksitebuilder » Sun Oct 18, 2015 7:35 pm

Here you go for 2.0.3.1 (not tested other versions)

Attachments


ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by aljawaid » Sun Oct 18, 2015 8:11 pm

wow, amazing and fast as always...thanks alot honestly.

Quick one though, will this show if a product is assigned to multiple categories also?

Will check it out when i get home

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by uksitebuilder » Sun Oct 18, 2015 8:29 pm

Will list all linked categories

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by aljawaid » Sun Oct 18, 2015 9:29 pm

it works, I tweaked it for the position on the page but it works fantastic.

Thank you once again. I just dont understand why this kind of stuff is not part of the core but oh well, that's another story lol

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by teclive » Thu Feb 18, 2016 1:58 am

Could this work for 2.1.0.1?

New member

Posts

Joined
Fri Jul 09, 2010 2:29 am

Post by dharam81 » Wed Sep 28, 2016 9:17 pm

This seems not working on 2.3.0.2 version

any update please?

Active Member

Posts

Joined
Mon Apr 30, 2012 8:26 pm

Post by IP_CAM » Thu Sep 29, 2016 7:25 am

I reworked some potentially 'problemsome' Anchor-Tags/Sections, and it works well in my OC v.2.2
Ernie

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Show Linked Categories on Product page</id>
<version>1</version>
<vqmver>2.5.1</vqmver>
<author>http://www.opencart-extensions.co.uk</author>

<file name="catalog/controller/product/product.php">
<operation error="log">
<search position="after" index="1"><![CDATA[$product_info = $this->model_catalog_product->getProduct($product_id);]]></search>
<add><![CDATA[
	$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']);
	$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;
	}
]]></add>
</operation>

<operation error="log">
<search position="before"><![CDATA[$data['manufacturer'] = $product_info['manufacturer'];]]></search>
<add><![CDATA[
	$data['linked_categories'] = $linked_categories;
]]></add>
</operation>
</file>

<file name="catalog/language/*/product/product.php">
<operation error="log">
<search position="before"><![CDATA[$_['text_manufacturer']]]></search>
<add><![CDATA[
	$_['text_linked_categories']        = 'Categories:';
]]></add>
</operation>
</file>

<file name="catalog/view/theme/*/template/product/product.tpl">
<operation error="log">
<search position="before"><![CDATA[<li><?php echo $text_model; ?> <?php echo $model; ?></li>]]></search>
<add><![CDATA[
	<?php if( $linked_categories ){ ?>
	<li><?php echo $text_linked_categories; ?> 
	<?php foreach( $linked_categories as $linked_category ){ ?>
	<a href="<?php echo $linked_category['href']; ?>"><?php echo $linked_category['name']; ?></a>&nbsp;
	<?php } ?>
	</li>
	<?php } ?>
]]></add>
</operation>
</file>
</modification>
---
to be seen here momentarely (only, because I use another Mod for this! :D ):
http://www.bigmax.ch/oc22/index.php?rou ... duct_id=40
---

Ernie's OpenShop v.1.75 + OpenCart v.1.5.6.5 LIGHT Test Sites with free responsive Themes
http://www.bigmax.ch/shop/ - http://www.ebikes.li - http://www.ipc.li/shop/ - http://www.openshop.li/shop/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Thu Sep 29, 2016 7:37 am

dharam81 wrote:This seems not working on 2.3.0.2 version, any update please?
Usually, those, who cannot live, without belonging to the TOP, have to pay,
to keep their Frontrunner-Status ;D
Ernie

Ernie's OpenShop v.1.75 + OpenCart v.1.5.6.5 LIGHT Test Sites with free responsive Themes
http://www.bigmax.ch/shop/ - http://www.ebikes.li - http://www.ipc.li/shop/ - http://www.openshop.li/shop/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by dharam81 » Thu Sep 29, 2016 8:49 pm

Hi Ernie,

this one worked for me thanks you are champion.

Cheers

Active Member

Posts

Joined
Mon Apr 30, 2012 8:26 pm

Post by u22im » Sun May 14, 2017 1:35 pm

it's work for 2.0.3.1

I uploaded .xml >> vqmod
and then I must add code in .xml file to source ( find file follow xml for custom theme )

And it's work!

Thanks

Newbie

Posts

Joined
Mon Dec 27, 2010 9:45 am
Who is online

Users browsing this forum: No registered users and 12 guests