Post by iCornerstone » Fri Aug 26, 2011 8:28 am

Hi,
I have OpenCart 1.5.1.1 with Xampp of Windows Vista 32bit
I installed vQmod 1.2.3 all went fine
I even checked if the installation actually changed the files as per the manual instructions and it had.

I loaded oc_sku_on_product_page.xml into the XML folder and i get this error log
----------------------20110826-000833-------------------------
SOURCEFILE: C:/Users/xampp/htdocs/Local/catalog/view/theme/default/template/product/product.tpl
MODFILE: C:/Users/xampp/htdocs/Local/vqmod/xml/oc_sku_on_product_page.xml
SEARCH: <td><?php echo $model; ?></td>
OPERATION FAILED (ABORTED): NO MATCH FOR SEARCH!
--------------------------------------------------------------

I added my own xml file to change the text colour on the default theme
======
<file name="catalog/view/theme/default/stylesheet/stylesheet.css">
<operation>
<search position="replace"><![CDATA[38B0E3]]></search>
<add><![CDATA[7E2217]]></add>
</operation>
</file>
======
The script doesn't work either and I see no error message at all on this.

Can anyone help point out what I am doing wrong?

Thanks

Newbie

Posts

Joined
Fri Aug 26, 2011 8:17 am

Post by cantykiwi » Fri Aug 26, 2011 11:50 am

Well basically you can't edit css or js files directly using vQmod.

You will need to make a duplicate of the css file you want to change and put your edits in that and then use vQmod to do an edit in the header.tpl file to use your modified css file instead of the original.

At least thats what I do and have not encountered any problems so far doing it that way.

As for the first error in your error log I think that the sku xml mod was for v1.4.x of opencart not v.1.5.x unless someone has now updated it to work, that's why it says no match for search.

Attached a sample for you:-

Attachments


New member

Posts

Joined
Mon Sep 13, 2010 12:37 pm

Post by iCornerstone » Fri Aug 26, 2011 4:26 pm

Great!!!
Thanks will try it out now

Newbie

Posts

Joined
Fri Aug 26, 2011 8:17 am

Post by iCornerstone » Fri Aug 26, 2011 4:52 pm

Worked like a dream.
Thanks a million

Newbie

Posts

Joined
Fri Aug 26, 2011 8:17 am

Post by cantykiwi » Mon Aug 29, 2011 5:08 am

That's great, glad to do help where I can.

New member

Posts

Joined
Mon Sep 13, 2010 12:37 pm

Post by Charlie-- » Mon Mar 05, 2012 9:09 am

@cantykiwi -Thank you, this works very well. I like using vQmod for core code changes but could not figure out how to do it for a .css

Also this is a great way to force a browser to reload a .css when you make updates to your custom .css - (If you change your custom .css file name and the reference to it in your vQmod) :)

Seems like I can use this for .js too (I still need to test that) but that would be great if that worked too.

User avatar
Newbie

Posts

Joined
Mon Feb 27, 2012 7:03 am

Post by Qphoria » Mon Mar 05, 2012 1:13 pm

You don't need to duplicate the current stylesheet.

CSS is cascading.. which means many files can be loaded and newer changes will override older ones.
My personal preference is to use vQmod to add a separate stylesheet called "mycustom.css"
All you need here is the changes you want. Be sure you add it right before the </head> tag so that it loads last.
Then you leave your normal stylesheet alone and load this new one at the end of the list. Enter in just the stuff you are overriding.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
New member

Posts

Joined
Wed Apr 11, 2012 7:26 pm
Location - Tasmania

Post by threebuoys » Tue Jul 03, 2012 11:36 am

Glad I finally found this thread. This is a great solution to preserve original templates, particularly if you've acquired one from another author. Before I found this, I accidentally overwrote changes I had made in stylesheet.css when I replaced the file with a new version from the author. Admittedly, my change control was poor, but if I'd made the original css changes the way described in this thread I wouldn't have had a problem.

I recommend that either cantykiwi or Qphoria post the mod as a free VQmod titled something like [Vqmod] CSS mod so it'll come up quickly in a search.

I was familiar with css mods in Joomla, but I was scratching my head for OC. Probably comes naturally to experienced php/css coders, but its very educational to a beginner.

Thanks guys

David

v1.5.2.1; vqmod


Newbie

Posts

Joined
Mon Apr 09, 2012 10:53 am
Location - Avon, NC

Post by Brazuca87 » Thu Jul 12, 2012 4:59 am

So I went thru and made some modifications to cantykiwi's xml to implement what Qphoria suggested... Ended up with this, and working fine...

With that you just need to make a new file named my_stylesheet.css and place in that file whatever you want to override from the original css...

Hope this helps others as much as it helped me :) Thanks both of you, and the ones who asked the questions also :D

Attachments


Newbie

Posts

Joined
Thu Jul 12, 2012 4:55 am

Post by FnF » Thu Aug 23, 2012 10:03 am

I'm hanging up on this yet guys. I'm not quite understanding it. :choke:
All I want to do is change the background color of my stores.
I know it's a simple stylesheet edit, but I have several stores with different colors I'd like to be able to upgrade without having to go through and edit all the stylesheets each time.

I've made some XML files to remove links from the bottom of some installs but, I cant figure out how you guys are getting it to call/ or replace a different file completely so that you can use your custom stylesheet.

Is that the "ALL" postion?

User avatar
FnF
Active Member

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by FnF » Sun Aug 26, 2012 3:02 am

Can anyone point me in the right direction, or to a post maybe that I'm not finding in searches?

User avatar
FnF
Active Member

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by rudilim » Fri May 10, 2013 8:58 am

Hi I am new to VQMod. Trying out vqmod. So not sure this is the right place to post this.

I wrote a vqmod file and saved it as home_edit.xml in vqmod > xml folder

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
        <id>After ABC, add 123</id>
        <version>1.0</version>
        <vqmver>2.3</vqmver>
        <author>rudi</author>
        <file name="catalog/view/theme/default/template/common/header.tpl">
                
		<operation info="After ABC, add 123">
                        
			<search position="replace"><![CDATA[
                        <?php echo $language; ?>
                        ]]></search>
                        
			<add><![CDATA[
			<span>testing</span>
                        ]]></add>
                
		</operation>
        </file>
</modification>
But my store is not displaying the change. I had checked vqcache folder. There are some new files created.

Just a piece of additional info: I have installed vqmod manager but have since uninstalled via opencart admin > modules. Was wondering whether that is the one causing my issue?

Tks for any help , guidance

R

Newbie

Posts

Joined
Sun Dec 16, 2012 1:22 pm

Post by rudilim » Sat May 11, 2013 11:11 pm

anyone, help pls?

Newbie

Posts

Joined
Sun Dec 16, 2012 1:22 pm
Who is online

Users browsing this forum: No registered users and 4 guests