Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom image sizing for new_products.php


Gomeza

Recommended Posts

Hi Folks

 

I know what I am trying to do can be done.

 

In my "new_products.php" page, there is the following code which uses variables to call the size I have entered for my small images in the admin panel. I want the images larger on this page only so the question is: How do I rewrite this code to put in custom image sizes?

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

 

Thank you all in advance.

Link to comment
Share on other sites

You can just substitute numbers for the PHP variables.

 

Like this:

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], '50', '100') . '</a>

I used the numbers 50 for the width and 100 for the height as examples only.

 

You can use whatever size you need to use.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...