I have some time to work on this. But if you could list me a roadmap,
it would be easier, because I have little knowledgment about django or
satchmo code. I mean, what would be the satchomic way of doing that?

First, the enable/disable option for images according to products
variations should be a boolean column modeled in the DB, right? Or
isn't this needed at all, as we could jut verify if those images exist
or not?


Bruce showed a good solution,I will start with it.. Bruce, is the js
in the template hardcoded, or do you dinamacally generate it according
to the products name? Can you share this piece of code?

Also, I don't know what else you are doing with products.js, but maybe
we could move the relevant code (updatepictures function) to
satchmo_products.js?

So I think that thanks to Bruce it is almost done. User would check a
box if he want's to enable this behaviour. Then he would have to
upload the images mannually in the media folder, with names that
follow a pattern that is the same used in the template...

site_media/images/productimage-variationred-
tshirt830_bmp_522x340_upscale_q85.jpg


What do you think? Am I in the right direction?

Thanks,

Rafael









On 30 jun, 14:41, Chris Moffitt <[email protected]> wrote:
> It's been something on our radar for a while but I've never taken the time
> to implement. If you get something working, we'd definitely be interested in
> incorporating into tip.
> -Chris
>
>
>
>
>
>
>
> On Thu, Jun 30, 2011 at 12:19 PM, rafael <[email protected]> wrote:
> > Thanks a lot Bruce.
>
> > I will take a look and probably use your solution.
>
> > Anyway if there is someone planning to add this feature in satchmo
> > core I am willing to help.
>
> > Salute,
>
> > Rafael
>
> > On 30 jun, 13:45, Bruce Kroeze <[email protected]> wrote:
> > > It really isn't that difficult, quite achievable.
>
> > > I do it for my "Elenis" client.  Here's an example:
> >http://elenis.com/store/product/new-baby/
>
> > > If you change the gender, you get a different picture.  It is all done
> > with
> > > Javascript.
>
> > > It is a two-step process to achieve.  First, I prime the system with
> > > Javascript in the template.  I add a series of "optionpics".  Look at the
> > > source at the bottom, you'll see what I'm doing.  Each is an entry with a
> > > key and image information.
>
> > > Then I use jQuery to bind the "change" on option selectboxes to first
> > > calculate a key, then look to see if that key has a new picture, if so,
> > then
> > > show that picture.  The relevant jQuery code is in the "products.js" file
> > > which you can see on that site.  The function is "update_picture", and is
> > > called by "update_selected_options".
>
> > > On Thu, Jun 30, 2011 at 9:02 AM, rafael <[email protected]> wrote:
> > > > Hi everyone,
>
> > > > I see that some stores have a nice feature, that is dynamically change
> > > > the image according to the image variation option. Example: If the red
> > > > colour option is selected, the image displayed is of a red tshirt.
>
> > > > Has anyone done this before in sachtmo, does anyone have a roadmap on
> > > > how to do this.
>
> > > > I know this may involve creating a not so simple javascript, or even
> > > > work with svg, so I would like to know if anyone has battled with this
> > > > before I start to try to code anything.
>
> > > > Thanks,
>
> > > > Rafael
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Satchmo users" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected].
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/satchmo-users?hl=en.
>
> > > --
> > > Bruce Kroezehttp://www.ecomsmith.com
> > > It's time to hammer your site into shape.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Satchmo users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/satchmo-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to