Hello everyone,

I am facing a strange behaviour regarding Product Store Promotions that are
active for one of the ecommerce sites that my company manage.

In all the pages of the sites, we have included the ShowPromoText.groovy
script that retrieves the promotions active for a specific store: we then
use data gathered from the script to make some customizations (ftl-side) on
how the promos are shown to the end user customers.
The main method that the script uses to get all the promos for a store
is *getStoreProductPromos
*of the class* ProductPromoWorker.java.*

Right now there are active on the site ten/fifteen different kind of
promotions like order discount promotions, ship charge discount promotions,
promocodes linked to a specific party and more; what I noticed is that the
groovy script cannot always retrieve all the available promos for a store
so I started check out a bit the method getStoreProductPromos: this method
loops over all the ProductStorePromoAppl records, tests each promo and if
the promo conditions are met then the record is added to a list of valid
promos; if the conditions are not met then the promo is nulled.
I found that if one of the first promo processed fails the rule conditions
check, due to a boolean flag *condResult *that switches to* false* then,
all the following promos in the (ProductStorePromoAppl) list are never
checked and nulled,  and at the end never shown to the end user customer.


I would like to ask if this is actually an issue of the
getStoreProductPromos method or if is not the case, what are the reasons
behind that piece of logic.


Thank you in advance for your help.

Kind regards,
Giulio



-- 
Giulio Speri


*Mp Styl**e Srl*
via Antonio Meucci, 37
41019 Limidi di Soliera (MO)
T 059/684916
M 334/3779851

www.mpstyle.it

Reply via email to