Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What files are used to change the following...


azo313

Recommended Posts

I am wondering what file will allow me to change the table that creates the infoBoxHeadings. In other words, lets say I want to change the number 14 below to 20 or something, what file is the following code actually stored in:

 

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td>
   <td width="100%" height="14" class="infoBoxHeading">Categories</td>
   <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>

 

Also, lets suppose I want to add a JPG image on the right column of my site under the currency box. What file would I add this to? It's simply some HTML not PHP code that I need to add.

Link to comment
Share on other sites

You make the height change to includes/classes/boxes.php. To add something to the right column, you make a change to the includes/column_right.php file.

 

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

When I add html code for images to includes/column_right.php, I am adding them to the very bottom of the file under the close PHP tag. However, on the web site they are showing up at the very top... even on top of the shopping cart box. How do I fix this issue?

 

Secondly, what is the easiest way to disable the corner_left.gif and corner_right.gif images as I would like to use my own header images for the infoboxes.

Link to comment
Share on other sites

When you add the code to the right column, be sure to add it after the last ?>.

 

To remove the corner boxes, go into the includes/boxes/ directory and edit each file there. You'll see a line that reads

new infoBoxHeading($info_box_contents, false, false);

Changing the false to true will cause one of the corners to change. Try it to see what I mean.

 

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

Hi Jack,

 

I did add the code to the right column under the last ?>.

 

That causes the image to appear at the top, even before the shopping cart box. Any idea how I can resolve this?

 

P.S. Thanks, I removed the corner images.

Link to comment
Share on other sites

I'm sorry, I didn't read your request correctly. When you see something like require(some_php_file), like you do in the right column, what that is doing is inserting a bunch of code. That code will contain, or be interpreted as, html. So when you see those require or include statements, you can picture them as a bunch of regular html table cells. If you add your html after them, then that is how they will be displayed, just like in regualr html. So you need to insert your code into the part of the file that will make it appear as you want.

 

For example, let's say you have the following in your column_right.php file:

include(DIR_WS_BOXES . 'specials.php');
require(DIR_WS_BOXES . 'reviews.php');

and you want your html to appear between those two. You need to tell it to stop seeing the items as php and insert your code in between them. You do this by enclosing your code with ?> and <?php. So it would appear as

include(DIR_WS_BOXES . 'specials.php');
?>
<tr>
<td> your stuff goes here</td>
</tr>
<?php
 require(DIR_WS_BOXES . 'reviews.php');

Let me know if this doesn't clear it up for you.

 

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

When you add the code to the right column, be sure to add it after the last ?>.

 

To remove the corner boxes, go into the includes/boxes/ directory and edit each file there.  You'll see a line that reads

new infoBoxHeading($info_box_contents, false, false);

Changing the false to true will cause one of the corners to change.  Try it to see what I mean.

 

Jack

 

Jack,

 

This worked great in removing the rounded corners. However, there is a box on the homepage in which I am unable to remove them. The box is labeled "New products for October."

 

I tried looking in the file called whats_new.php in the boxes folder. However, there is nothing set to true in that file.

 

Please advise how I can remove the rounded edges from this box.

Link to comment
Share on other sites

Those are added in the includes/classes/boxes.php file. Find this code there

 class contentBoxHeading extends tableBox {
   function contentBoxHeading($contents) {
     $this->table_width = '100%';
     $this->table_cellpadding = '0';

     $info_box_contents = array();
     $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                        'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
                                  array('params' => 'height="14" class="infoBoxHeading" width="100%"',
                                        'text' => $contents[0]['text']),
                                  array('params' => 'height="14" class="infoBoxHeading"',
                                        'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

 

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

Archived

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

×
×
  • Create New...