Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Gift Cards View modes: 
User avatar
Member
Member
kyle-bitwizards - 1/9/2013 9:36:25 AM
   
Gift Cards
I am working on a site that will have a store and one of the requirements for this is to be able to buy and use gift cards. I am having trouble finding any information on gift cards with Kentico. Does anyone if Kentico support gift cards already or have guidance on how I could accomplish this?

User avatar
Member
Member
kentico fairy - 1/14/2013 3:31:05 PM
   
RE:Gift Cards
I am also working on gift cards e-commerce section. Any information from kentico would be useful.

User avatar
Member
Member
kyle-bitwizards - 1/14/2013 3:53:14 PM
   
RE:Gift Cards
I contacted Kentico support and they replied back with:


Hello Kyle,

unfortunately there is no easy way of how to do this. As I've been told it requires custom coding.

For that you may use either discount coupons or customer credit.

Customer credit would be quite easy to do if you would create some product that would represent gift with some value and specified in the order who is the recipient of this customer credit and then in the CMS desk you would simply add this credit to the corresponding user. Drawback is that the recipient user must be already registered in the shop and another drawback is that the customer credit cant be combined with other payment methods ( means you cant buy 150$ product with 100$ customer credit and 50$ cash). This is also manual and if you would like this to be automatic its not trivial to do and sadly I cant give you code or examples as this isnt available yet. Something similar is described at devnet.kentico.com/Knowledge-Base/E-commerce/Events-as-products-in-Kentico-7.aspx when order becomes paid.

Discount coupons work in a similar way, but another drawbacks are that they can be used repeatedly within the validity period (standard behaviour) and by default the discounts are configured that they apply for single product and not entire order (if you have 3 items with values 10$, 20$, 30$ you would pay with 10$ -> 0$, 10$ and 20$ - every product is reduced by 10$). This can be customized as stated at devnet.kentico.com/Knowledge-Base/E-commerce/How-to-implement-discount-functionality-for-an-ent.aspx

Another thing is to completely create your own custom tables where you would save the informations about coupons, their values and recipients and then somehow work with it in the system.

You would need to change this behaviour in order to solve your problem. We have a consulting services you can use for help with your aim.


Best regards

Richard Šůstek
Junior Support Engineer

User avatar
Member
Member
kentico fairy - 1/17/2013 4:10:18 PM
   
RE:Gift Cards
I tried using "Donation" option of product type and it seems to be working.

User avatar
Member
Member
kyle-bitwizards - 1/18/2013 8:11:39 AM
   
RE:Gift Cards
I found the "Donation" option you are talking about but I am curious to how you are using that for a gift card.

User avatar
Member
Member
kentico fairy - 1/18/2013 9:07:36 AM
   
RE:Gift Cards
Once you drop the control on the page - it will show donation amount and donation units.
I searched the property that displays that text and changed the word "donation" to "Giftcards" in CMS.resx file.

User avatar
Member
Member
kentico fairy - 1/18/2013 9:17:02 AM
   
RE:Gift Cards
I still have to figure out how that works in the reporting area though.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 1/20/2013 11:17:19 AM
   
RE:Gift Cards
Hi,

Could you please be more specific about the Reporting part?
What is your main concern, to have some reports about number and usage of such "donations aka gift cards"?

Also, generally, this gift card or "voucher" functionality is something that can be achieved by customizations of the discount coupons (to make them applicable only once) and the calculation process (to apply the discount as a flat value subtracted from the shopping cart total price (and not from every product).

Should you need any additional details to help with such (or other) solution, please feel free to ask.

Regards,
Zdenek


User avatar
Member
Member
kyle-bitwizards - 1/21/2013 10:41:21 AM
   
RE:Gift Cards
Could you please expand more on how one could implement this solution using discount coupons only once and the calculation process?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/5/2013 6:18:47 AM
   
RE:Gift Cards
Hello,

Particular solution of this aim depends on couple of things, but one scenario could be following:

- Set up a gift card product, which will be offered in the store. It could be a standard product type with "Needs shipping" set to false.

- After the gift card product purchase, you or some automated API code will create a new discount coupon with some unique coupon code (e.g. some larger number or part of a hash string or GUID). You can set its time validity (from and to fields) to the current datetime and only enable it after the Order is paid by setting the DiscountCouponValidTo to a date in the future. You could even create the coupon after the payment... it depends on your preference.
You can use DiscoutCouponInfoProvider for all manipulations with coupons.

- Send the coupon code to the customer (actually you can send it even earlier, but it shouldn't be valid until the order is paid and it would be more consistent to send it after receiving the payment, so the customer has also a sort of confirmation of the payment)

- When the coupon code is entered in the checkout process, the custom code in the ProcessStep method in the ShoppingCartPreview step control (where you place an order) will handle that and update the DiscountCouponInfo.DiscountCouponValidTo to current DateTime, which will effectively invalidate the coupon, so it can't be used any longer.

As for the calculation of coupon discount, the already linked KB article (KB - Discount coupon for entire order) should help to achieve that.

Is this scenario suitable for your E-commerce solution? Which details would you want to discuss?

Regards,
Zdenek

User avatar
Member
Member
kyle-bitwizards - 2/12/2013 12:22:23 PM
   
RE:Gift Cards
I have a couple of questions about this scenario.

1. Will this allow for multiple Discounts to be applied? For example, if someone has 2 or more gift cards that they wish to use to purchase a product.

2. I tried to use the KB article you linked but it is for kentico 6 and uses deprecated variables when using kentico 7.

Also, when doing this I got errors saying that the CustomShoppingCartInfoProvider (I think) could not be found I searched my project and it wasn't there, I believe it is supposed to be in the Old_App_Code folder but I could not locate it. I am using Kentico 7 and Windows Azure for this project I am not sure if that could cause an issue of why this file is not there.

User avatar
Member
Member
ksell - 2/12/2013 3:46:57 PM
   
RE:Gift Cards
I was able to get the files in the KB article you linked to work and build but I have come across a new issue using your solution.

The way this solution looks is that users will only be able to use 1 gift card per purchase and if they use a gift card then they wont be able to use any other coupons. Do you have any ideas on how fix this using your solutions or am I better off doing everything completely custom?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/2/2013 11:35:49 AM
   
RE:Gift Cards
Hi,

1. As far as I'm aware, only single coupon can be entered for one purchase, we will address this limitation in the next version. I will try to find any workaround for current version, but it's not so easy.

2. Which particular variables do you mean?

The custom provider should be placed in \Old_App_Code, for example there's a subfolder Samples\Classes\ with custom providers. You also need to load the provider in the LoaderModule, as you can see in another example:
Old_App_Code\Samples\Modules\SampleClassLoaderModule.cs

Regards,
Zdenek