Stalin Gino
Stalin Gino

Reputation: 622

In Opencart 2.0 OCMod, modified file is not used for view

I've deployed a sample Opencart2.0 under a subdirectory in my godaddy domain. I've created a OCMod xml file remove_unused_desc_from_category.ocmod.xml which removes a line from <sub_dir>/catalog/view/theme/default/template/product/category.tpl

I've installed this using Extension Installer and refreshed the cache. Then checked the new file <sub_dir>/system/modification/catalog/view/theme/default/template/product/category.tpl which had the change.

But it is still not affecting the UI. I'm still a learner of opencart and OCMod. Kindly help.

Upvotes: 1

Views: 3091

Answers (1)

Stalin Gino
Stalin Gino

Reputation: 622

I have asked the same question in Opencart github repo here, and found the solution.

If you installed opencart with an autoinstaller it migth have added DIR_CATALOG to your root config.php, you must edit it and remove it, it should not be there.And move its value directly to DIR_APPLICATION. - florinsith

Code:

//define('DIR_CATALOG', '/home/<user_dir>/public_html/<sub_dir>/catalog/');
//define('DIR_APPLICATION', DIR_CATALOG);
define('DIR_APPLICATION', '/home/<user_dir>/public_html/<sub_dir>/catalog/');

Upvotes: 3

Related Questions