On Monday, December 29, 2014 6:06:04 PM UTC-8, Dave S wrote: > > > Just a thought: > > On Saturday, December 27, 2014 7:25:01 AM UTC-8, 黄祥 wrote: >> >> [...] >> > > >> i'd love to learn from another products and implement it on web2py, but >> still have no idea how to do it in web2py ways. the reason is if it set on >> the table, the user (non technical) perhaps in marketing division can >> change their own conditional pricing rules without any help from technical >> or developer to set their own marketing idea. >> [...] >> > > One way to do this is to make a form that said Marketing Dept User (MDU!) > would fill in, being permitted to access that form's page by the auth > settings (auth groups, for instance), and then you just update the database > with the form. But I think it would be easy to automate expiring special > prices by extending Massimo's table:[...] > As a future thing, you might want have a scheduler task that every once in > a while checks for expired prices and deletes (if you allow deletes) or > invalidates rows that expired long enough ago that you don't need them > around for reference. And a thought occurs that when the base price > changes, you can mark the old record expried (by setting the 'end' field to > yesterday) and adding the new price with a far-off expiration. >
Sodden thought: Don't add start and end to the table, instead queue jobs to the scheduler to update the [only] record with the sale price, and then to come back and "update" to the original price. This doesn't handle the quantity discount, but cross-breeding the two solutions might be a way to handle that. > Caveat: most of my experience is with device programming, so I might have > said somethin above that made the people with business sw experience > shudder. > This change may bring me closer to that goal :-) > Anyway, my two cents. > Compounded annually. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.