Page 1 of 1

[SOLVED!] vqmod help

Posted: Tue Sep 29, 2015 12:00 am
by webdena
Hello,

I am trying to write my first vqmod script. The purpose of the script is to remove the product descriptions from the featured items. I don't see an option for delete or remove, so I just replaced with an empty string. Can this be done? Can the inside apostrophes possibly be illegal? Or is it OK to nest them as I have. I have uploaded the script to the /vqmod/xml folder as an *.xml script, but nothing is happening. Can someone see what I'm doing wrong? Thanks so much in advance!

Code: Select all

    <modification
                xmlns="https://github.com/vqmod/vqmod"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="https://github.com/vqmod/vqmod https://raw.githubusercontent.com/vqmod/vqmod/master/vqmod.xsd"
                >
        <id>Delete display from featured items module</id>
        <version>1.0.0</version>
        <vqmver>2.5.0</vqmver>
        <author>Dena</author>

        <file name="catalog/view/theme/default/template/module/featured.tpl">
            <operation>
                <search position="replace"><![CDATA[
                $var = '<p><?php echo $product['description']; ?></p>';
                ]]></search>

                <add><![CDATA[
                $var = ' ';
                ]]></add>
            </operation>
        </file> 
    </modification>

Re: vqmod help

Posted: Tue Sep 29, 2015 5:27 am
by IP_CAM

Code: Select all

<p><?php echo $product['description']; ?></p>
equals:

Code: Select all

<operation>
<search position="replace"><![CDATA[
<p><?php echo $product['description']; ?></p>
]]></search>
<add><![CDATA[]]></add>
</operation>
to be removed.

Good Luck
Ernie
openshop.li/cart/

Re: vqmod help

Posted: Tue Sep 29, 2015 6:04 am
by webdena
I really appreciate your answering my question, and I thank you in advance for your patience.

Are you saying that my entire code should look like this?

Code: Select all

 <?xml version="1.0" encoding="UTF-8"?>
    <modification
                xmlns="https://github.com/vqmod/vqmod"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="https://github.com/vqmod/vqmod https://raw.githubusercontent.com/vqmod/vqmod/master/vqmod.xsd"
                >
        <id>Delete display from featured items moduleC</id>
        <version>1.0.0</version>
        <vqmver>2.5.0</vqmver>
        <author>Dena</author>

        <file name="catalog/view/theme/default/template/module/featured.tpl">
            	<operation>
		<search position="replace"><![CDATA[<p><?php echo $product['description']; ?></p>
]]></search>
		<add><![CDATA[]]></add>
		</operation>
        </file> 
    </modification>

Re: vqmod help

Posted: Tue Sep 29, 2015 6:45 am
by IP_CAM
Yes, but remove that crab first from your vqmod, it makes life just more complicated! :D

Code: Select all

xmlns="https://github.com/vqmod/vqmod"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/vqmod/vqmod https://raw.githubusercontent.com/vqmod/vqmod/master/vqmod.xsd"
Ernie
openshop.li/shop/

Re: vqmod help

Posted: Tue Sep 29, 2015 8:22 am
by webdena
OK, this is what I have now:

Code: Select all

 <?xml version="1.0" encoding="UTF-8"?>
    <modification
     <id>Delete display from featured items moduleC</id>
        <version>1.0.0</version>
        <vqmver>2.5.0</vqmver>
        <author>Dena</author>

         <operation>
                <search position="replace"><![CDATA[
                <p><?php echo $product['description']; ?></p>
                ]]></search>

                <add><![CDATA[]]></add>
            </operation>
        </file> 
    </modification>
And I have put it in, but the description remains. It's for the "featured items" section. Am I modifying the wrong file?

Feeling thick-skulled here and appreciating your patience.

Re: vqmod help

Posted: Tue Sep 29, 2015 8:59 pm
by sculptex
webdena wrote:OK, this is what I have now:

Code: Select all

 <?xml version="1.0" encoding="UTF-8"?>
    <modification
     <id>Delete display from featured items moduleC</id>
        <version>1.0.0</version>
        <vqmver>2.5.0</vqmver>
        <author>Dena</author>

         <operation>
                <search position="replace"><![CDATA[
                <p><?php echo $product['description']; ?></p>
                ]]></search>

                <add><![CDATA[]]></add>
            </operation>
        </file> 
    </modification>
And I have put it in, but the description remains. It's for the "featured items" section. Am I modifying the wrong file?

