PVK Posted June 29, 2004 Posted June 29, 2004 Does anyone know how to make the image on the products info page to appear directly in its full size, so that you don't have to click the : click here for bigger image text anymore [this text could be removed as well then] I know i can set the normal image in the admin, but the the product listing shows it big as well [which i want to stay scaled] Which code in the product info do i have to remove or XXX out ? Thanks
PVK Posted June 29, 2004 Author Posted June 29, 2004 OK, already found it hehehe :lol: FOrget about the post :P
Acheron Posted June 29, 2004 Posted June 29, 2004 You would simply need to remove the size entries in product_info I believe. I set mine up so it could be configured via Admin CP independently of the other pages. Well it's around Line 120 for me (probably much higher up for you) but I did this: tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], PRODINFO_IMAGE_WIDTH, PRODINFO_IMAGE_HEIGHT, and run this SQL: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Product Info Image Height', 'PRODINFO_IMAGE_HEIGHT', '143', 'The pixel height of product info page images', 4, 10, '2004-05-28 12:34:54', '2004-05-20 03:39:17', NULL, NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Product Info Image Width', 'PRODINFO_IMAGE_WIDTH', '190', 'The pixel width of product info page images', 4, 9, '2004-05-28 12:34:38', '2004-05-20 03:38:17', NULL, NULL);
PVK Posted June 29, 2004 Author Posted June 29, 2004 Oke, i did it a bit different which makes you only have to edit the product info page. I just removed some lines from the java script which gave me the result i wanted. Don't know if it is the most sexy or correct way, but the result works. I try to keep the extra sql commands to a minimum, since i am not to keen on changing stuff in that part if it is not absolutely nescesarry [Can mess up things to easy ther IMO] Anywayz, for those who are a bit afraid / paranoia / sql cautious / better on the safe side just like me here is my simple solution. Original code was : <script language="javascript"><!-- document.write('<?php echo '<a href="java script: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> Now it is : <script language="javascript"><!-- document.write('<?php echo '' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), 'hspace="5" vspace="5"') . '<br>' . '</a>'; ?>');
Acheron Posted June 29, 2004 Posted June 29, 2004 I try to keep the extra sql commands to a minimum, since i am not to keen on changing stuff in that part if it is not absolutely nescesarry [Can mess up things to easy ther IMO] Ah it's only modifying data you need to be really careful with. With new data, the worst you can typically do is have useless data in your DB. hehe For removal, the way you did it is perfect. My suggestion was geared towards setting the size independently of anything else in your store rather than removing it altogether. :) That's what I'm not too keen on. I'd rather not remove anything but rather comment it or make it configurable in admin in case I change my mind later. ;)
PVK Posted June 29, 2004 Author Posted June 29, 2004 Yeah, you are right i know.I also like to keep everything in tact if possible, but i found in this case, that i never realy used the magnification thing anyway, and i always found myself clicking the image to make it bigger . I also used the nomore popups in the past, but basically why i had that is that : popups suck [unless there really is no other choice] and i still found myself magnifying the product image [that's why you put it there in the first place innit :) However your solution (if i am reading correctly), does that allow you to set the size for every product image independantly from the others ? [which would be really cool of course], so maybe i would undo my changes again [this is the point where you are right with your theory hahaha :D ] Thanks for your interest
Acheron Posted June 29, 2004 Posted June 29, 2004 It would allow you to set the size for all product images independently of say the index, search, whatever. I actually have 4 altogether as I found the simple 'large' and 'small' too restrictive. :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.