i would like to implement a pre-order system for ecommerce products. i'm currently in spec phase, so i thought it would be a good idea to post here so we can discuss the implementation.
each product can be assigned a date of availability, an order start date, and a preorder type. the preorder type will define the "add to cart" link behavior :
- product can only be ordered after date of availability (no add to carte before)
- product can be ordered after order_date, but potentially before date of availbility (link add to cart then appears at order date)
- product can be ordered anytime as soon as product is created, and date of availability will be just for infos.
i also thought about adding a "no order after" date, to let the product appear on the shop, but without order possible. that sounds like a distinct feature from a preorder system however, but i added it (may be it could move to the standard product feature).
stock management can be handled as usual, provided the store admin activated it and filled the sock field. so that products in preorder can be out of stock before the actual date of availability, and store admin can follow the stock on items on preorder.
now for the transaction part, i've think of adding an "active preorders" at the same level than the "active transactions" for recurring payment, that will list all orders including preordered items. workflow for a transaction including preorder would be as usual, except that the transaction won't appear in the "order needed actions" before the latest date of availability of preorder items in the transaction.
we could also imagine adding steps to the workflow (product postponed, product received) to send customer notifications about what's going on. the cron hooks could then be used to send updates to customer on the product state. didn't think too much about this yet however.
now for the details, i think we can create an ec_preorder table with the fields :
- nid - product id
- preorder_type - type of preorder
0 - no preorder
1 - order anytime
2 - no order before date of availability
3 - order possible at date_order_start
4 - order possible between date_order_start and date_order_end
- date_availability
- date_order_start
- date_order_end
and modify product.module to handle all the above. the implementation via the product module is imho the best way as it enable any product (even custom) to be pre-ordered.
for config, we could add a global setting (settings/product) to enable/disable the whole preorder feature.
and for product creation, we can add a "preorder" checkbox on first page, then display a form on product details to set all preorder related values.
i'll be glad to hear any comments/suggestion on the feature itself, and of course on implementation details.
i'm starting to hack this on my head sandbox, but i'll wait for official ecommerce developers input before coding too hard (who knows, with such a nice module, that feature may already be scheduled and specified :)
thanks for reading :)
Comments
Comment #1
simeworth keeping active? useful summary of a distinct new feature
Comment #2
syllance commentedcoding was finally not started, so this is still a summary of new feature, nothing more.
unless there's need for it, and someone have time to spend, i suggest closing it, that will reduce the number of active items.
should i need this again, i think a better solution could use other modules, so the spec details won't be the same, and i'll post a new thread.
thks sime for the cleaning work.
Comment #3
greg.harveyIt appears this never happened, but I now have a client who wants to do this. We could reopen this, either as a collaboration or as a project for my client?
Anyone else interested?
Comment #4
apoc1 commentedsubscribe!
Comment #5
greg.harvey1. There's a Follow button, you don't have to "subscribe!"
2. The issue is closed, you're subscribing to nothing.