In case someone interest in modifying the
template detail_configurableproducts.html wants to know, I think I've
figured this out:
It looks like the variable {{details}} comes from
product.modules.configurable.models.ConfigurableProduct. See line #230. This
template's view is defined in product.views.__init__.py line#155, which
calls this model's *add_template_context method*:
extra_context = product.*add_template_context*(context=extra_context,
request=request, selected_options=selected_options,
default_view_tax=default_view_tax)
This adds {{details}} to the context that gets rendered to the template
detail_configurableproducts.html. The template then uses this data in
line#19 satchmo.variations = {{ details|as_json }}; together with the
methods defined in satchmo_product.js. in order to enable/disable the Add to
cart submit button and add/hide a warning that the product variation item is
out of stock.
On Tue, Feb 1, 2011 at 11:43 PM, Malcolm MacKinnon <[email protected]>wrote:
> I can see details come from product.utils.py line 119, but how does it get
> called or passed to detail_configurableproduct.html?
>
>
> On Tue, Feb 1, 2011 at 10:55 PM, Mac <[email protected]> wrote:
>
>> I'm modifying the template detail_configurableproduct.html, and am
>> having difficulty understanding where the variable {{ details|
>> as_json }} comes from. The view is generated from apps/product/views/
>> __init__.py get_product, but I don't see how this variable gets
>> generated here. Does it come from another view or templatetag source?
>>
>> Any help would be very much appreciated. Thanks.
>
>
>
--
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.