Discussion:
Enforcing Promo Codes
(too old to reply)
Jamie
2006-01-06 22:17:02 UTC
Permalink
I have seen alot of documentation regarding creating promo codes and seting
up discounts based on those but I haven't seen anything related to how these
promo codes can be applied in the site.

I saw that there are some pipeline components that relate to promo codes,
but I was wondering if I could get some help or direction to documentation
regarding how and where promo codes should be enforced in the site? What
order-level fields must I populate, ect...

Thanks for any help
Ravi Shankar
2006-01-07 06:05:03 UTC
Permalink
Hi Jamie,

The Commerce Server Help file contains sample code on how to incorporate the
coupon redemption into the code (search for promocode). Off hand, it requires
you to fill up a dictionary object and pass it to the basket/total pieplines
and post execution of pipelines, the same dictionary object returns the
status of the applied promo code.

As part of the FP1 setup, there are definite instructions on which
components you'd have to add to which piepline to work with coupons
--
Ravi Shankar
Post by Jamie
I have seen alot of documentation regarding creating promo codes and seting
up discounts based on those but I haven't seen anything related to how these
promo codes can be applied in the site.
I saw that there are some pipeline components that relate to promo codes,
but I was wondering if I could get some help or direction to documentation
regarding how and where promo codes should be enforced in the site? What
order-level fields must I populate, ect...
Thanks for any help
Jamie
2006-02-02 22:56:36 UTC
Permalink
Thanks for the help, I found the documentation and got it working. I did
have another question about promo codes appliying dynamic values.

Can I create a promo-code where, if valid, will accept a user-entered
discount amount? If not, what basket item value needs to be set to have a
regular order-level discount based on a % typed in by the user?

This seems like a common need but all of the basket items I try to set
either do not exist or are not applied once the pipeline is run.

Thanks
Post by Ravi Shankar
Hi Jamie,
The Commerce Server Help file contains sample code on how to incorporate the
coupon redemption into the code (search for promocode). Off hand, it requires
you to fill up a dictionary object and pass it to the basket/total pieplines
and post execution of pipelines, the same dictionary object returns the
status of the applied promo code.
As part of the FP1 setup, there are definite instructions on which
components you'd have to add to which piepline to work with coupons
--
Ravi Shankar
Post by Jamie
I have seen alot of documentation regarding creating promo codes and seting
up discounts based on those but I haven't seen anything related to how these
promo codes can be applied in the site.
I saw that there are some pipeline components that relate to promo codes,
but I was wondering if I could get some help or direction to documentation
regarding how and where promo codes should be enforced in the site? What
order-level fields must I populate, ect...
Thanks for any help
Ravi Shankar
2006-02-03 11:44:07 UTC
Permalink
Hi Jamie,

Glad I could be of help. In regards to your current requirement there could
be one way (thats what I could think of)

1. You define a promo code for a order level discount with value 0%
2. When you detect that such a code has been applied you enable a text box
on the checkout page wherein the customer enters a discount percentage
3. You then use this percentage and calculate & distribute the discounts to
the items as per logic described at
http://msdn.microsoft.com/library/?url=/library/en-us/csvr2002/htm/cs_cc_concepts_rrxt.asp?frame=true
(whether you do this by writing your own piepline component or in code) you'd
best do it during the checkout process... addition of items to cart after
totaling would require a recalculation of the discounts and redistribution :)

Just might work :)
--
Ravi Shankar
Post by Jamie
Thanks for the help, I found the documentation and got it working. I did
have another question about promo codes appliying dynamic values.
Can I create a promo-code where, if valid, will accept a user-entered
discount amount? If not, what basket item value needs to be set to have a
regular order-level discount based on a % typed in by the user?
This seems like a common need but all of the basket items I try to set
either do not exist or are not applied once the pipeline is run.
Thanks
Post by Ravi Shankar
Hi Jamie,
The Commerce Server Help file contains sample code on how to incorporate the
coupon redemption into the code (search for promocode). Off hand, it requires
you to fill up a dictionary object and pass it to the basket/total pieplines
and post execution of pipelines, the same dictionary object returns the
status of the applied promo code.
As part of the FP1 setup, there are definite instructions on which
components you'd have to add to which piepline to work with coupons
--
Ravi Shankar
Post by Jamie
I have seen alot of documentation regarding creating promo codes and seting
up discounts based on those but I haven't seen anything related to how these
promo codes can be applied in the site.
I saw that there are some pipeline components that relate to promo codes,
but I was wondering if I could get some help or direction to documentation
regarding how and where promo codes should be enforced in the site? What
order-level fields must I populate, ect...
Thanks for any help
Loading...