Post by Slumbers » Thu Aug 13, 2015 4:26 pm

Have version 1.5.6.1 Vqmod 2.1
I have a wordpress blog and I want to add a 'blog' link on my main header menu in my opencart site

I was told I could use this
<?xml version="1.0" encoding="UTF-8"?>
-<modification>
<id>Add BLOG entry to top menu</id>
<version>1.0</version>
<vqmver>1.x</vqmver>
<author>www.ihomedeal.com</author>
-<file name="catalog/controller/common/header.php">
-<operation info="Add information pages directly to the category menu">
-<search position="before">
<![CDATA[ $this->children = array( ]]>
</search>
-<add>
<![CDATA[ $this->data['categories'][] = array( 'name' => 'Blog', 'children' => '', 'column' => 1, 'href' => $this->url->link('https://{site name}.com/blog/', '') ); ]]>
</add>
</operation>
</file>
</modification>


However all this does is try to take the user to a page within the site called blog, so they get 'the this page does not exist' rather than connecting to the actual blog page.

Can anyone offer any suggestions, advice or links to where I can get an extension that will work
and writing code is not a something I'm into...
Thanks

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am

Post by IP_CAM » Sat Aug 15, 2015 10:33 pm


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 Slumbers » Tue Aug 18, 2015 11:17 am

Hi Yes I have looked at those and tried several. Seems they either are not for external links, not for my version, or put them on the wrong menu. The example I gave put it on the correct menu.. but is for an internal link only so doesn't work.
Thanks

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am

Post by IP_CAM » Tue Aug 18, 2015 11:39 am

https://{site name}.com/blog/
tried:
http://SOMESITE.COM/ ???
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 Slumbers » Tue Aug 18, 2015 2:39 pm

If you are referring to the script above and are saying it worked for you

When I tried it twice on my site using my blog site, and another unrelated site we have all it did was try to link to a non existent page within my site.

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am

Post by artcore » Tue Aug 18, 2015 5:23 pm

Change $this->url->link('https://{site name}.com/blog/', '') );
to 'https://{site name}.com/blog/'

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Slumbers » Wed Aug 19, 2015 5:30 pm

Thanks Artcore .. but when I tried that all I got was a completely white screen...

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am

Post by artcore » Wed Aug 19, 2015 5:45 pm

Sorry about that.
Here's the full correct code:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
 <modification>
 <id>Add BLOG entry to top menu</id>
 <version>1.0</version>
 <vqmver>1.x</vqmver>
 <author>www.ihomedeal.com</author>
 -<file name="catalog/controller/common/header.php">
 -<operation info="Add information pages directly to the category menu">
 -<search position="before">
 <![CDATA[ $this->children = array( ]]>
</search>
 -<add>
 <![CDATA[ $this->data['categories'][] = array( 'name' => 'Blog', 'children' => '', 'column' => 1, 'href' => 'https://yourdomain.com/blog/'); ]]>
</add>
</operation>
</file>
</modification>

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Slumbers » Wed Aug 19, 2015 5:57 pm

THANK YOU THANK YOU THANK YOU ... YOU ARE WONDERFUL AND BRILLIANT ARTCORE

IT WORKS :):):):):):) :):):) :):):):):):) :):):)

SO VERY VERY VERY MUCH APPRECIATED

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am

Post by artcore » Wed Aug 19, 2015 6:23 pm

mmm I should show this to my wife :)

You're welcome,
Cheers!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Slumbers » Thu Aug 20, 2015 4:20 pm

Just as well I didn't add the XXXXX.. but my husband may been suspicious :)

Newbie

Posts

Joined
Mon Aug 03, 2015 8:08 am
Who is online

Users browsing this forum: Bing [Bot] and 22 guests