Community Add-Ons
| Maintainers: | pillepalle |
Self resizing popup_image.php depending on picture size
for osCommerce Online Merchant v2.2
Self resizing popup_image.php depending on picture size
------------------------------------------------------------------------------
This contrib comes originally from two other popup contributions
http://www.oscommerce.com/community/contributions,2240
http://www.oscommerce.com/community/contributions,2503
So all credits go to the original coders.
------------------------------------------------------------------------------
As I am using pictures with different heights and widths I modified the script and made it comfortable for me.
Check it and use it if you like.
This popup_image.php shows the product name, the big picture, the price and the product description.
The popup will resize itself according to the size of the picture no matter if there are different picture sizes.
The popup window will close itself when clicked into the popup or into the main window.
The visitor does not have to click any window-shut-down button, just does anything and the window is closed.
So there is even a little prevention of steeling pics (not for the cracks of course).
Depending on the length of your product description you have to adapt the length of the window by increasing/decreasing the
value 300 in line:
imgHeight = document.images[0].height+300-i;
If you want to adjust the place where the popup appears on the screen you have to do this in catalog/product_info.php
find the javascript definition function popupWindow(url) and change the values for 'top' and 'left'.
--------------------------------------------------------------
Step 1. Backup your files first :-)) do it
Step 2. copy the popup_image.php to the folder catalog
---------------------------------------------------------------
greetz pillepalle
This mod adds a "print this page" box and disables only the right click so your visitor can print the image, but not save it. This trimmed down version gives the heading, image, price and print box only. Install instructions are included in the original contribution
