sathmo rental

5 views
Skip to first unread message

Deifante Jay Walters

unread,
Sep 22, 2009, 12:42:20 AM9/22/09
to Satchmo users
Hello, I'm looking to implement rental products on satchmo and
wondering if there wasn't already an existing app/plugin for that.
Thanks

Chris Moffitt

unread,
Sep 22, 2009, 11:50:34 AM9/22/09
to satchm...@googlegroups.com
There is no specific module for Satchmo that I'm aware of that does rentals.

We can help walk you through what it might take to do it if you could outline what you'd like your process to look like.

-Chris

Deifante Jay Walters

unread,
Sep 23, 2009, 12:10:54 PM9/23/09
to Satchmo users
Right now the desire is to have something that does rentals/
reservations. The idea is that someone would come on to the store and
reserve and item for a certain amount of time. The desire is also to
allow the same item to be reserved more than once but for different
times. Like phone1 is rented from oct 1st till oct 12th and again from
oct 22nd to oct 25th. I would like to be able to charge different
amounts for different items. I would also like to charge different
amounts for different items. From the admin I would like to be able to
see what items are reserved at what times.

I wouldn't mind implementing the functionality and giving it back to
the community if the code meets quality standards, so any help you can
give me in pointing me in the correct direction would be great. Thanks
again for the quick response.

On Sep 22, 9:50 am, Chris Moffitt <ch...@moffitts.net> wrote:
> There is no specific module for Satchmo that I'm aware of that does rentals.
>
> We can help walk you through what it might take to do it if you could
> outline what you'd like your process to look like.
>
> -Chris
>
> On Mon, Sep 21, 2009 at 11:42 PM, Deifante Jay Walters
> <deifa...@gmail.com>wrote:

Bob Waycott

unread,
Sep 23, 2009, 7:54:08 PM9/23/09
to satchm...@googlegroups.com
To me this sounds like a standard product with a price, which Satchmo has. 

What you would want to do on top of that is layer your scheduling functionality. Each "rental" is a product purchase. Your Rental model could perhaps have a ForeignKey back to the Product that was purchased, and would contain additional fields for scheduling from_date & to_date.

Inventory doesn't really matter here, so you'd want to enable the 'Allow checkout with 0 inventory' option at /settings/. Furthermore, you're likely going to want a method that checks a user's given from_date & to_date against your Rental model to ensure no Rental model exists whose from_date & to_date fall within the range of a customer's requested from_date & to_date. This is probably best handled via an Ajax lookup that immediately provides a True/False value back to the user trying to schedule.

If you want to get really fancy with it, you'd define a custom view that would return all from_date & to_date values to your product template & prevent those from being chosen by a customer trying to make a reservation.

Hope that helps.

Alex Hayes

unread,
Sep 24, 2009, 4:44:00 PM9/24/09
to Satchmo users
I to would be very interested in helping out on this (even sounds like
we are doing it for the same kind of products Jay).

From my point I would need to have say a single product, with a
particular amount in the inventory (I'm assuming that Satchmo can do
this, I will find out today during my testing).

I will need to record things like serial no, imei and puk codes for
each physical item (again I'm assuming Satchmo can do this).

So, basically I think the Rental model needs to link to inventory as
opposed to a product.

Thanks
Alex

On Sep 24, 9:54 am, Bob Waycott <bobwayc...@gmail.com> wrote:
> To me this sounds like a standard product with a price, which Satchmo has.
> What you would want to do on top of that is layer your scheduling
> functionality. Each "rental" is a product purchase. Your Rental model could
> perhaps have a ForeignKey back to the Product that was purchased, and would
> contain additional fields for scheduling from_date & to_date.
>
> Inventory doesn't really matter here, so you'd want to enable the 'Allow
> checkout with 0 inventory' option at /settings/. Furthermore, you're likely
> going to want a method that checks a user's given from_date & to_date
> against your Rental model to ensure no Rental model exists whose from_date &
> to_date fall within the range of a customer's requested from_date & to_date.
> This is probably best handled via an Ajax lookup that immediately provides a
> True/False value back to the user trying to schedule.
>
> If you want to get really fancy with it, you'd define a custom view that
> would return all from_date & to_date values to your product template &
> prevent those from being chosen by a customer trying to make a reservation.
>
> Hope that helps.
>
> On Wed, Sep 23, 2009 at 12:10 PM, Deifante Jay Walters
> <deifa...@gmail.com>wrote:

Bob Waycott

unread,
Sep 24, 2009, 9:51:19 PM9/24/09
to satchm...@googlegroups.com
Well, whichever way you implement it, inventory is linked to a Product, therefore your Rental model will no doubt be linked as well. Not sure there's a very logical reason for not relating your Rental info to the Product that is being rented. Then you access any other data via the relationship.

Deifante Jay Walters

unread,
Sep 26, 2009, 12:57:41 AM9/26/09
to Satchmo users

wow. thanks so much for the suggestions.

Alex Hayes

unread,
Oct 1, 2009, 11:12:43 AM10/1/09
to Satchmo users
Perhaps I am missing something, but from what I have managed to work
out, the inventory in Satchmo is just a counter
(product.items_in_stock) on the Product model. Is this correct?

What my client really needs is to have an actual Inventory model. The
reason for this is I need to store specific information about an
actual physical product (for instance its serial number etc..) so that
when its rented out, upon return this information can be verified.
Does this currently exist in Satchmo?

If not, I was thinking it could be implemented roughly as follows;

Inventory:
- ForiegnKey to Product
- serial number
- contains information *

Rental
- ForiegnKey Inventory
- ForiegnKey Order (or something like that, I need to look into this)
- date start and end (used to determine if there is rental stock for
a given day)

So, I have a few questions;

1) Is there currently an Inventory?
2) Is the above on the right track?
3) It seems like signals will be the best possible way to implement
some of this functionality, unless anyone has any other suggestions. I
would think that this functionality (Inventory) is overkill for most
satchmo installations so implementing it into the core would be
necessary overhead.
4) I would like to submit this back to the community (perhaps Deifante
can help, I have pm'd him waiting on response) however my requirements
for the other information marked above with a * are most likely
different to others. What is the best way of allowing other satchmo
developers to add their own columns/properties/? to this table on
their own installations? For instance, I want puk_code, imei_number
etc.. but this would seem like a bad idea given that not every
inventory item will need this information.

Probably many more to come but this will do for now (first I actually
have to get satchmo working, fresh clone bails for me)

Thanks
Alex

On Sep 25, 11:51 am, Bob Waycott <bobwayc...@gmail.com> wrote:
> Well, whichever way you implement it, inventory is linked to a Product,
> therefore your Rental model will no doubt be linked as well. Not sure
> there's a very logical reason for not relating your Rental info to the
> Product that is being rented. Then you access any other data via the
> relationship.
>

Bruce Kroeze

unread,
Oct 1, 2009, 1:38:33 PM10/1/09
to satchm...@googlegroups.com
On Thu, Oct 1, 2009 at 8:12 AM, Alex Hayes <al...@alution.com> wrote:
>
> Perhaps I am missing something, but from what I have managed to work
> out, the inventory in Satchmo is just a counter
> (product.items_in_stock) on the Product model. Is this correct?

Yes.

>
> What my client really needs is to have an actual Inventory model. The
> reason for this is I need to store specific information about an
> actual physical product (for instance its serial number etc..) so that
> when its rented out, upon return this information can be verified.
> Does this currently exist in Satchmo?
>
> If not, I was thinking it could be implemented roughly as follows;
>
> Inventory:
>  - ForiegnKey to Product
>  - serial number
>  - contains information *
>
> Rental
>  - ForiegnKey Inventory
>  - ForiegnKey Order (or something like that, I need to look into this)
>  - date start and end (used to determine if there is rental stock for
> a given day)
>
> So, I have a few questions;
>
> 1) Is there currently an Inventory?

