You can use ShoppingCartEvents.addProductPromoCode(request, response);
method to apply promocode(manually) only when customer answers to a
 survey.You need to set productPromoCodeId as parameter in request and you
can take this parameter as hidden field and call form
action( addProductPromoCode) if customer has answered to a survey.

HTH

Thanks
Nandani

On Wed, Jul 11, 2012 at 7:38 AM, Robert G. <[email protected]> wrote:

> if you are doing it in the cart...there is ootb a form field to input a
> promo
> code (manually input by customer). I havent check the logic behind, but I
> would check how the promocode is send...than create a hidden form field to
> your survey question which includes the promo code. This form field you
> send
> to the same target as the available form field does. Than you just have to
> add a logic, that the customer can only apply a promo code, or the survy
> thing...(if needed).
>
> The promocode in the hidden field I would request (with help of the groovy
> file) from the promtions whcih you created in admin and identify it with a
> specific name...like find promocode for promotion with name "xy" --> this
> makes sure, that you can change the promocode in admin later without
> loosing
> the functionality.
>
> this would be the way I would start...but not sure if its the best way :)
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674p4634675.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply via email to