Vladan,
What you're describing certainly could be implemented, but has not
yet been.
The session is certainly the logical place to keep the user's date
selection. Lower down, the Entity Engine is not the only place that
will need to know about this current date/time override. In fact for
the ecommerce data querying much of the date filtering is done in
memory so that over time the cached lists do not have to be refreshed.
So, yes, this will take some work but if done properly there are some
things like thread local variables that could make it a lot more
efficient requiring maybe only a half dozen places that need to be
changed.
-David
On Sep 7, 2006, at 10:59 AM, Tutunovic Vladan wrote:
Hello Si,
Thanks for your fast answer.
This was one of the first ideas we had, but only one virtual date
could be checked at time (test case described below). That implies
a technical intervention on the computer. Merchandisers want to be
abble to do that without any technical skills, excepting those
needed for feeding the catalog and products from the backoffice.
Moreover, several managers could work on the same website to
simulate different (or same !) promos/campaigns/dates of the coming
semester or year. That's why the time shifting have to be done at
use-time.
We decided to keep this "virtual" date in the user session, and to
find a way to make the entity engine use this one instead of the
regular System.currentTimeMillis() provided by the UtilDateTime class.
If you have some suggestions about the classe(s) to operate, they
will be welcome !!!
Best regards
Vladan.
-----Message d'origine-----
De : Si Chen [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 7 septembre 2006 18:26
À : [email protected]
Objet : Re: Catalog / product visualization under a future date
Can't you just change your computer's date/time setting?
On Sep 7, 2006, at 2:33 AM, Zaoui Bruno wrote:
Hello,
We need to play the following use case with ofbiz :
Some company prepares its Christams eCommerce campaign. Through the
backoffice, merchandiser feed the products, catalog, pricing rules,
promos, and so on.
This will affect the objects that are period dependent (those that
have fromDate and thruDate fields).
Once this job done, he'd like to check the aspect of his front
office,
but at the date in the future, let's say December the 20th.
Till now, we aren't aware of some existing feature or way to satisfy
this need.
We thought about some solutions, like shifting the system date of the
server, but this can cause too many side effects.
Our conclusion is to study and modify in an as soft way as possible
the behaviour of the Delegator (and ) object.
Before we dive in the entity engine layer, can somebody tell me if
somthing was done around that topic, or if some tips already exist ?
Thanks in advance
Vladan Tutunovic
Prosodie Product Team
[EMAIL PROTECTED]