Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I create a new box in left column?


rumi

Recommended Posts

Posted

I had someone put a new page in my code base but she put it inside the Information box. I would like to put this in its own box with its own heading. This is an important feature of my business.

 

Please help!

 

Much Thanks

Posted
Just make a copy of the information box file, rename it and delete the parts of it you don't want.

 

Jack

 

I did as you suggested and copied the info from the information box file into a new file I created "galleries.php", deleted stuff I thought unrelated, and placed the new file in includes/languages/boxes.

 

  <!-- gallery listings //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_GALLERIES);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_GALLERIES) . '">' . BOX_INFORMATION_GALLERIES . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- gallery listings_eof //-->

 

In column_left.php I added "require(DIR_WS_BOXES) . 'galleries.php');

 

The new box is where I want it EXCEPT for now the box heading says "BOX_HEADING_GALLERIES" with the link to galleries listed inside the box, which I suppose is okay, but how do I change the awful box heading?

 

thanks for your help! Does it look like I edited the above code (from information.php) correctly?

Posted

Whenever you see capital letters like in BOX_HEADING_GALLERIES, it usually means a definition is missing. In this case, that is probably true. You need to edit your includes/languages/english.php file to include

define('BOX_HEADING_GALLERIES', 'Galleries');

You can change the text Galleries to whatever you want. The same definition will have to go in your other langauge files, if you use them.

 

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

Posted
Whenever you see capital letters like in BOX_HEADING_GALLERIES, it usually means a definition is missing. In this case, that is probably true. You need to edit your includes/languages/english.php file to include
define('BOX_HEADING_GALLERIES', 'Galleries');

You can change the text Galleries to whatever you want. The same definition will have to go in your other langauge files, if you use them.

 

Jack

 

Hi Jack,

Boy, what a mess Im in. For some reason I have 4 galleries.php files. One on the main index page, 1 in includes/languages/english/galleries.php, 1 in includes/languages/boxes/galleries.php, and another in includes/boxes/galleries.php!

 

I did however mangage to remove the BOX_HEADING_GALLERIES from the box heading. Inside that box now it reads BOX_HEADING_GALLERIES. I dont know how to fix this mess.

 

I would really appreciate any help. THANKS

Posted

The includes/languages/boxes/ path is invalid so that should be removed. For the other problem, did you change BOX_INFORMATION_GALLERIES to BOX_HEADING_GALLERIES by chance?

 

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

Posted
The includes/languages/boxes/ path is invalid so that should be removed. For the other problem, did you change BOX_INFORMATION_GALLERIES to BOX_HEADING_GALLERIES by chance?

 

Jack

 

Thank you for your response. I had tried following the directions in Documentation but finally gave up and paid someone to fix it for me. Everything works fine now.

Archived

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

×
×
  • Create New...