Support for Discount Coupons by Burt
#1 ONLINE
Posted 03 February 2009 - 12:26 PM
Download Link: http://www.oscommerce.com/community/contributions,5743
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#2
Posted 05 February 2009 - 09:10 PM
I am having trouble with trasactions that are less than the coupon amount.
IE. Order total is 33.50, coupon is for $50
I tried ordering the coupon after the shipping, before the shipping, same thing...
It wants to give a credit, and fails saying "this transaction cannot be processed. The amount to be charged is zero".
Sub-Total: $33.50
Coupon (xxxx) -$50.00
5-7 day Standard Shipping (Standard Shipping (FREE shipping on orders over $75 in the continental US!)): $12.00
FL TAX 6.0%: $2.01
Total: $-2.49
Anyone having the same problem? Any fix?
Do we just have to add a check when adding up Total:
(in pseudocode)
if subtotal - coupon is less than 0, set subtotal == 0
Is this proper/safe??
where would i need to add this?
Edited by mastro97, 05 February 2009 - 09:24 PM.
#3 ONLINE
Posted 05 February 2009 - 09:52 PM
Add this in includes/modules/order_total/ot_coupon.php
Pseudo Code:
if (X > Y) X = Y
X = coupon_discount amount
Y = subtotal
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#4
Posted 19 February 2009 - 01:36 PM
I'm a complete novice so I'm not really sure where to start with this - any ideas would be welcome.
Many thanks in advance.
#6
Posted 19 February 2009 - 03:08 PM
burt, on Feb 19 2009, 02:05 PM, said:
Thanks,
I have tried to install a couple of these already but this is the only one I can get to work!!
The contribution which looks as though it woule be perfect seems to be corrupt as i cannot unzip it!
#7 ONLINE
Posted 19 February 2009 - 03:23 PM
I don't have any plans to enable product based discounts though, sorry.
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#8
Posted 26 February 2009 - 11:08 AM
I want to have gift vouchers to purchase online so they can be given as a gift to someone else to use in the store. How do I do that?
#9 ONLINE
Posted 26 February 2009 - 11:14 AM
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#11
Posted 05 March 2009 - 09:30 AM
in catalog/includes/modules/order_total/ot_coupon.php find
$order->info['total'] -= $coupon_discount;
and change to
if($coupon_discount>$order->info['total']) $coupon_discount=$order->info['total']; $order->info['total'] -= $coupon_discount;
#12 ONLINE
Posted 05 March 2009 - 09:42 AM
tpokala, on Mar 5 2009, 09:30 AM, said:
in catalog/includes/modules/order_total/ot_coupon.php find
$order->info['total'] -= $coupon_discount;
and change to
if($coupon_discount>$order->info['total']) $coupon_discount=$order->info['total']; $order->info['total'] -= $coupon_discount;
That would work fine.
The proper fix is included in the latest version, which allows users to insert a minimum spend per coupon.
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#13
Posted 07 March 2009 - 06:07 AM
in catalog/includes/modules/order_total/ot_coupon.php, Could this be wrong:
39 $this->output[] = array('title' => TEXT_COUPON . ' (' . $_SESSION['coupon_code'] . ')',
40 'text' => '-' . $currencies->format($coupon_discount, true, $order->info['currency'], $order->info['currency_value']),
41 'value' => '');
I suspect it should be like this:39 $this->output[] = array('title' => TEXT_COUPON . ' (' . $_SESSION['coupon_code'] . ')',
40 'text' => '-' . $currencies->format($coupon_discount, true, $order->info['currency'], $order->info['currency_value']),
41 'value' => $coupon_discount);
Eveline
#15
Posted 17 March 2009 - 01:23 AM
and interest?? I'm happy to "sponsor" it
Road Map to oscommerce File Structure
DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!
HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you
Proud Memeber of the CODE BREAKERS CLUB!!
#16
Posted 20 March 2009 - 05:25 PM
I'm getting the following error when I press the confirmation button on the confirmation page in the checkout. I don't know what I did wrong? Everything is working fine until I want to complete the order. Thanks
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to customer (coupon_id, customer_id, order_id, redeem_date) values ('4', '2', '6' at line 1
insert into coupons to customer (coupon_id, customer_id, order_id, redeem_date) values ('4', '2', '64', now())
[TEP STOP]
#17
Posted 20 March 2009 - 05:33 PM
norasaur, on Mar 20 2009, 10:25 AM, said:
I'm getting the following error when I press the confirmation button on the confirmation page in the checkout. I don't know what I did wrong? Everything is working fine until I want to complete the order. Thanks
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to customer (coupon_id, customer_id, order_id, redeem_date) values ('4', '2', '6' at line 1
insert into coupons to customer (coupon_id, customer_id, order_id, redeem_date) values ('4', '2', '64', now())
[TEP STOP]
#18 ONLINE
Posted 20 March 2009 - 07:13 PM
Probable: "coupons to customer" should read "coupons_to_customer" - so look in includes/database_tables to make sure that all is correct.
Linds - interesting. My thought would be to have a "print" button on the coupon page, which opens up a graphic on which the details of the coupon are added (coupon code, coupon amount, coupon expiry date, coupon usage). That would work well, I think and is (in theory) quite an easy addition. Would that be suitable?
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#19
Posted 20 March 2009 - 07:59 PM
I am talking about the gift vouchers. I dont THINK your code right now even HAS gift vouchers yet, correct?? Just the coupon codes.. I was just saying, the other big coupon and gify voucher contibute (CCGV) does not allow for printable, REAL vouchers. This is a HUGE fault. The vouchers arent given an id that can be printed and are automatically put into an "account" of sorts.. I dont know. I am just looking for an option that allows me to print really nice gift cards because we do wedding gifts, and people like nice cutesy things like that
Road Map to oscommerce File Structure
DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!
HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you
Proud Memeber of the CODE BREAKERS CLUB!!
#20 ONLINE
Posted 20 March 2009 - 08:08 PM
My idea for that is to allow the shop owner to make new product(s) of varying amounts, eg: $25, $50 etc etc. And to have the "model" as GIFT on all Gift Voucher products.
Now, somewhere in the logic, I will pick up the model of each product in the cart and if it is "GIFT", will create a coupon code of the right amount, expiry date, minimum purchase etc.
Next up would be to use PDF to create a visual voucher which can be printed off at the end of the checkout procedure, or from within the buyers account.
Of course, all that is fine in theory, but in practice, well you know exactly how busy I am! And each extra idea brings into play more problems. Eg, I'd need to update the PDF visual image with a "USED" banner once it's used - we don't want them printing it off again.
Lots to think about...
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.









