How can i create a module which only enables only when some values in config match. This module is completely handled by VQmod. And i want to make sure that xml only executes when some value satisfies. Like if($this->config->get('moduleserial')=='somevalue')
then only my xml should execute. Please guide me in right way.
Asked
Active
Viewed 239 times
5

Vidhyut Pandya
- 1,605
- 1
- 14
- 27
-
I don't know if such a thing is possible, but if it is not, try this in your VQMOD file: ***(1)*** at index.php, define some constant with a value of **1** or **0** based on the condition you are checking (`if(condition o.k) define ('PROCEED_WITH_VQMOD','1') else define ('PROCEED_WITH_VQMOD','0')`...) , ***(2)*** for every change you make, surround your code block with a condniton that checks whether that constant `PROCEED_WITH_VQMOD` is 1 – Abdo Adel Jun 18 '15 at 11:33
-
Are you making changes in single file via vQmod or multiple ? – Nipun Tyagi Jun 18 '15 at 11:34
-
I'm trying to change multiple files – Vidhyut Pandya Jun 18 '15 at 11:44
-
if am little bit confused, you are saying one module (which is handled by xml) is depend on same values of config means already installed other mod/ shipping or any other ext., is Opencart module or you are reffering your code which you want to add by xml is module ? I have few solution in mind but clear this first. – Nikhil Chaudhary Oct 15 '15 at 14:19
-
@user5419232 it was an opencart module and works only with an xml. – Vidhyut Pandya Oct 15 '15 at 15:06