Attribute image replaces main product image on sel

Description
This module provides the functionality to get the attribute image in place of main product image when user selects the particular attribute.
This functionality has a full control through admin. It can made on and off using admin.
It is very easy to integrate with zen cart.

To use this functionality ,
copy this module and run the sql query using admin sql patches.
To ON this functionality select the option name in option name manager and put the value 6 in Attribute Style for Radio Buttons/Checkbox:text box.
It also works for check box and has additional option type Link.
It can be made off by putting value 7 .
Thanks.
Will appreciate responce.
+ Download Latest

Forum Support Thread

Submit An Updated Version
Zen Cart® Versions v1.5.3, v1.5.4, v1.5.5
Original Author vishalmelmatti
Last Updated by mc12345678 - 16 Jul 2017
Downloads 4,324

Version History

Attribute image replaces main product image on sel   -   Version: 1.5.8
Updated 07/16/17, V1.5.8: (mc12345678)
1. Incorporated an option to swap the attribute image but not to show the attribute image adjacent to the attributes.
2. Added some code commenting in areas to highlight code changes needed for installation.
3. Incorporate additional data type casting to ensure data is provided in a known format.
4. Reduce the file checking if PRODUCTS_IMAGE_LARGER_TEXT_FILE_IMAGE is defined and set to off.
5. Incorporate the code applicable to zen colorbox (https://www.zen-cart.com/downloads.php?do=file&id=1322) to support
the swapped image being used within the colorbox in version 2.1.0 of that plugin or higher.
6. Further refined the display/transmission of the additional javascript handling image swap if the setting(s) support
displaying the image (ie. a status of 6 or 8 at this time as a status of 7 disables the display of attribute images.
7. Corrected initial load (reload upon return from shopping cart with product in the cart) functionality to properly handle
checkbox and radio selections, also to not try to take image action while updating the quantity of product.
  + Download
Zen Cart® Versions v1.5.3, v1.5.4, v1.5.5
Date Added 16 Jul 2017
Author mc12345678
File Size 36.1 KB
PHP 5.3 Safe? Yes
Downloads 55
 
Attribute image replaces main product image on sel   -   Version: v1.5.7
- Added "Removal" of most of the javascript code if the admin option to not display attribute images is set to true. This
is expected to have a positive impact on load speed for such conditions.
- Modified the approach to the image swap, but left behind the previous code with it commented out. The reason is that
now instead of returning a newly formatted image (which requires more device communication), the original image is
"restored" if there is no attribute image assigned.
- Added some console logging of debug information if the attempt to execute the initialization code fails.
  + Download
Zen Cart® Versions v1.5.3, v1.5.4, v1.5.5
Date Added 11 Jan 2017
Author mc12345678
File Size 34.6 KB
PHP 5.3 Safe? Yes
Downloads 92
 
Attribute image replaces main product image on sel   -   Version: v1.5.6
- Modified approach to display the swapped attribute image to use ZC's ajax method instead of an additional file from this plugin.
- Updated the install SQL to account for other products_options_types having been added.
- Used POST related transfer of data rather than the URL to improve on security.
- Added that if an attribute selected does not have an image associated with it that the default/main product's image would be displayed.
- Added javascript to load the attribute image if the product information page is displayed with the attribute(s) already selected.
- Incorporated the module main_product_image.php code to support Image Handler operation on the attribute file.
- Moved added attributes related code into an observer file with minor modifications made to the provided attributes.php file associated with ZC 1.5.5's version of the file. Additional effort would be needed to completely remove all modifications and instead use more of a javascript insertion/modification.
- Modified/expanded the readme instructions.
- Added a SQL query to be run if determined necessary because of not updating to ZC 1.5.5 and missing database records.
- Modified code to use ZC standard defined variables/constants rather than hard-coded (i.e. DIR_WS_IMAGES instead of 'images/')
- Made use of an image such as bigger_picture.jpg optional where the standard 'larger image' (TEXT_CLICK_TO_ENLARGE) text will be shown if the file does not exist.
- Resequenced the javascript so that expected variables/data would be in scope, minimizing the processing needed to display/correct the javascript code.
- Reduced the amount of code that needed to be merged versus added by pulling the javascript code added by this module out of jscript_main.php and putting it into its own jscript_ file.
- Moved an extra function demonstrated to be called only by this plugin into the observer class, although the code that calls the zen_link function doesn't provide all of the data necessary to use the function to its maximum extent. The code remains intact, but does not appear to provide the intended operation/capability.
- As compared to the previous version, the additional attribute images will be displayed if the attribute image style is selected to be 6, but will be removed if set as 7. In both conditions 6 and 7, the attribute image will be swapped with the main product image upon selection.
  + Download
Zen Cart® Versions v1.5.3, v1.5.4, v1.5.5
Date Added 18 Dec 2016
Author mc12345678
File Size 32.4 KB
PHP 5.3 Safe? Yes
Downloads 39
 
Attribute image replaces main product image on sel   -   Version: 1.5.5
Merged with latest 1.5.5 version of Zen Cart.   + Download
Zen Cart® Versions v1.5.5
Date Added 19 Oct 2016
Author travbow
File Size 23.9 KB
PHP 5.3 Safe? Yes
Downloads 57
 
Attribute image replaces main product image on sel   -   Version: 1.3.7.1
In this improved verson, the main image remains same for the attribute which do not have attribute images.
This module provides the functionality to get the attribute image in place of main product image when user selects the particular attribute.
Attribute images can be opened in new popup window.
This functionality has a full control through admin. It can made on and off using admin.
It is very easy to integrate with zen cart.
To use this functionality ,
copy this module and run the sql query using admin sql patches.
To ON this functionality select the option name in option name manager and put the value 6 in Attribute Style for Radio Buttons/Checkbox:text box.
It also works for check box and has additional option type Link.
It can be made off by putting value 7 .
Will appreciate responce. Please let me know your valuable comments which are very important for me to further upgrade this module.
Thanks.
  + Download
Zen Cart® Versions v1.3.7
Date Added 14 Apr 2008
Author vishalmelmatti
File Size 22.8 KB
PHP 5.3 Safe? Unknown
Downloads 3,772
 
Attribute image replaces main product image on sel   -   Version: 1.3.7.0
  + Download
Zen Cart® Versions v1.3.7
Date Added 11 Apr 2008
Author vishalmelmatti
File Size 22.6 KB
PHP 5.3 Safe? Unknown
Downloads 309
 


disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR