Thanks, Bob,

I was able to override the core detail view for custom order products,
but I had to cobble together a silly hack to get my url pattern above
the core patterns:

my_patterns = patterns('',
    (r'^shop/product/(?P<product_slug>[-\w]+)/$',
'my_app.storefront.views.get_my_product', {}, 'satchmo_product'),
)

temp_urlpatterns = urlpatterns
urlpatterns = my_patterns
urlpatterns += temp_urlpatterns

>>>is there a better way of doing this?


To document the overriding view solution:
1. copy the get_product() view to the local views.py and change its
name (for example, get_my_product())

2. copy over the import statements from the core to the local

3. copy the following line to the local after the imports:
    NOTSET = object()

4. change this line:
    template = find_product_template(product,
producttypes=subtype_names)

to this (the single item list points to the local template):
    template = select_template(["product/detail_customproduct.html"])

5. get the urlpattern to point to get_my_product() in some better way
than that shown above ;)

thanks,
--derek




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