This is a discussion on Image Changes with Color Attribute? within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi I was wondering if a mod exists that will change the default image of a product based on the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi I was wondering if a mod exists that will change the default image of a product based on the color choice attribute the visitor has selected. Similar to the hollisterco.com website. For example the default image of my product "beach tee" is a white beach tee. When the visitor is in the product description page they click on the color options and have blue, black and pink. When they select pink the white beach tee changes to an image of the pink beach tee and so forth. Any ideas, I can't imagine I'm the first one to want this |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| This will require a few rewrites from how OSCMax works One solution 1) modifications to product_info a) create the image display area as a <div> into which the image is loaded. b) write a function to load multiple image names into javascript variables c) add a javascript function to be called by the select onSelect that will do the image swap 2) modify tep_draw_selection_field from /includes/functions/html_output.php to create the select statement with an onSelect that runs the above javascript function Then make sure that the index on the select statements and the index on the variable names match so the correct select displays the correct image in the image <div> you created in the product_info page. Another option is to not load the image names in the product_info page, but to load them into the select statement. Another option is to not load them in the select statement, but to use an AJAX call from the onSelect to call a routine that checks to see if that product has an image to be loaded into the div for that select value and then load the image. Of the three options, the last is the slickest way to do it, It would require some database changes (attaching images to attributes) and a change in the admin to allow for the images to be attached to attributes. But it is the best overall solution and the most robust. (In other words, the first two are kluges that would work, but be harder to maintain the data, the last one would be a nice add on feature for product attributes and would be more maintainable across a store. It would also take longer to develop than the fast kluges.)
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| trying to change image mod, no image in popup | aaanativearts | osCMax v2 Customization/Mods | 1 | 05-09-2007 03:37 AM |
| contrib for switching buy it now image for out of stock image? | cara | osCMax v2 Customization/Mods | 1 | 01-18-2007 06:09 PM |
| Needing: Attribute Weight, Hide Price if 0, Actual Attribute | crystina | osCMax v2 Customization/Mods | 0 | 11-22-2006 04:08 PM |
| Products image missing popup image | islander | osCMax v2 Installation issues | 7 | 08-10-2005 12:30 PM |
| How do i put an image or color behind the store?? | winkscustoms | osCMax v1.7 Discussion | 1 | 03-17-2005 12:36 PM |