Post by GazzaBJ » Mon Jul 26, 2021 7:45 pm

Hi,

If I have 2 mods, the first one makes a change to a line of core code, followed by a 2nd mod that needs to make a change to the same line of core code, but the previous mod already made a change, what is the scenario?

Does the 2nd mod no longer see the original code, therefore cannot find the code to change?
Does the 2nd mod only see the original code, so makes its change, therefore, overwriting the 1st mods change?
Does the 2nd mod need to be written in such a way that it takes into account the 1st mods changes?
Are they run in alphabetical order on a refresh or the order they were installed as this could affect the scenario above.

Any guidance would be appreciated :)

Thanks,
Gaz
Last edited by GazzaBJ on Mon Jul 26, 2021 8:30 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Feb 21, 2020 10:47 pm

Post by straightlight » Mon Jul 26, 2021 7:49 pm

GazzaBJ wrote:
Mon Jul 26, 2021 7:45 pm
Hi,

If I have 2 mods, the first one makes a change to a line of core code, followed by a 2nd mod that needs to make a change to the same line of core code, but the previous mod already made a change, what is the scenario?

Does the 2nd mod no longer see the original code, therefore cannot find the code to change?
Does the 2nd mod only see the original code, so makes its change, therefore, overwriting the 1st mods change?
Does the 2nd mod need to be written in such a way that it takes into account the 1st mods changes?
Are they run in alphabetical order on a refresh or the order they were installed as this could affect the scenario above.

Any guidance would be appreciated :)

Thanks,
Gaz
OC version. The weakness of extensions while using OCMod or VQMod. With XML files, there are no escape sadly. If one line needs to be edited from one extension along with another extension targeting the same line of code from the same file name, the conflict all begins between those two extensions. Which is why, whenever possible, I like the use of the Events engine from the core instead. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by GazzaBJ » Mon Jul 26, 2021 7:56 pm

I'm using 3.0.3.7

So its sounds like the 2nd mod only sees the original code, makes its change overwriting the 1st mods change?

Gaz

Newbie

Posts

Joined
Fri Feb 21, 2020 10:47 pm

Post by straightlight » Mon Jul 26, 2021 7:58 pm

GazzaBJ wrote:
Mon Jul 26, 2021 7:56 pm
I'm using 3.0.3.7

So its sounds like the 2nd mod only sees the original code, makes its change overwriting the 1st mods change?

Gaz
They do not override each other from the original code, they override each other in the cache folders.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by GazzaBJ » Mon Jul 26, 2021 8:00 pm

Sorry, yes, I realise it would be the cache.

Thanks for your help.

Newbie

Posts

Joined
Fri Feb 21, 2020 10:47 pm

Post by straightlight » Mon Jul 26, 2021 8:02 pm

GazzaBJ wrote:
Mon Jul 26, 2021 8:00 pm
Sorry, yes, I realise it would be the cache.

Thanks for your help.
No problem. To know how to work with Events, see this documentation: https://github.com/opencart/opencart/wiki/Events-System and in your catalog/controller/extension/advertise/google.php file on how to create events. Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: sidclel and 87 guests