osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Image Changes with Color Attribute?

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-24-2007, 04:30 AM
Lurker
 
Join Date: Jul 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
inalilbubble is on a distinguished road
Default Image Changes with Color Attribute?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 08-24-2007, 01:32 PM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 461
Thanks: 4
Thanked 79 Times in 73 Posts
Rep Power: 7
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: Image Changes with Color Attribute?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 01:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax