Post by asif » Fri Nov 18, 2011 7:06 pm

Hi ,
this is related to vqMod extensions. I have created an extension (which uses vqMod for replacing) which replace the "insert" query in /admin/model/catalog/product.php file by searching the older query. Now there is another extension already installed which replaces the same query using its own xml file. My xml file is parsed later and hence search is failed on my xml. Please tell me is there any way to resolve this conflict? is there any feature of vqMod to handle such situation?
manual way can be to also incorporate the other extensions changes in my own xml files. please help.

New member

Posts

Joined
Wed Jan 16, 2008 10:35 pm

Post by uksitebuilder » Fri Nov 18, 2011 7:32 pm

You will have to try and figure out how to combine both changes in to one

then delete that change or comment it out in the one vqmod file and replace the correct change in the other.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by asif » Fri Nov 18, 2011 8:21 pm

thats the only solution..it will be quite time consuming... if there are multiple changes.. ok will try that...

New member

Posts

Joined
Wed Jan 16, 2008 10:35 pm

Post by Qphoria » Fri Nov 18, 2011 8:56 pm

yea.. vQmod still has to abide by the laws of physics... 2 different objects cannot occupy the exact same space at the same time. That is why it is important that when using search/replace that you match the least amount as possible while still being unique. This will better your chances of something like this:

Base string:

Code: Select all

SELECT * FROM product WHERE product_id = '1' AND status = '1'; 
If mod 1 wants to change it to:
SELECT * FROM product WHERE product_id = '1' AND model = 'xyz' AND status = '1';

and mod 2 wants to change it to:
SELECT * FROM product WHERE product_id = '1' AND sku = 'xyz' AND status = '1';

Then it is important that both vQmod authors DO NOT try to do:

Code: Select all

<search position="replace">
SELECT * FROM product WHERE product_id = '1' AND status = '1'; 
</search>
<add>
SELECT * FROM product WHERE product_id = '1' AND model = 'xyz' AND status = '1'; 
</add>
But instead use a smaller chunk like:

Code: Select all

<search position="replace">
SELECT * FROM product WHERE product_id = '1'
</search>
<add>
SELECT * FROM product WHERE product_id = '1' AND model = 'xyz'
</add>
Then the other mod could use the same search and not break from the first line:

Code: Select all

<search position="replace">
SELECT * FROM product WHERE product_id = '1'
</search>
<add>
SELECT * FROM product WHERE product_id = '1' AND sku= 'xyz'
</add>
Resulting in the proper combined result:
SELECT * FROM product WHERE product_id = '1' AND sku = 'xyz' AND model = 'xyz' AND status = '1';

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by asif » Fri Nov 18, 2011 9:00 pm

Thanks qPhoria :) thats what i have done now... thanks for your input... appreciated...

New member

Posts

Joined
Wed Jan 16, 2008 10:35 pm
Who is online

Users browsing this forum: No registered users and 3 guests