Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Replace "You'll also like" column with column_right.php


Guest

Recommended Posts

I came across your post pertaining to the "You'll also like" thread. I would like to replace the "You'll also like" column with the right_column.php file. Can you please let me know which code that I need to replace in the index.php file and the proper syntax to call the right_column.php file?

 

Hi Chris, I am not a programmer but know a little bit about HTML. Some templates don't seem to follow the standard oscommerce file format we know and love. I had to wrap ALLLLLLLL my .php files inside a table (<table border="0" width="600" cellspacing="0" cellpadding="0">) and create two columns <td>. The first column contains the Featured Products stuff and the second column has the column_right stuff. I also found that when I called the column_right.php file, my box header information was completely missing. So, I had to manually create them using the code below. What a pain. I was hoping that I could avoid updating every file like this.

 

Is there a better way than this?

 

<!-- Begin Column_Right 
<td style="padding-left:3px" valign=top></td> //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<tr><td background=images/m19.gif width=155 height=36 colspan=10 class=bc><b>     Shopping Cart</b></td></tr>
<tr><?php require(DIR_WS_BOXES . 'shopping_cart.php'); ?></tr>
<tr><td></td></tr>
<tr><td background=images/m19.gif width=155 height=36 colspan=10 class=bc><b>      Reviews</b></td></tr>
<tr><?php require(DIR_WS_BOXES . 'reviews.php'); ?></tr>
<tr><td></td></tr>
<tr><td background=images/m19.gif width=155 height=36 colspan=10 class=bc><b>      Information</b></td></tr>
<tr><?php require(DIR_WS_BOXES . 'information.php'); ?></tr>
</table></td>
<!-- right_navigation_eof //-->

Link to comment
Share on other sites

INSTRUCTIONS

 

1. Open catalog/includes/application_top.php

2. Find the line (around line 47) that reads

 

// customization for the design layout

define('BOX_WIDTH', 145); // how wide the boxes should be in pixels (default: 125)

 

3. after this, add the following lines ....

 

// customization for the design layout left column

define('BOX_WIDTH_LEFT', 165); // how wide the boxes should be in pixels (default: 125)

 

// customization for the design layout right column

define('BOX_WIDTH_RIGHT', 125); // how wide the boxes should be in pixels (default: 125)

 

 

6. (set your own width preferences (I have used 165 pixels for the left column and 125 pixels for the right) Save file

 

7. Now open the second file to edit: catalog/default.php

8. Find the first line to change at (around line 51) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

9. REPLACE this line, with the following line ....

 

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">

 

10. Find the second line to change at (around line 325) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

11.REPLACE this line with the following line....

 

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">

 

5. save the file and upload your 2 changed files to your active installation.

Link to comment
Share on other sites

7. Now open the second file to edit: catalog/default.php

8. Find the first line to change at (around line 51) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

9. REPLACE this line, with the following line ....

 

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">

 

10. Find the second line to change at (around line 325) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

11.REPLACE this line with the following line....

 

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">

 

5. save the file and upload your 2 changed files to your active installation.

 

I don't have these lines in my index.php file. In fact, I have nothing that references BOX_WIDTH in my index.php file.

 

Thanks,

 

Chris

Link to comment
Share on other sites

Hummmmmmm the rest of us do. Please reread the instructions.

 

This is what my catalog/index.php says at line 51

 

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

I said catalog/index.php and not catalog/includes/languages/yourlanguage/index.php :blush:

 

I don't have these lines in my index.php file. In fact, I have nothing that references BOX_WIDTH in my index.php file.

 

Thanks,

 

Chris

Link to comment
Share on other sites

Hummmmmmm the rest of us do. Please reread the instructions.

 

This is what my catalog/index.php says at line 51

 

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

I said catalog/index.php and not catalog/includes/languages/yourlanguage/index.php :blush:

 

I am using a template from Template Monster and I have searched every file for BOX_WIDTH_LEFT. There are no files that have this in their code. Any ideas?

 

Thanks,

 

Chris

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...