It sounds like you are doing something similar to what I plan on doing.  My
approach is to just use the created products to store the images.  What I
mean is that if you are using the built in Options management a product is
created for every combination of options.  So if you are just updating a
main image as they change options you should be able to just send in the
current options when one changes and get the picture off of the product that
the combination represents.
On Mon, Jul 13, 2009 at 1:16 PM, Chris Moffitt <[email protected]> wrote:

> You are technically correct, that you could modify the Satchmo models.
> However, that way will probably lead to more pain and misery in the future -
> when you try to sync up with the latest Satchmo release.
>
> My recommendation would be to create a separate model in your project that
> associates options and images. Then in your templates (probably via a custom
> template tag) pull together the image and the product to display in your
> jquery effect.
>
> There may be slightly more complicated but it will be much easier to
> maintain and upgrade going forward.
>
> Others in the group may have some other creative ideas but I think it's
> safe to say that you should always try to resist the temptation to modify
> the model files directly. Extending is almost always preferable.
>
> -Chris
>
>
> On Mon, Jul 13, 2009 at 11:29 AM, Jonathan Biddle <[email protected]>wrote:
>
>>
>> I'm building my first Satchmo site, and I was looking for some input
>> on how best to go about overriding the ProductImage model.
>>
>> The change I'm making to the model is pretty simple: Adding an
>> optional ForeignKey field to the Options model so an image can be
>> associated with an option (This is surfaced in the template for a
>> jQuery effect).
>>
>> My current solution was to just alter the model directly in the
>> Satchmo package, but I'm thinking there must be a better way of going
>> about this.  Any advice would be greatly appreciated!
>>
>>
>>
>
> >
>

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