Skip to content

Instantly share code, notes, and snippets.

@jaywilliams
Created December 19, 2013 19:27
Show Gist options
  • Select an option

  • Save jaywilliams/8044763 to your computer and use it in GitHub Desktop.

Select an option

Save jaywilliams/8044763 to your computer and use it in GitHub Desktop.
A vQmod for OpenCart 1.5.6 to display products in sub-categories.
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Display products in sub-categories while browsing a parent category</id>
<version>1.0.0</version>
<vqmver>2.4.0</vqmver>
<author>Jay Williams - jay@myd3.com</author>
<file name="catalog/controller/product/category.php">
<operation>
<search position="after"><![CDATA['filter_category_id' => $category_id,]]></search>
<add><![CDATA[ 'filter_sub_category' => true,]]></add>
</operation>
</file>
</modification>
@fazlihon
Copy link

Hello!
Perfect solution!
How can I set a limit on the number of displayed products? OpenCart 2.3.0.2

@jaywilliams
Copy link
Author

Sorry, I haven't used OpenCart since v1.5.6, so I'm afraid I wouldn't know off the top of my head.

@fazlihon
Copy link

fazlihon commented Mar 30, 2020 via email

@gudata
Copy link

gudata commented Jan 7, 2026

for opencart 4.1.0.3

<modification>
	<id>Display products in sub-categories while browsing a parent category</id>
    <version>1.0</version>
    <vqmver>2.4.0</vqmver>

    <author><![CDATA[<a onClick="window.open('http://www.gudasoft.com');" title="Gudasoft">Gudasoft</a>]]></author>


	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="after"><![CDATA['filter_sub_category' => false,]]></search>
			<add><![CDATA[				'filter_sub_category' => true,]]></add>
		</operation>
	</file>

</modification>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment