Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Configuration questions


joss54

Recommended Posts

Posted

Hello,

 

I'm also new to the oscommerce project and I'm starting a shop with gifts, but I have some questions about the configuration...

 

1. I'd like to have the photos of my products on the left side instead the right. I think that this is done through the product_info.php file but I know little about PHP. Can anyone help me?

 

2. Can the New Products of the month box be displayed only on the first page and not the rest?

 

3. I want to resize the width of the categories box to be bigger. I see in the index.php file a line

 <?php echo BOX_WIDTH; ?>

but where can I edit it? And can I have instead a dynamic menu like http://www.kmshop.de/? Is this possible?

 

Thnx everyone in advance.

Posted

Number 1: open catalog/products_info.php and find the following section of code:

 

 ? ? ? ? ?<table border="0" cellspacing="0" cellpadding="2" align="right">
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
? ? ? ? ? ? ?</td>
? ? ? ? ? ?</tr>
? ? ? ? ?</table>
<?php
? ?}
?>
? ? ? ? ?<p><?php echo stripslashes($product_info['products_description']); ?></p>

 

Change it to this:

 

 ? ? ? ? ?<table border="0" cellspacing="0" cellpadding="2" align="right">
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
? ? ? ? ? ? ?</td>
? ? ? ? ? ? ?<td class="main"><p><?php echo stripslashes($product_info['products_description']); ?></p></td>
? ? ? ? ? ?</tr>
? ? ? ? ?</table>
<?php
? ?}
?>

 

That will put the product images on the left instead of the right.

 

Number 2: Display new products box only on the first page:

 

Open catalog/index.php and find the following lines (on or near line 120):

 

<tr>
<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
</tr>

 

It's in there twice. Find the one near line 120 and comment it out like this:

 

<tr>
<td><?php // include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
</tr>

 

Number 3: Resize the box width. Open catalog/includes/application_top.php and find the following code (on or near line 58):

 

// customization for the design layout
?define('BOX_WIDTH', 124); // how wide the boxes should be in pixels (default: 125)

 

Change the number 125 to the number of pixels you want your box width to be.

 

There are several contributions for dynamic menus. I haven't tried any of them, but there are others here who may be able to help you with that.

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ

Posted

Thnx a lot for your help and your quick answer...

 

Though I found out some problems:

 

When I change the code for the first problem, the image goes on the left only when I put some text inside and also if the line of the text is not big enough, to have a new line, the image starts from the beginning of the text where it puts it in the middle of the table. Can align the table to left, like this?

  </noscript>
            </td>
            <td class="main" align="left"><p><?php echo stripslashes($product_info['products_description']); ?></p></td>
          </tr>
        </table>
<?php
  }
?>

 

 

About the contributions, I've tried some but they don't seem to work with a lot of categories. I may stay with this, now that it seems better resized.

 

Anyway thnx again for your reply and if you can help me with my first problem.

Posted

I found it!

 

Just a few lines before it had:

 <table border="0" cellspacing="0" cellpadding="2" align="right">

and i changed it to:

 <table border="0" cellspacing="0" cellpadding="2" align="left">

 

 

Thnx a lot for your help... :D :D

Posted

Hello, I just wondered if you knew how I would remove the product description image ONLY from the description page, I still want to be able to view the image when browsing through categories. The reason for this is, on all of my description pages I have images of the game case and in game screenshots all in a table, and it seems to squash the image and make it look silly. Most grateful.

 

- Jon

Posted

If I understood correctly go to the admin panel, then to

 

configuration -> product listing -> display product image = 0

Archived

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

×
×
  • Create New...