NeKama Posted February 17, 2004 Posted February 17, 2004 Hi, In configuration it is possible to set the heading and small image sizes, etc. But does anybody know of a way to add a standard image size? Let's say I am looking for a 'Medium Image Size' to set and to refer to in my coding of the pages. This should be possible shouldn't it? Anybody have a suggestion? Thanks!
NeKama Posted February 17, 2004 Author Posted February 17, 2004 Never mind, figured it out already. For those interested: I added an entry in the SQL Configuration table belonging to configuration group, called "MEDIUM_IMAGE_SIZE". By doing so, it becomes available in the Admin configuration menu. When I enter the value of 250 there, and call the tep_image function in pages like this: <?php echo tep_image(DIR_WS_IMAGES . $product_info['product_image'], "My Product", MEDIUM_IMAGE_SIZE); ?> The width is set to 250 and the height is calculated to constrain proportions. This will then never screw-up the table and thus the entire page. Maybe there are better or prettier ways, and I am interested to learn of them, but this was the easiest and quickest for me.
bigdyce45 Posted February 29, 2004 Posted February 29, 2004 OK this is just what I've been looking for. But can you break it down for me(I'm a newbie)? What do you mean "SQL configuration"?
bigdyce45 Posted February 29, 2004 Posted February 29, 2004 I need like a 'Step-by-step' or something.
NeKama Posted March 2, 2004 Author Posted March 2, 2004 Hi, What I meant is that you need to connect to the sql database. Then go to the table: Configuration. Each line in this table is also assigned to a configuration group. You need to find the configuration group which also contains "SMALL_IMAGE_WIDTH". I believe it is group 4. You need to copy this entry and rename it to MEDIUM_IMAGE_SIZE. By storing it there, it automatically becomes visible in the Admin pages, and you can edit the value there. The width is the size you can set, and to keep proportions in order, the height is calculated automatically. Hope this makes it clearer. Don't worry, I started configuring my site just a month ago and had no knowledge of php. Good luck :unsure:
bigdyce45 Posted March 7, 2004 Posted March 7, 2004 OK, I added the option in the Admin/Images. But I'm having trouble calling it on the product info page. This is what I have: <?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'], MEDIUM_IMAGE_SIZE, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> What am I doing wrong? P.S. I want to it to continue to click to the larger image.
JuxiZoza Posted March 7, 2004 Posted March 7, 2004 But I'm having trouble calling it on the product info page.What am I doing wrong? There is much more to it than changing just a couple lines of code. There are several contributions with different features that you can use. One that I'm familiar with is "Sm,Med,and Lg Images" http://www.oscommerce.com/community/contributions,695 You can have small image for "results" pages, medium for product information, and large for pop-up.
bigdyce45 Posted March 9, 2004 Posted March 9, 2004 Thanks for the help. I downloaded the contributions, but I can't read any of the "README" files. What program do I need to read them?
Guest Posted March 9, 2004 Posted March 9, 2004 followed the suggested link, replaced files and ended up with this: 1054 - Unknown column 'p.products_mediumimage' in 'field list' select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_mediumimage, p.products_largeimage, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id = '31' and pd.products_id = p.products_id and pd.language_id = '1' [TEP STOP] ???????????????
JuxiZoza Posted March 9, 2004 Posted March 9, 2004 Thanks for the help. I downloaded the contributions, but I can't read any of the "README" files. What program do I need to read them? I use "Wordpad", its in Windows "Accessories", to read the text files in the contributions because it handles Unix txt files.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.