Page 1 of 2

Changing ONE Menu Item Red

Posted: Tue Jan 06, 2015 11:40 pm
by astott2014
I am trying to figure out how to change one of the categories in my menu to red, can anyone help me please?

The menu item I would like to change is SALE, to RED.

website removed

Re: Changing ONE Menu Item Red

Posted: Wed Jan 07, 2015 5:22 pm
by soundzgood-nz
Try the attached vqmod ... upload to /vqmod/xml. I've set it for your store's SALE category link (id 65) and made it bold /red and so anyone else using this may want to change the id and span style entries on lines 15-16 of the vqmod file.

Simon

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 12:14 am
by astott2014
Hi Simon,

Thanks for attaching the file, I uploaded it to my /vqmod/xml, and it hasn't worked?

Anything else I need to tweak? I left the file uploaded incase you wanted to have a look.

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 3:56 am
by Dhaupin
You can do it with CSS very easily by targeting the contents of the link:

Code: Select all

.journal-menu .drop-down a[href$="path=65"] {
color: #CB0505;
font-weight: bold;
}

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 7:15 am
by astott2014
Dhaupin wrote:You can do it with CSS very easily by targeting the contents of the link:

Code: Select all

.journal-menu .drop-down a[href$="path=65"] {
color: #CB0505;
font-weight: bold;
}
Hi,

I get confused with editing script files if there is a built in module for customising your website.

Lets say if I changed the header background to white on the journal theme module, but then later on I changed the colour again - but this time I done it via the .css file and not the module. What would happen? Would something not crash and get confused? - as the module is saying one thing and the css file is saying another.

It may seem completly daft to you, but it's something I worry about and stops me making changes like you suggested.

Can you clear me up with that please before I make any changes. I messed a previous website up before this one by changing the css file AND module.

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 7:36 am
by webvet
astott2014 wrote: I get confused with editing script files if there is a built in module for customising your website.
That would be vQmod... ;)

I have checked the xml file posted above and works fine on my v2.0.1.1 and v1.5.6.4 sites.

So, double check that you have got vqmod installed correctly. Are you running any other vqmods successfully?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 7:54 am
by astott2014
webvet wrote:
astott2014 wrote: I get confused with editing script files if there is a built in module for customising your website.
That would be vQmod... ;)

I have checked the xml file posted above and works fine on my v2.0.1.1 and v1.5.6.4 sites.

So, double check that you have got vqmod installed correctly. Are you running any other vqmods successfully?
Any way I would check that? I believe that the journal2 module would not show up on my opencart menu bar if I didn't have vqmod installed, so I presume it is set up ok.

I remember setting it up via something like /vqmod/install and I got a success message.

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 8:28 am
by webvet
Yep - go to http://www.YOURSTORE.com/vqmod/install

If all ok, you should receive the success message.

I've just checked your link and it is reporting a permission error:

1. Have you changed the permissions in the vqmod and vqcache folders after completing the successful install?

- or -

2. Have you renamed your admin folder?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 8:36 am
by astott2014
webvet wrote:Yep - go to http://www.YOURSTORE.com/vqmod/install

If all ok, you should receive the success message.

I've just checked your link and it is reporting a permission error:

1. Have you changed the permissions in the vqmod and vqcache folders after completing the successful install?

- or -

2. Have you renamed your admin folder?
Hi, I haven't changed any permission settings, I didn't know I had too?

Yes, I have changed my admin folder name?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 8:42 am
by webvet
OK - likely the changed admin name is causing the problem. Luckily, there is a quick & easy way around this...

In your vqmod/pathReplaces.php file, find:

Code: Select all

// START REPLACES //

// END REPLACES //
and between these lines, insert:

Code: Select all

$replaces[] = array('~^admin\b~', 'NEWADMINFOLDERNAME');

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 8:53 am
by astott2014
webvet wrote:OK - likely the changed admin name is causing the problem. Luckily, there is a quick & easy way around this...

In your vqmod/pathReplaces.php file, find:

Code: Select all

// START REPLACES //

// END REPLACES //
and between these lines, insert:

Code: Select all

$replaces[] = array('~^admin\b~', 'NEWADMINFOLDERNAME');
Thanks for your quick replies.

I done that change shortly after I installed vqmod from a tutorial on this forum. I will copy and paste exactly what I have:

// START REPLACES //
$replaces[] = array('~^admin\b~', 'example');
// END REPLACES //

