I was reading (*gasp*) more of 
http://thisismedium.com/tech/satchmo-diaries-part-one/
- Part 2 and part 3 seem to describe what I want to do. (Part 3
specifically with the modification of the cart details). I think this
might be one solution to Question 2.

So, for Question 1, I'm going to assume that I need to hijack a signal
from Product, and write a listener function to add a form object to
the response, and then call that object in the template?

I'm not going to mark this as "Solved my own problem" because I'm
still open to any ideas.

Thanks in advance!


On Aug 25, 12:36 pm, Lagg <[email protected]> wrote:
> Thanks to help from the group, I was able to get a custom product
> created, added to the admin, and show up in the store.  (I followed
> the method described here 
> :http://thisismedium.com/tech/satchmo-diaries-part-one/
> )
>
> The product (MultiColorProduct) I created only differs only from the
> default Product in that it has a (one) ManyToManyField( called
> 'colors' ) so that it can have multiple colors selected (Think tie dye
> tshirt).
>
> class MultiColorProduct(Product):
>     objects = ProductManager()
>
>     colors = models.ManyToManyField(Color)
>
>     def __unicode__(self):
>         return u'%s' % self.name
>
> Now comes actually adding my MultiColorProducts to the cart.
>
> Question 1)
> How would be the best way to display a multiselect box with the
> MultiColorProducts.colors as the options?
> I did this in product/product.html
>
> <select multiple="multiple" name="colors" id="id_colors">
> {% for c in product.multicolorproduct.colors.all %}
>     <option value="1">{{c.name}}</option>
> {% endfor %}
> </select>
>
> Obviously "option value" needs to change for each product (I just
> threw the code in there for proof of concept), but isn't there a more
> django-esk way of getting that data displayed? A form class or model
> form class of some sorts? If so, how would I get that class
> instantiated since I'm taking Bob Waycott's advice and not messing
> with any views.
>
> Question 2)
> How should I go about getting the custom product data saved to the
> cart? Should I try to get the cart to recognize custom data as
> CartDetail data? Should I extend Cart into a custom Cart model? Should
> I do something completely different?
>
> Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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