Forums / General Questions / Adding More Links in the Information Box?

Adding More Links in the Information Box?

Locked

Views: 1,677

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
6 Apr 2010, 6:13 AM
#1
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
475
Plugin Contributions:
0

Adding More Links in the Information Box?

Hi All,

I have just installed the latest zen-Cart 1.3.8a.
I would like to add pages/links to the Information Box, NOT the More Information box!

For Example, I changed the Text in Page_2, Page_3 & Page_4, Now I want to link to them from the Information Box as I do NOT want another box to display them as I don't want many boxes on my wesbite!

I know about EZ-Pages, but that doesn't allow me to add the Links Created in the INFORMATION Box!

I am sure this can be done by adding the new links to the Information Box, I just don't know what code and what PHP file I would need to edit!

Can anyone please help.

Thank you

Best Regards,

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

6 Apr 2010, 6:39 AM
#2
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
475
Plugin Contributions:
0

Re: Adding More Links in the Information Box?

Hi All,

It's me again.
I just figured it out myself through Trial & Error :)

Just incase anyone else is interested in the same solution, here is what I did:

I Edited these PHP Files, Includes/modules/sideboxes/information.php & Includes/modules/sideboxes/more_information.php:

I took the following code from ( (Includes/modules/sideboxes/more_information.php):

if (DEFINE_PAGE_2_STATUS <= 1) {
$**more_**information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
}
if (DEFINE_PAGE_3_STATUS <= 1) {
$**more_**information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
}
if (DEFINE_PAGE_4_STATUS <= 1) {
$**more_**information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';

I then added the code above to the (Includes/modules/sideboxes/information.php) under the below code, but you can add it wherever you like:

if (DEFINE_SITE_MAP_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';
}

The ONLY thing I changed in the Code was I Deleted the (more_) from each line:

So my New Code looked like this:

if (DEFINE_PAGE_2_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
}
if (DEFINE_PAGE_3_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
}
if (DEFINE_PAGE_4_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';

I then Uploaded the New (Information.php) to my overides folder... (Includes/modules/sideboxes/Your_Template/information.php).

Now All the extra Links are showing in the Information Box so no need for the More Information Sidebox, WOOHOO :)

If anyone thinks what I did above was a bad for some reason, please let me know.

Best Regards,

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

6 Apr 2010, 1:50 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding More Links in the Information Box?

Thanks for posting the solution that worked for you as it is a help to others ...

The variable that you changed is meant to work that way ...

The variable is set to match the sidebox to help make more sense of what is being done as well as to keep the content separate from one sidebox to the next ...

So, the changes you made to get things to work from one sidebox to the other were correct ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Apr 2010, 11:58 PM
#4
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
475
Plugin Contributions:
0

Re: Adding More Links in the Information Box?

Hi Ajeh,

Over 50,000 Posts, how awesome to know you have help SO SO many People :clap: :clap: :clap: :clap: :clap: - Thank You!
I got one question please....
I tried to edit the link name for page_2, page_3 and page_4, but could Not do it through trial and error!
Example change ww.....com/page_2.html to ww......com/promotion.html!

Again, I rather not create a ez-pages links!

Can the link names actually be changed or is it futile to keep trying?
If they can, how would one attempt such a journey?

Please Advise.

Best Regards,

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

7 Apr 2010, 6:45 AM
#5
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Adding More Links in the Information Box?

That would be a bit more complex. The filenames are defined somewhere else. After editing those names, you'd either need to create files with those names, or else use the page_2 file itself, and add a URL rewrite to your .htaccess file to connect a URL request for example.com/your-page-name to the script at /index.php?main_page=page&id=page_2 or wherever it is located.

Online since 1995.

7 Apr 2010, 11:26 AM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Adding More Links in the Information Box?

The system I use could be easier...

I do away with the standard "Information" and "More Information" sideboxes completely.

I activate the EZPages sidebox - "Important Links" and change the box's define LABEL to "Information".

I then create EZPages INTERNAL LINKS for all those that would normally appear in the standard "Information" sidebox...
eg: Contact us = index.php?main_page=contact_us

I then use the MUCH EASIER ezpages facility to create new pages, and have an UNLIMITED number to play with.

20 years a Zencart User

7 Apr 2010, 11:54 AM
#7
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Adding More Links in the Information Box?

Yet more ways to skin ze cat!

Good post.

Online since 1995.

21 Apr 2010, 5:58 PM
#8
dcwd avatar

dcwd

New Zenner

Join Date:
Dec 2003
Posts:
10
Plugin Contributions:
1

Re: Adding More Links in the Information Box?

Just a quick thank you to the original poster - this is awesome!

Confucious says:
he who stands on commode, is high on pot!