Group: http://groups.google.com/group/satchmo-users/topics
- Satchmo and Django-tagging [1 Update]
Josue Balandrano <xir...@gmail.com> Sep 16 12:16PM -0700
Hi, I'm building a webstore. I am going to sell Jewelry here, so the thing
is that I have my main categories like "earrings, necklaces" and so on. But
I need some attributes like "Material, color, stone, size". But these can't
be Options because not every product is available in all colors or all
sizes and I don't fell comfortable with attributes because I need a way to
list all this attributes and be able to filter the result as per attribute
selected.
So I was thinking about installing Django-tagging, it seemes this is more
or less what I need. The only problem is if I am going to be able to have a
tree like distribution for my tagging? and do I have to modify the product
models in order to implement the tagging?
Thank you in advance.
You received this message because you are subscribed to the Google Group satchmo-users.
--
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
---- Metamorfosys GbR Guttenthau 6 95469 Speichersdorf T: +49 9648 913 594 F: +49 9648 913 643 in...@metamorfosys.de www.metamorfosys.de Geschäftsführung: Andrea de la Huerta u. Dominik Klüter Gerichtsstand: Ansbach m. Außenst. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. ------------------------------------------------------------------------- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ------------------------------------------------------------------------- -------------------------------------------------------------------------
Actually, something like that is what I was thinking last night while fliping through the pages of my Django Book.
I was thinking about using the Attributes model that Satchmo allready has, just to make it easier for future updates and so.
Then creating the values throught the python shell or raw SQL statements, so I would have Attribute.Name=Color, Attrubte.Values=[white,black,golden, [etc...]]
Then creating custom validations for this attributes which will not let the staff user to add more values than the values that allready exists in the DB. This way the staff user could only choose between the values that I allready populated (or any other admin user that know what he/she is doing).
This way I'm only going to have to create some views in order to retrieve this Attrbutes to display them the way I want. Something like doing a search of the attributes giving an array with the slugs and sorting them by Value, grouping the same value, and then by Attribute Name. This way I can create a list like this:
{% retrieve_special_atts "[custom slug a rray]" as Attributes %}
<ul>
<li>
{% for atname in Attributes %}
{{ Attributes.Name }}
<ul>
{% for value in Attributes.values %}
<li> {{value.name}} </li>
{%endfor%}
</ul>
{%endfor%}
</li>
</ul
This is not finished, because I will also need this not to be a list but a form. So every Attribute Value would be a checkbox, and whenever a user ticks any of the attribute values would call a filtering function wich would read the category that the user allready is in and the get data which will have the attribute filter values and fitler the products accordingly.