I'd be interested to hear what specifically was not working in regards to
following my method of creating custom products via model inheritance as
documented in my Satchmo Diaries.
I'd also be more than happy to help support implementing such a method if
given enough code to see what you're trying to do.

Cheers,

Bob Waycott

On Fri, Oct 23, 2009 at 2:43 PM, Ryan Headley <[email protected]>wrote:

> Wow, thats alot to take in, but here's a thought.
>
> Since a Product for you is a Domain -- something that is custom per order
> --  perhaps your after the wrong object?
>
> Maybe what you need is not a Satchmo Product model at all but a plain old
> Django model.  It would have an FK to your standard satchmo product ( or
> your "domain" product -- incase you have other products that you offer),
> another FK to the Order Id, and finally the actual domain name.
>
> Something like:
> CustomerDomain(models.Model):
>     domain_name = models.URLField... (or charfield I suppose)
>     order = models.ForeignKey(Order)
>     product = models.ForeignKey(Product)
>
> When a customer visits the page where they'll be ordering a domain, hid the
> AddToCart button until they've entered a domain name.  Then use the signal
> for satchmo_cart_add_complete (
> http://www.satchmoproject.com/docs/svn/signals.html#satchmo-cart-add-complete)
> to save the CustomerDomain model with the product foreign key and domain
> name.
>
> Then perhaps upon order_success (yet another signal) -- update the
> CustomerDomain object with the order_id.
>
>
> Granted I may have completely misunderstood your situation, and perhaps
> I've even over-complicated a solution here.  But what I don't think you want
> are custom products that get created for each "order" which is kinda what it
> sounded like you were doing.
>
> If I've misunderstood, the please ignore my response...
>
>
> On Fri, Oct 23, 2009 at 12:38 PM, Toni Mueller <[email protected]>wrote:
>
>>
>>
>> Hi!
>>
>> We're trying to re-implement our website+store with Satchmo, and are
>> having a few problems along the way. The list of products includes
>> domains in various TLDs, which need custom calculations and custom
>> fields as well, amongst them possibly a setup fee, a recurring fee,
>> maybe a transfer fee, a minimum reservation period, and maybe some more
>> (eg. in some cases, a business number).
>>
>> To comply with German law, we (think we) need to calculate and display
>> the total price for a given domain name reservation up-front, along
>> with the price components. We handle this with a custom template tag,
>> which we hand the product, and which returns the total initial price to
>> pay.
>>
>> After looking at Satchmo's stock product types, we decided to develop
>> our own custom product for this purpose. We hit a road block with the
>> approach described in the Satchmo Diaries, which appears to prevent us
>> from eg. using custom templates, so we re-did the whole product after
>> the recipe in the Satchmo docs, described here:
>> http://www.satchmoproject.com/docs/svn/custom-product.html
>>
>> Now we have a model that describes the basics of a domain, and another
>> model that carries the text field that the user should use to enter his
>> desired domain name (eg. "example", when trying to register
>> "example.com"), which is linked to the original "main" model for
>> domains. The TLD is selected via an OptionGroup (many-to-many) widget,
>> part of the main model. This sort of works, but we don't see the domain
>> name anywhere in the database. Instead, it seems that we need to pull
>> it directly from the request object in a signal handler (probably on
>> satchmo_cart_details_query).
>>
>> Earlier attempts to pull everything into one model resulted in not
>> being able to add domain products to the store, because suddenly, we
>> needed to enter the (mandatory) domain name, which we can't possibly
>> know, at the time we want to add the product to the shop.
>>
>> Somehow, this all sounds weird, and I have trouble believing that these
>> should be the right things to do. Instead, my guts feeling is that we
>> have major problems in our understanding of Satchmo.
>>
>>
>> Maybe some of you can help us out?
>>
>> TIA!
>>
>>
>> Kind regards,
>> --Toni++
>>
>>
>>
>>
>
>
> --
> http://www.sudovi.com/
> http://www.twitter.com/lifewithryan
> http://www.thecommontongue.com
> http://www.lifewithryan.com/
>
>
> >
>

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