Page 1 of 1
Best Way to Set Up a Coupon
Posted: Mon Nov 03, 2008 7:23 pm
by butterscotch
Hello All,
I need your guidance in regards to how to best approach this promotion. I have a promotion that works this way: A customer gets X valued at 11.95 product when they spend over $40.00. X product is a product we do not sell on our site. Any creative ideas as to how to get around this - the functionality doesn't exists.
I tried by putting 0 as a discount but afraid the honour system is not reliable.
Re: Best Way to Set Up a Coupon
Posted: Wed Nov 05, 2008 8:18 am
by mazhar
Code: Select all
X product is a product we do not sell on our site
Please make it clear. If the products is not at our store how can we apply coupon on it.
Re: Best Way to Set Up a Coupon
Posted: Thu Nov 06, 2008 5:20 pm
by butterscotch
Hi Mazhar,
yes, in essence the promotion is a gift with purchase, once a customer spends over $40.00 the customer gets a gift. The gift is not an item that we sell online. I wanted to use the coupon function so that Name Description of the name coupon would appear on the order confirmation page. In this way the customer would no they will be receiving a gift and our shipping department would know they have to include this in there.
Re: Best Way to Set Up a Coupon
Posted: Fri Nov 07, 2008 8:56 am
by mazhar
Hi Mazhar,
yes, in essence the promotion is a gift with purchase, once a customer spends over $40.00 the customer gets a gift. The gift is not an item that we sell online. I wanted to use the coupon function so that Name Description of the name coupon would appear on the order confirmation page. In this way the customer would no they will be receiving a gift and our shipping department would know they have to include this in there.
This can not be accomplish through the coupons. You will need some customization to make it through. One possible customization solution could be that you create a product for gift and change its visibility to hidden so that no one can buy it through store. Then you need to add this basket manually to the order at some common place after the placement of the order. A good location could be the Receipt page. You can check that if the order is more then 40$ then manually add that free product to the order.
On other possible solution could be that you make some custom routine on the admin end that you can run before the shipping and it will check the all order prices and then add the product manually to the order which has amount greater then 40$.
Here is the sample using the first technique hopefully it will help you. First create a product for example we say it
Free Gift. Now from the database's ac_Product table find the ProductId of this product. After finding the ProductId edit the
ConLib/ReceiptPage.ascx.cs and locate the following line of code
Code: Select all
//UPDATE CAPTION
Caption.Text = String.Format(Caption.Text, _Order.OrderId);
and make it look like as below also provide your ProductId value in place of 230 in the below code
Code: Select all
//UPDATE CAPTION
Caption.Text = String.Format(Caption.Text, _Order.OrderId);
if (_Order.TotalCharges > 40)
{
bool giftExist = false;
foreach (OrderItem orderItem in _Order.Items)
if (orderItem.Name == "Gift")
giftExist = true;
if (!giftExist)
{
List<OrderItem> orderItems = OrderItemDataSource.CreateForProduct(230, 1);
if ((orderItems != null) && (orderItems.Count > 0))
{
int shipmentId = 0;
if (_Order.Shipments != null && _Order.Shipments.Count > 0)
shipmentId = _Order.Shipments[0].OrderShipmentId;
foreach (OrderItem item in orderItems)
{
item.OrderShipmentId = shipmentId;
_Order.Items.Add(item);
}
_Order.Save();
}
}
}
Save the file and now check by placing an order having amount greater then 40$.
Re: Best Way to Set Up a Coupon
Posted: Mon Nov 10, 2008 12:07 pm
by butterscotch
Thank you so much.