Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add a link to my info box


glusniffer1

Recommended Posts

Open the includes/boxes/information.php file. You will see how the other links are made. The defines in there, like BOX_HEADING_INFORMATION, can be found in includes/languages/engish.php.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Open the includes/boxes/information.php file. You will see how the other links are made. The defines in there, like BOX_HEADING_INFORMATION, can be found in includes/languages/engish.php.

 

Jack

OK but how do get my links that I would like to add to link outside of my cart?

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

in catalog/includes/boxes/information.php

 

look for the links then depending on the order you want them to show up just add a bit of code above the last link like this

 

'<a href="http://urltosite.com">New Link Name</a><br>' .

 

make sure it is above the last one or you will need to remove the . and add ); to the end of the line. Look at the code on the page and you should understand what I mean.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

OK below is my code to what you were talking about I tried all diiferent ways to do it and I com up with nothing.......

 

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' =>  
                                        '<a href="' . tep_href_link(FILENAME_APARREL) . '">' . BOX_INFORMATION_APARREL . '</a><br>' . 
          '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
          '<a href="'http://www.cafepress.com/t_h_u">T_H_U . '</a><br>' .
          '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
          
                                           
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- information_eof //-->

in catalog/includes/boxes/information.php

 

look for the links then depending on the order you want them to show up just add a bit of code above the last link like this

 

'<a href="http://urltosite.com">New Link Name</a><br>' .

 

make sure it is above the last one or you will need to remove the . and add ); to the end of the line. Look at the code on the page and you should understand what I mean.

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

Sorry all it doesnt work either...

 

 

'<a href="'http://www.cafepress.com/t_h_u">T_H_U . '</a><br>' .

 

Should be something like:

 

'<a href="'http://www.cafepress.com/t_h_u">' .T_H_U. '</a><br>' .

 

You have to make sure that T_H_U is defined.

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

Sorry all it doesnt work either...

 

<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- information //-->
        <tr>
          <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' =>  
                                       '<a href="' . tep_href_link(FILENAME_APARREL) . '">' . BOX_INFORMATION_APARREL . '</a><br>' . 
         '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                       '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                       '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
         '<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .
         '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
         
                                          
new infoBox($info_box_contents);
?>
          </td>
        </tr>
<!-- information_eof //-->

 

You had

'<a href="'http://www.cafepress.com/t_h_u">T_H_U . '</a><br>' .

should be

'<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Here is what I have...Its not working are you sure I dont have to do this anywhere else?

 

'<a href="'http://www.cafepress.com/t_h_u">' .T_H_U</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_APARREL) . '">' . BOX_INFORMATION_APARREL . '</a><br>' .
          '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
          '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

 

<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- information //-->
? ? ? ? <tr>
? ? ? ? ? <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' => ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'<a href="' . tep_href_link(FILENAME_APARREL) . '">' . BOX_INFORMATION_APARREL . '</a><br>' . 
? ? ? ? ?'<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
? ? ? ? ?'<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .
? ? ? ? ?'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 
new infoBox($info_box_contents);
?>
? ? ? ? ? </td>
? ? ? ? </tr>
<!-- information_eof //-->

 

You had

'<a href="'http://www.cafepress.com/t_h_u">T_H_U . '</a><br>' .

should be

'<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

No not all....OK now Im lost...I have other files to edit as well?...Which ones?

 

 

 

You still have the dot in the wrong place int the T_H_U part.? And just to confirm, ahve you defined T_H_U in the enlish.php file along with the rest of the info box definitions?

 

Jeremy

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

Yes, those bits in the statements that are like this "BOX_INFORMATION_CONTACT" etc. are not what actually shows up, it is a call to a defined bit of text in includes/languages/english.php

 

If you look in there, you'll find a chunk like this:

// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

These are the definitions for the info box, and you can add the text to define both T_H_U, and APARREL there, to stay consistent with the rest of the defines.

 

Jeremy

Link to comment
Share on other sites

OK i can get what I want to show up in the info box but when I add the link into the info file it doesnt work or even show the info box on my cart....

 

 

Yes, those bits in the statements that are like this "BOX_INFORMATION_CONTACT" etc. are not what actually shows up, it is a call to a defined bit of text in includes/languages/english.php

 

If you look in there, you'll find a chunk like this:

// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

These are the definitions for the info box, and you can add the text to define both T_H_U, and APARREL there, to stay consistent with the rest of the defines.

 

Jeremy

The Hobby Undergound..."For The Pure Hobbyist"

Link to comment
Share on other sites

I'm sorry, I got a bit mixed up by the T_H_U. I see the way wendy was doing it. You still had the dot in the wrong place, but if you put in this:

 

'<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .

 

it should not be necessary to define T_H_U in the language file (the BOX_INFORMATION_APARREL still requires it though!).

Link to comment
Share on other sites

change

'<a href="'http://www.cafepress.com/t_h_u">' .T_H_U</a><br>' .

to

'<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .

 

Are you using the file manager to edit this file? If so that can be messing with the code. Not sure why you keep getting the link wrong if you are just copy and pasting what I put here.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

If you just copy and paste this onto your file it should work correctly. Do not use the file manager. Download the file using and FTP program, edit it, then reupload it.

 

<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- information //-->
       <tr>
         <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' =>  
                                      '<a href="' . tep_href_link(FILENAME_APARREL) . '">' . BOX_INFORMATION_APARREL . '</a><br>' . 
        '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                      '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                      '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
        '<a href="http://www.cafepress.com/t_h_u">T_H_U</a><br>' .
        '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
        
                                         
new infoBox($info_box_contents);
?>
         </td>
       </tr>
<!-- information_eof //-->

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

  • 10 months later...

It took a bit of work following this thread, but I finally got links to my VafePress items into my infobox. Now I'm wondering if it is possible to get those links to open in a new window rather than in the same one, thereby leaving no way for the customer to continue shopping on my osCommerce site without hitting the back button. Can I make the links open in a new window?

Unique handcrafted jewelry, accessories, toys, home decor, digital art and much more.

Link to comment
Share on other sites

yes--use a target command in the link line

that should do it

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

you add the target="_blank" parameter into the link tag like

 

'<a href="http://www.cafepress.com/t_h_u" target="_blank">T_H_U</a><br>' .

 

Thanks. I wasn't sure if it would be that easy or not. It was. Much appreciated.

Unique handcrafted jewelry, accessories, toys, home decor, digital art and much more.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...