kc0eks Posted January 2, 2005 Posted January 2, 2005 hello, im trying to make all of my images automatically assigned as the model number. since i name my images exactly as model, i want osc to do the work for me. I have found this code: <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'] , $products['products_name']); ?> and i can mod it to be very close to what i need...but i cant get the .jpg extension on it. when i change it to: <?php echo tep_image(DIR_WS_IMAGES . $products['products_model'] , $products['products_name']); ?> it looks for an image with the model number.. however I can not get the .jpg extension apended to it. i can get jpg, but not .jpg.... Now i am no php coder so I am doing this blindly, any help? :) thanks all
kc0eks Posted January 2, 2005 Author Posted January 2, 2005 ok 2 hours of this...and all i needed was a fresh look at it. my mod worked, whether it is the correct way I dont know. either way you can ingore this thread ;)
kc0eks Posted January 2, 2005 Author Posted January 2, 2005 more tweaking and I found a problem... none of the image contribs work when I mod it this way, so i cant keep proportions or use thumbnail optimizers... does anyone know of a better way to do this? I spent quite a while searching here, and only found other people asking how to do this ;P
mhormann Posted January 2, 2005 Posted January 2, 2005 <?php echo tep_image(DIR_WS_IMAGES . $products['products_model'] . '.jpg', $products['products_name']); ?> This will CALL up an image that's called like the MODEL but SHOW as 'alt' text the PRODUCT_NAME. Is that what you want? I don't want to set the world on fire—I just want to start a flame in your heart. osCommerce Contributions: Class cc_show() v1.0 – Show Credit Cards, Gateways More Product Weight v1.0
Recommended Posts
Archived
This topic is now archived and is closed to further replies.