Jump to content



Photo
- - - - -

Support for Discount Coupons by Burt


  • Please log in to reply
97 replies to this topic

#1   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 03 February 2009 - 12:26

It's getting too unwieldy to continue support of my discount coupon contribution on my blog. Henceforth, this thread will be used for Support.

Download Link: http://www.oscommerc...tributions,5743
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#2   mastro97

mastro97
  • Members
  • 5 posts
  • Real Name:j Mastro

Posted 05 February 2009 - 21:10

Great contrib.. I have a prob and searched but couldn't find anything.

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 - 21:24.


#3   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 05 February 2009 - 21:52

In the version that you are using, you would need to add an extra check as you say. An idea would be to set the coupon discount to be the SAME amount as the subtotal, if the coupon discount is greater than the subtotal.

Add this in includes/modules/order_total/ot_coupon.php

Pseudo Code:
if (X > Y) X = Y

X = coupon_discount amount
Y = subtotal
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#4   stevieg1978

stevieg1978
  • Members
  • 8 posts
  • Real Name:Steve Granger

Posted 19 February 2009 - 13:36

I would like to be able to stop discounts on products which are designated as not permitted for discount, maybe using a custom field or something from the database, or failing that listed in the specials section of osc.

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.

#5   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 19 February 2009 - 14:05

There is a different coupon system which might suit you, have a hunt in the contributions section.
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#6   stevieg1978

stevieg1978
  • Members
  • 8 posts
  • Real Name:Steve Granger

Posted 19 February 2009 - 15:08

There is a different coupon system which might suit you, have a hunt in the contributions section.


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   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 19 February 2009 - 15:23

My contribution is certainly the easiest to install of all the discount coupon mods.
I don't have any plans to enable product based discounts though, sorry.
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#8   spinach

spinach
  • Members
  • 25 posts
  • Real Name:Wendy
  • Location:Scotland & Portugal

Posted 26 February 2009 - 11:08

I've downloaded and installed this contribution and it all seems to function fine. I've watched the YouTube vid and it looks very straightforward from the purchasing side of things. Only there's one thing that's puzzling me, and maybe it's a really stupid question, but how does the customer get the gift voucher/discount code in the first place?

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   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 26 February 2009 - 11:14

The GV purchasing is a fuure addition to this, which I am working on as time/cash permits. You have to manually send the code to your buyer.
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#10   spinach

spinach
  • Members
  • 25 posts
  • Real Name:Wendy
  • Location:Scotland & Portugal

Posted 26 February 2009 - 21:25

The GV purchasing is a fuure addition to this, which I am working on as time/cash permits. You have to manually send the code to your buyer.


Ah OK. Thanks for clarifying that. I'll look forward to the purchasing addition.

#11   tpokala

tpokala
  • Members
  • 27 posts
  • Real Name:Tomasz
  • Gender:Male

Posted 05 March 2009 - 09:30

This fix avoid that customer who have coupon amount 100$ and order 50$ don't see -50$ as total:

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   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 05 March 2009 - 09:42

This fix avoid that customer who have coupon amount 100$ and order 50$ don't see -50$ as total:

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.
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#13   Denkster

Denkster
  • Members
  • 64 posts
  • Real Name:Eveline Bernard

Posted 07 March 2009 - 06:07

Hi
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

#14   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 07 March 2009 - 08:41

Covered already in the old support thread.
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#15   lindsayanng

lindsayanng
  • Members
  • 4,258 posts
  • Real Name:Lindsay
  • Gender:Female
  • Location:Milford, Connecticut U.S.A.

Posted 17 March 2009 - 01:23

hey burt. Interested in getting the Gft Voucher part of this up and working.. I just realized that there is NO contribution for PRINTABLE gift vouchers. Soemthign with a voucher ID that you can have printed and sent out to the customer..

and interest?? I'm happy to "sponsor" it
A great place for newbies to start
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   norasaur

norasaur
  • Members
  • 6 posts
  • Real Name:nora

Posted 20 March 2009 - 17:25

Hi there,

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   norasaur

norasaur
  • Members
  • 6 posts
  • Real Name:nora

Posted 20 March 2009 - 17:33

oh by the way I also have a bunch of contriubtions added such as SPPC and QTPRO as the main ones..I also have this other contribution where it has a price break for shipping discount...so orders over $300 gets free shipping.


Hi there,

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   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 20 March 2009 - 19:13

Could be any number of things causing issues on a highly modified shop. You'll need to investigate further.

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?
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4

#19   lindsayanng

lindsayanng
  • Members
  • 4,258 posts
  • Real Name:Lindsay
  • Gender:Female
  • Location:Milford, Connecticut U.S.A.

Posted 20 March 2009 - 19:59

actually, the PRINTABLE coupon page is a GREAT idea, but not what i was thinking.. Although it would be awesome for other people's websites.

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
A great place for newbies to start
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   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,747 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 20 March 2009 - 20:08

Ah - ok. No, I don't have the GV part coded up yet.

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...
IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
Responsive osCommerce, join in:
http://forums.oscomm...rom-the-get-go/

--
Making your shop better, one osCommerce module at a time - get in touch, or get my newsletter every 1st of the month.
 
Big Bang Templates for 2.3.4