Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

border around product images


abra123cadabra

Recommended Posts

Hi @all!

 

I would like to surround the product images with a border but I haven't got a clue where on product_info.php I have to do the alteration. I expect that I have to add border="2" or something similar.

 

The second thing I would like to change is the size of the popup-window when I click on the product image to enlarge it. I made some changes there, but the window is still the same size.

 

Any help is much appreciated.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

Found a workaround for the image border issue. Just used the table border and it's working ok.

 

The other thing with the popup window still is a problem. I changed height and width of the popup but when I use the link, the window opens to the new dimensions and then resizes to the original popup size. No idea why.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

Found a workaround for the image border issue. Just used the table border and it's working ok.

 

The other thing with the popup window still is a problem. I changed height and width of the popup but when I use the link, the window opens to the new dimensions and then resizes to the original popup size. No idea why.

 

abra

 

assuming you edited lines 27 to 31 of product_info.php...

 

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

 

when editing these sizes did you edit all of them to determine the exact sizing?

 

you will also need to make sure your larger image will fit into the new size of pop-up window

Link to comment
Share on other sites

Yep, that's where I changed width and height to 200. Most of my gifs are 150x150. I also tried to set the dimensions to 400. That's when I saw the downsizing. I left screen, top and left unchanged as I assumed they determine the location of the window.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

  • 1 month later...

In case someone wonders where to put the border statement it goes here: Observe that this line is modded by me to correct aspect ratio and such, but you should get the idea for your code.

 

<?php echo '<a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) .'" target="_blank" onClick="popupWindow(this.href); return false;">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'] , $product_info['products_name'], (SMALL_IMAGE_WIDTH*3), ((SMALL_IMAGE_HEIGHT*3) / $aspect_ratio), 'hspace="5" vspace="5" border="1"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

Link to comment
Share on other sites

For my first solution I just wrapped the code bit above into it's own tables creating a border similar to the infoboxes.

 

There is also a contribution which allows you to wrap your images in frames or borders but I wasn't convinced about the 3D effect involved.

 

A few days ago I discovered the CSS property border which I applied to a new surrounding <div> tag. The resulting border is thinner and it surrounds the image plus the enlarge link.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...