Post by webdena » Tue Sep 29, 2015 12:00 am

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>
Last edited by webdena on Wed Sep 30, 2015 3:22 am, edited 1 time in total.

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by IP_CAM » Tue Sep 29, 2015 5:27 am

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/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by webdena » Tue Sep 29, 2015 6:04 am

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>

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by IP_CAM » Tue Sep 29, 2015 6:45 am

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/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by webdena » Tue Sep 29, 2015 8:22 am

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.

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by sculptex » Tue Sep 29, 2015 8:59 pm

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> ?

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by IP_CAM » Tue Sep 29, 2015 10:43 pm

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

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by webdena » Wed Sep 30, 2015 2:20 am

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. ??? ???

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by webdena » Wed Sep 30, 2015 3:22 am

I found it! As expected, it was a stupid error. It's working now. Thank you one and all! :D

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by IP_CAM » Wed Sep 30, 2015 4:34 am

I never give up, I just start to send invoices, after a while... :D
Good Luck
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by webdena » Wed Sep 30, 2015 6:43 am

Thank you again!

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by sculptex » Fri Oct 02, 2015 12:50 am

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!)

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by IP_CAM » Fri Oct 02, 2015 2:06 am

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... :-\

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by webdena » Fri Oct 02, 2015 6:32 am

Well, I think y'all are awesome folks. I truly appreciate the helping atmosphere here.

Newbie

Posts

Joined
Fri Sep 25, 2015 12:18 pm

Post by sculptex » Fri Oct 02, 2015 6:37 am

great stuff! keep up the good work!

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK
Who is online

Users browsing this forum: No registered users and 4 guests