Page 1 of 1
vqmod not working as expected
Posted: Thu Jun 14, 2018 11:09 pm
by al404
HI
I have Opencart 3 with journal 2 theme
I'm using vqmod to hide some items from user account menu but is not working as expected
Code: Select all
<file name="catalog/view/theme/*/template/account/account.twig">
<operation>
<search position="replace"><![CDATA[<li><a href="{{ download }}">{{ text_download }}</a></li>]]></search>
<add></add>
</operation>
<operation>
<search position="replace"><![CDATA[<li><a href="{{ reward }}">{{ text_reward }}</a></li>]]></search>
<add></add>
</operation>
<operation>
<search position="replace"><![CDATA[<li><a href="{{ return }}">{{ text_return }}</a></li>]]></search>
<add></add>
</operation>
<operation>
<search position="replace"><![CDATA[<h2 class="secondary-title">{{ text_my_affiliate }}</h2>]]></search>
<add></add>
</operation>
<operation>
<search position="replace"><![CDATA[<li><a href="{{ recurring }}">{{ text_recurring }}</a></li>]]></search>
<add></add>
</operation>
</file>
download is removed the other elements are still there and VQMOD error log doesn't show up any error
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:21 pm
by xxvirusxx
Add what?
You should have something like this
Code: Select all
<operation error="log">
<search position="replace"><![CDATA[search_something]]></search>
<add><![CDATA[
add_something
]]></add>
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:24 pm
by al404
As far as I know that is the correct syntax to remove a peace of code
Code: Select all
<search position="replace"><![CDATA[CODE TO REMOVE]]></search>
<add></add>
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:27 pm
by xxvirusxx
Then cleare vqmod cache, SAS cache, theme cache.
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:30 pm
by al404
I did that too... I'm with no clue
the only thing that I can think of is that some other script manipulate the page before VQMOD gets to it, not sure if that could be possible
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:37 pm
by xxvirusxx
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:50 pm
by al404
It doesn't seem to work the other strange thing is that if I leave only
Code: Select all
<operation>
<search position="replace"><![CDATA[<li><a href="{{ download }}">{{ text_download }}</a></li>]]></search>
<add>AAA***</add>
</operation>
download element disappear but is not replaced and I don't get an error
Re: vqmod not working as expected
Posted: Thu Jun 14, 2018 11:57 pm
by xxvirusxx
It is...
And you can use, to see errors.
Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 12:03 am
by al404
I did try with CDAT also
no error, no log and no AAA** but download is removed
can i force log the process?
Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 12:48 am
by kestas
Hi,
I have not checked, but in OC3.x you should try this syntax:
Code: Select all
<file path="catalog/view/theme/*/template/account/account.twig">
<operation>
<search><![CDATA[ something what you need to find ]]></search>
<add position="replace"><![CDATA[ something what you need to change ]]> </add>
</operation>
</file>
I use ocmod in OC3.0....
Cheers
Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 1:47 am
by IP_CAM
Well, whatever, but NEITHER this:
<add></add>
NOR this:
<add>AAA***</add>
is gonna work.
It should be:
<add><![CDATA[]]></add>
or:
<add><![CDATA[
]]></add>
if nothing should be (re)placed instead...
Why try to make your life so hard, better read about such first !
Ernie
Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 4:30 pm
by al404
No, still doesn't seem to work
I will try to write to theme guys to see if is something related to the theme
I also notice that vqmod/vqcache is empty
casche file seems to be vqmod/mods.cache
Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 6:47 pm
by paulfeakins
al404 wrote: ↑Thu Jun 14, 2018 11:09 pm
I have Opencart 3 with journal 2 theme
Sorry to hear, Journal is a bloated beast

Re: vqmod not working as expected
Posted: Fri Jun 15, 2018 11:19 pm
by al404
Journal license support is expired... :-(
I try disabling my VQMOD and edit the template file removing
<li><a href="{{ download }}">{{ text_download }}</a></li>
in
catalog/view/theme/default/template/account/account.twig
AND
catalog/view/theme/journal2/template/account/account.twig
but the download button does not disappear from my account page
https://www.oc3-store.it/index.php?rout ... nt/account
any idea?
Re: vqmod not working as expected
Posted: Sat Jun 16, 2018 12:15 am
by IP_CAM
Well, if you remove anything, you first have to clear out all the Caching
Systems, like OcMod, VqMod (if exist), Journal Cache, and the OC System
Cache Sections, to then make it work.
Ernie
Re: vqmod not working as expected
Posted: Mon Jun 18, 2018 3:27 pm
by al404
Sorry guys but was OC 3 cache system, never had this kind of issue on OC 2
https://www.youtube.com/watch?v=mUMGV0WACHs
I set both to off and now my VQMOD work