You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "bhargav.tri" <Bh...@objectedge.com> on 2012/07/11 02:55:21 UTC

Apply Promotion on survey

Hi,
I have a business requirement where at the checkout we want to provide a
choice of reducing the price on the total cart value by X%, if the customer
opts to answer a survey question about our website.

My idea is to implement a promotion and apply the promo code if user
answer's the survey. 
I am not sure how to tell ofbiz; to apply a promotion code only when a promo
code is applied. And not apply promotion other wise. 
I was trying to get an answer @
https://cwiki.apache.org/OFBIZ/tab-catalog-promos.html but in vain. 

Can someone please point me to the correct documentation for the same?

Also by any chance is there a better way in ofbiz to implement the above
requirement?

Thanks in advance for your inputs. :)
 

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Apply Promotion on survey

Posted by "bhargav.tri" <Bh...@objectedge.com>.
Thanks Nandini. 
I dont have an explanation for this but I had tried with both values "Y" and
"N" but it was applying the discount automatically. I was pretty sure that
it was "Req. Code" flag which handled it but then I started doubting it when
it was not working accordingly.

But I tried the same thing right now and it seems to be working  

May be it needed me to restart my server which is pretty ambiguous since
ideally speaking my changes should be directly reflected. 

I am not sure what went wrong but I am not able to recreate the scenario.
Will keep a look out. 

Thanks for the help. 

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674p4634681.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Apply Promotion on survey

Posted by Nandani Aggarwal <na...@paxcel.net>.
While creating promotion :
In ofbiz admin panel , under applications - > catalog manager -> promos
Under promotion tab there is field "Req. Code" : set its value as Y then
your promotion will be applied only after entering promotion code manually.

On Wed, Jul 11, 2012 at 11:01 AM, Nandani Aggarwal <
nandani.aggarwal@paxcel.net> wrote:

> While creating promotion :
> In ofbiz admin panel , under applications - > catalog manager -> promos
> Under tab there is field Req. Code : set its value as Y then your
> promotion will be applied only after entering promotion code manually.
>
> --Nandani
>
>
> On Wed, Jul 11, 2012 at 10:55 AM, bhargav.tri <
> Bhargav.Trivedi@objectedge.com> wrote:
>
>> Thanks for the recommendations.
>>
>> I was more curious to know if OfBiz console allows us to create a
>> promotion
>> which will be applied only when the promocode is triggered.
>>
>> While creating a rule for the promotion I have a rule where the condition
>> is
>> :
>> All the products with quantity >= 1
>>
>> and action is:
>> apply discount of X% on the cart subtotal.
>>
>> But it seems that the discount is applied the moment I add an item to the
>> cart and go to checkout.
>>
>> Rather I would like to apply the promo only if user is opting for the
>> survey. It is more of an explicit promotion which should be triggered only
>> when user says so.
>>
>> I am not sure how to configure such an explicit promotion in the ofbiz
>> console?
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674p4634677.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>

Re: Apply Promotion on survey

Posted by Nandani Aggarwal <na...@paxcel.net>.
While creating promotion :
In ofbiz admin panel , under applications - > catalog manager -> promos
Under tab there is field Req. Code : set its value as Y then your promotion
will be applied only after entering promotion code manually.

--Nandani

On Wed, Jul 11, 2012 at 10:55 AM, bhargav.tri <
Bhargav.Trivedi@objectedge.com> wrote:

> Thanks for the recommendations.
>
> I was more curious to know if OfBiz console allows us to create a promotion
> which will be applied only when the promocode is triggered.
>
> While creating a rule for the promotion I have a rule where the condition
> is
> :
> All the products with quantity >= 1
>
> and action is:
> apply discount of X% on the cart subtotal.
>
> But it seems that the discount is applied the moment I add an item to the
> cart and go to checkout.
>
> Rather I would like to apply the promo only if user is opting for the
> survey. It is more of an explicit promotion which should be triggered only
> when user says so.
>
> I am not sure how to configure such an explicit promotion in the ofbiz
> console?
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674p4634677.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Apply Promotion on survey

Posted by "bhargav.tri" <Bh...@objectedge.com>.
Thanks for the recommendations. 

I was more curious to know if OfBiz console allows us to create a promotion
which will be applied only when the promocode is triggered. 

While creating a rule for the promotion I have a rule where the condition is
:
All the products with quantity >= 1 

and action is:
apply discount of X% on the cart subtotal.

But it seems that the discount is applied the moment I add an item to the
cart and go to checkout. 

Rather I would like to apply the promo only if user is opting for the
survey. It is more of an explicit promotion which should be triggered only
when user says so. 

I am not sure how to configure such an explicit promotion in the ofbiz
console? 

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Apply-Promotion-on-survey-tp4634674p4634677.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Apply Promotion on survey

Posted by Nandani Aggarwal <na...@paxcel.net>.
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. <ga...@mercon24.de> 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.
>

Re: Apply Promotion on survey

Posted by "Robert G." <ga...@mercon24.de>.
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.