Feeling thick-skulled here and appreciating your patience.
wheres the <file> ?

Re: vqmod help

Posted: Tue Sep 29, 2015 10:43 pm
by IP_CAM
as sculptex wrote, you forgot this:
<file name="catalog/view/theme/default/template/module/featured.tpl">
as well as the > after: <modification
and I now added: .... error="log"> to <operation
in order to have control, if the vqmod should not function, for any reason.

PLEASE RESET/CLEAR CACHE YOUR SYSTEM, in the Extension Section, after adding the VqMod.

it should look like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Delete display from featured items module</id>
<version>1.0.0</version>
<vqmver>2.5.0</vqmver>
<author>Dena</author>
<file name="catalog/view/theme/default/template/module/featured.tpl">
<operation error="log">
<search position="replace"><![CDATA[<p><?php echo $product['description']; ?></p>]]></search>
<add><![CDATA[]]></add>
</operation>
</file>
</modification>
Ernie

Re: vqmod help

Posted: Wed Sep 30, 2015 2:20 am
by webdena
I really appreciate you folks responding. Please don't give up on me!

OK, I have copied the exact text from above and pasted it into a new file. It's in the xml folder of the vqmod folder. I have cleared the vqmod cache, refreshed the extension module, cleared the oc cache, refreshed everything again. I have my home page set to default. The description is still under the featured products. ??? ???

Re: vqmod help

Posted: Wed Sep 30, 2015 3:22 am
by webdena
I found it! As expected, it was a stupid error. It's working now. Thank you one and all! :D

Re: [SOLVED!] vqmod help

Posted: Wed Sep 30, 2015 4:34 am
by IP_CAM
I never give up, I just start to send invoices, after a while... :D
Good Luck
Ernie

Re: [SOLVED!] vqmod help

Posted: Wed Sep 30, 2015 6:43 am
by webdena
Thank you again!

Re: [SOLVED!] vqmod help

Posted: Fri Oct 02, 2015 12:50 am
by sculptex
glad to help

@IP_CAM Ernie, I have seen loads of your posts, I don't know how you find the time to give such detailed answers!

one small thing, surely there is no need to refresh/flush the cache in the extension system when using native vqmods (only ocmods unless you are using ocmod version of vqmod which is a nightmare and causes loads of problems so don't do it!)

Re: [SOLVED!] vqmod help

Posted: Fri Oct 02, 2015 2:06 am
by IP_CAM
Beeing 69+, it's tough to only spend a Men's Life around nice Females, most of the time! So, my wife run's our Club, and I have lots of free time, trying to beat ALZHEIMER, or whoever else is waiting, eventually, behind the next door. ;D
---
I just recall, how it feels, trying to find out, how something works, but coming from Nowhere, technically. That's the way, I had to go, still beeing a real FOOL, when it comes to 'exactly remember/recall' Programmers Code in my Brain, after decades of computing. I very well know, how it looks, but I would not even be able to write the simplest 'IF-ELSE' ROUTINE' just out of my Head, to be sure, it would work, on the first try... :'( Programming is just not my THING! Unfortunately, like in many Million other, possibly even OC related, cases.

For this, I need OTHERS, like here, to get information. And because I found it, I just try to give some back, as I understand it, hopefully to make so Others better understand, what they are doing, and what will result out of it. At least for me, it worked, this way, and hopefully, some of my postings will be usefull, for a broader range of readers, so not required, to fill this Place with ever repeated Matters and Problems, on the same Themes...

And if it's written once, I only have to link it, in the future, when it comes to similar Problems. So, in the longer term, I would have to write less, I guess !?

In addition to all this, it's a very great way to even improve my self trained english, technically as well. It therefore serve's some honest purpose, besides of keeping some URL's indexed swell, so, you see, I do it not for fun only... 8)

best regards,
Ernie
jti.li/shop/

PS: ...there is no need to refresh/flush the cache.....
honestly, I tried all day, yesterday, but I'm just not getting warm, and feel like a real Newbie, just like in a rather dark forrest..., randomly jumping from tree to tree..., to eventually find the place, to do the same work as before... :-\

Re: [SOLVED!] vqmod help

Posted: Fri Oct 02, 2015 6:32 am
by webdena
Well, I think y'all are awesome folks. I truly appreciate the helping atmosphere here.

Re: [SOLVED!] vqmod help

Posted: Fri Oct 02, 2015 6:37 am
by sculptex
great stuff! keep up the good work!