This really should get posted to the list so people have a record of it.
You have to do some more work to get your inherited model. I don't have my
code in front of it, but I'll try to get something up here soon.

On Thu, Aug 13, 2009 at 10:17 AM, Juanjo Alvarez <[email protected]> wrote:

> Hi Bob,
> The thing is that the store I'm finishing doesn't have too many exotic
> features and, altought I've rewritten most of the templates (I'm adapting a
> free Mangento theme, I hope to contribute it to Satchmo once I've finished
> and "generalized" it), it works perfectly with Satchmo default views (I've
> only written a custom view.) That's the reason I wanted the default views to
> work with my custom product (to which I only add code, provider and provider
> price.)
>
> The problem I found when using the inheritance method, was that I couldn't
> access the extension fields from the templates because only the Product
> fields were accessible. Same with CartItem and OrderItem, I could not do
> "cartitem.product.code" because since it was linked to a Product, my
> LocalProduct fields were not accesible and as far as I know there it no way
> to "upcast" a model in a template without rewriting the view or the
> CartItem/OrderItem models.
>
> So this works perfectly for me and I can keep the views in sync with
> Satchmo trunk and using inlines the extension fields shows inside de Product
> edit form on the admin (I'm only using one custom product model too; if I
> had several types I would have to think of another approach.)
>
>
> On Thu, Aug 13, 2009 at 4:06 PM, Bob Waycott <[email protected]> wrote:
>
>> I guess I could always write up a post on views. I built my own views for
>> product pages because our store at http://cranio.com is very customized.
>> There should be no need to rewrite Order & Cart at all, and quite likely
>> you don't need to rewrite views at all. You need to modify your templates,
>> however. Play around in templates to find what variables you need. You can
>> write custom views if you need to. That's just part of customizing your
>> store.
>>
>> Template customization should help you a bit, but generally writing custom
>> views can do a better job of sending what Satchmo expects to find in the
>> templates. I did not have to modify Cart or Order at all.
>>
>> Let me know if you need any examples, I can muster something up.
>>
>> Bob
>>
>
>

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