Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create New Box - Encounter Error


wancy

Recommended Posts

Posted

Hi,

 

I was trying to add new box with new links on the corner left and here is the steps i have taken :

 

[1] Open /catalog/includes/boxes/information.php and save it as /catalog/includes/boxes/mybox.php.

[2] Then in /column_left.php, i have added in the line "require(DIR_WS_BOXES . 'MYBOX.PHP')";

at the above "require(DIR_WS_BOXES . 'information.php')"; line.

[3] in the /catalog/includes/filename.php, i have create four new define statements as follows :

define('FILENAME_MYPAGE1', 'mypage1.php');

define('FILENAME_MYPAGE2', 'mypage2.php');

define('FILENAME_MYPAGE3', 'mypage3.php');

[4] in the file /catalog/includes/languages/english.php, i have wrote the following code in it :

define('BOX_HEADING_MYBOX', 'Shopping Guide');

define('BOX_MYBOX_LINK1', 'How To Buy');

define('BOX_MYBOX_LINK2', 'How To Pay');

define('BOX_MYBOX_LINK3', 'How To Deliver');

[5] in the file /catalog/includes/languages/english/shipping.php, i have edit the following :

define('NAVBAR_TITLE', 'How To Buy');

define('HEADING_TITLE', 'How To Buy');

define('TEXT_INFORMATION', 'Information');

save as /catalog/includes/languages/english/mypage1.php. I have repeated the same

by creating /mypage2.php and /mypage3.php.

[6] in the file /catalog/shipping.php, i have replaced "FILENAME_SHIPPING" with "FILENAME_MYPAGE1," and

save as /catalog/mypage1.php. I have repeated the same to create for "FILENAME_MYPAGE2," save as /catalog/mypage2.php

and "FILENAME_MYPAGE3," save as /catalog/mypage3.php

[7] finally, i have edit the file /catalog/includes/boxes/mybox.php to the following :

 

<?php

/*

$Id: information.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- information //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_MYBOX);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_MYPAGE1) . '">' . BOX_MYBOX_LINK1 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MYPAGE2) . '">' . BOX_MYBOX_LINK2 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MYPAGE3) . '">' . BOX_MYBOX_LINK3 . '</a>');

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_eof //-->

 

After finish, i able to see the new box with the new links on my page but when i click on the link i encounter the error :

Internal Server error : The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Izit my steps at the above mentioned are wrong or did i miss out something?

 

Please help.

 

Thanks.

Posted
Where do i need to check my link whether it is pointing to the right link?

 

 

1. You may check the source code ( on IE you may right click on the webpage you are browsing and select view source - which would open up the HTML in notepad.)

 

2. Right click on the link and select option to "copy shortcut" or "copy Link Location" and then save it to text editor to see what is the final format of link

 

3. Status bar in most of the browsers show the link location when you keep your mouse on top of the link.

 

---------

 

Internal Server Error could be because of .htaccess file directives. Are you using that on your server?

 

Thx

Best Regards,
Gaurav

Posted

Hi,

 

As advice the way to check on the links whether it is link correctly, here is my findings on my links when i view sourcecode on my page :

 

<a href="http://cleocats.com/mypage1.php">How To Order</a>

<a href="http://cleocats.com/mypage2.php">How To Pay</a>

<a href="http://cleocats.com/mypage3.php">How To Deliver</a>

 

I had no idea what is wrong here? Coz it seems the link are link correctly.

 

Did i left out any settings? or the steps i had followed to create the new box and links were not correct?

 

Please help.

Posted

Hi,

 

As advice the way to check on the links whether it is link correctly, here is my findings on my links when i view sourcecode on my page :

 

<a href="http://cleocats.com/mypage1.php">How To Order</a>

<a href="http://cleocats.com/mypage2.php">How To Pay</a>

<a href="http://cleocats.com/mypage3.php">How To Deliver</a>

 

I had no idea what is wrong here? Coz it seems the link are link correctly.

 

Did i left out any settings? or the steps i had followed to create the new box and links were not correct?

 

Please help.

Posted

Hi,

 

At last my links are working now...pheww....

 

i've tried to re-create the new box and new links by repeat the same steps as i stated at above and finally they are works now. I notice it is the error inside the file /catalog/includes/boxes/mypage.php.

 

Thanks to you guys for your advice on checking the links.

Archived

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

×
×
  • Create New...