Maybe it is to do with the permissions you mentioned?

I did have my hosting enter the 301 redirect code into my .htaccess file today, and I noticed they also set a catche validator without my permission, now I left that out on purpose as I am still doing a lot of maintenance on my website.

Maybe the catche has not picked up the change yet? Just thought i'd mention it before I have anyone else running around for me :) .

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 9:06 am
by webvet
What file permissions do you have set for the index.php, admin/index.php files, and the vqmod/vqcache folder?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 9:31 am
by astott2014
webvet wrote:What file permissions do you have set for the index.php, admin/index.php files, and the vqmod/vqcache folder?

index.php
Over Permissions - Read & Write
Group Permissions - Read
Public Permissions - Read
Numeric Value: 644

admin/index.php
Over Permissions - Read & Write
Group Permissions - Read
Public Permissions - Read
Numeric Value: 644

vqmod/vqcache
Over Permissions - Read, Write & Execute
Group Permissions - Read & Execute
Public Permissions - Read & Execute
Numeric Value: 755

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 9:44 am
by webvet
You could try temporarily changing the permissions to 0755 on both index.php files and running the installer (visit www.yourstore.com/vqmod/install) again. If you get the success message, then change the files back to 0644.


I'm calling it a night now as late - but I'll check in tomorrow, feel free to PM or email me [support(at)webvetservices(dot)com] if you are still struggling. Nice looking website :)


The real crunch is whether vqmod was installed successfully prior to the admin folder changing name OR was the admin folder name changed without vqmod being properly configured? Ultimately you can return the admin folder to its original 'admin' name, re-install vqmod and make sure the xml file works, and then rename admin to whatever you want again.

BTW - Have you changed the name of the admin folder in your config.php and admin/config.php files?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 10:03 am
by astott2014
webvet wrote:Y
The real crunch is whether vqmod was installed successfully prior to the admin folder changing name OR was the admin folder name changed without vqmod being properly configured? Ultimately you can return the admin folder to its original 'admin' name, re-install vqmod and make sure the xml file works, and then rename admin to whatever you want again.

BTW - Have you changed the name of the admin folder in your config.php and admin/config.php files?
I have just checked the admin/config.php and yes, it has been changed over to my new folder name. I also done a quick search for the word admin within that file and no mentions of it.

The other config.php looks like it hasn't been configured? But then again, there is no mentions of the admin folder or my new folder within the code? I swear I read on this forum when doing the vqmod tutorial than I didn't have to edit the config.php file due to some new updated? I may be wrong be here is the code for you to check:

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 10:05 am
by astott2014
webvet wrote:You could try temporarily changing the permissions to 0755 on both index.php files and running the installer (visit http://www.yourstore.com/vqmod/install) again. If you get the success message, then change the files back to 0644.
I will have a go at this if nothing else works.

Thanks for the website comment, always nice to hear :). Take care.

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 12:11 pm
by astott2014
astott2014 wrote:
webvet wrote:You could try temporarily changing the permissions to 0755 on both index.php files and running the installer (visit http://www.yourstore.com/vqmod/install) again. If you get the success message, then change the files back to 0644.
I will have a go at this if nothing else works.

Thanks for the website comment, always nice to hear :). Take care.
Update: I have changed them both to 0755 then run the install, still getting the error message. I have changed them back to 0644 again.

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 6:33 pm
by webvet
Woken up now!

It looks as if either the vqmod install hasn't worked properly, or your template has a custom catalog/controller/common/header.php file.

Does this file contain the line:

Code: Select all

$children = $this->model_catalog_category->getCategories($category['category_id']);
Referred to in the vqmod?

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 7:26 pm
by soundzgood-nz
It doesn't hv a custom catalog/controller/common/header.php file but a completely different way of controlling the display of header links using javascript. The vqmod I made would work on a simple default template - Journal2 is a completely different beast. This thread really should be under Template Support because it's a template specific mod required.

Simon

Re: Changing ONE Menu Item Red

Posted: Thu Jan 08, 2015 7:34 pm
by webvet
Fair enough - a template issue... We got there in the end.


For information - I have recreated the vqmod error when re-running the installer after modifying the admin/index.php file permissions. However, your vqmod still works fine! That error was a red-herring.

Learnt something already this morning - looking for the success message in the yoursite.com/vqmod/install page does not necessary prove whether vqmod is working correctly or not!