You want only child categories to be displayed while adding product
Ex: Components > Monitors as Monitors
Please see attachment as well, once the requirement is clear then i can suggest you solution.
Thanks & Regards :
Attachments
categories.png (14.41 KiB) Viewed 948 times
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
Please add following code in an OCMOD file, if you want only child category to be displayed while add product
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<code></code>
<name></name>
<version></version>
<author></author>
<link></link>
<file path="admin/controller/catalog/category.php">
<operation>
<search>
<![CDATA[array_multisort($sort_order, SORT_ASC, $json);]]>
</search>
<add position="before" ><![CDATA[
foreach ($json as $key => &$value)
{
if(strpos($value['name'], ">") !== false)
{
$res = explode(">", $value['name']);
$cat_name = end($res);
$value['name'] = trim($cat_name);
} else {
$value['name'] = trim($value['name']);
}
}
]]>
</add>
</operation>
</file>
</modification>
Please do share us the feedback.
Thanks & Regards :
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
This is a code when you add product & search for categories then only child category will be shown, this is what you needed?
Can you please share screenshot? Please once check your modification file as well, whether the code is modified or not.
Thanks & Regards :
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
https://www.opencart.com/index.php?rout ... n_id=34574
https://www.opencart.com/index.php?rout ... n_id=34195
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Users browsing this forum: Amazon [Bot], Semrush [Bot] and 407 guests