Just the counter, as you mention.

> 2) Is the above on the right track?

Looks good.

> 3) It seems like signals will be the best possible way to implement
> some of this functionality, unless anyone has any other suggestions. I
> would think that this functionality (Inventory) is overkill for most
> satchmo installations so implementing it into the core would be
> necessary overhead.

I think you should be able to use the default Django signals to do
this. model_save, etc. Agreed, you wouldn't want to bulk up core for
an optional feature like that.

> 4) I would like to submit this back to the community (perhaps Deifante
> can help, I have pm'd him waiting on response) however my requirements
> for the other information marked above with a * are most likely
> different to others. What is the best way of allowing other satchmo
> developers to add their own columns/properties/? to this table on
> their own installations? For instance, I want puk_code, imei_number
> etc.. but this would seem like a bad idea given that not every
> inventory item will need this information.

You could have a simple name/value field, right? Unless you have to
do db queries against it, it should work just fine.

--
Bruce Kroeze
http://www.ecomsmith.com
It's time to hammer your site into shape.

Alex Hayes

unread,
Oct 1, 2009, 7:22:10 PM10/1/09
to Satchmo users
Thanks Bruce!

With regards to item (4) this is how I was thinking it would have to
be done also. Is there a utility table in Satchmo or an app that you
know that supports this functionality, as its a rather common
scenario. Its easy enough to implement of course but if there is an
app everyone is using I'd rather use it.

Thanks
Alex

On Oct 2, 3:38 am, Bruce Kroeze <bkro...@gmail.com> wrote:
> On Thu, Oct 1, 2009 at 8:12 AM, Alex Hayes <a...@alution.com> wrote:
>
> > Perhaps I am missing something, but from what I have managed to work
> > out, the inventory in Satchmo is just a counter
> > (product.items_in_stock) on the Product model. Is this correct?
>
> Yes.
>
>
>
>
>
> > What my client really needs is to have an actual Inventory model. The
> > reason for this is I need to store specific information about an
> > actual physical product (for instance its serial number etc..) so that
> > when its rented out, upon return this information can be verified.
> > Does this currently exist in Satchmo?
>
> > If not, I was thinking it could be implemented roughly as follows;
>
> > Inventory:
> >  - ForiegnKey to Product
> >  - serial number
> >  - contains information *
>
> >Rental
> >  - ForiegnKey Inventory
> >  - ForiegnKey Order (or something like that, I need to look into this)
> >  - date start and end (used to determine if there isrentalstock for
> Bruce Kroezehttp://www.ecomsmith.com

Bruce Kroeze

unread,
Oct 1, 2009, 7:46:21 PM10/1/09
to satchm...@googlegroups.com
On Thu, Oct 1, 2009 at 4:22 PM, Alex Hayes <al...@alution.com> wrote:
>
> Thanks Bruce!
>
> With regards to item (4) this is how I was thinking it would have to
> be done also. Is there a utility table in Satchmo or an app that you
> know that supports this functionality, as its a rather common
> scenario. Its easy enough to implement of course but if there is an
> app everyone is using I'd rather use it.

Actually, there is a "ProductAttribute", already attached to Product,
which you could use for most of this. With a set of keys you could do
most of this with just some signals.

--
Bruce Kroeze

Reply all
Reply to author
Forward
0 new messages