Latest News: (loading..)
Sign in to follow this  
Followers 0
burt

Support for Discount Coupons by Burt

98 posts in this topic

Post the sql so we can see what fields it created.

 

At the same time go and look at the db and see if there is a field in the coupons table.

Share this post


Link to post
Share on other sites

Hi Geoffrey the sql code as downloaded with the contrib is

CREATE TABLE coupon_to_customer (

coupon_id int(11) NOT NULL default '0',

customer_id int(11) NOT NULL default '0',

order_id int(11) NOT NULL default '0',

redeem_date datetime NOT NULL default '0000-00-00 00:00:00',

PRIMARY KEY (coupon_id,customer_id,order_id)

) TYPE=MyISAM;



CREATE TABLE coupons (

coupon_id int(11) NOT NULL auto_increment,

coupon_code varchar(32) NOT NULL default '',

coupon_amount decimal(15,4) NOT NULL default '0.0000',

coupon_type tinyint(1) NOT NULL default '0',

coupon_status tinyint(1) NOT NULL default '0',

coupon_use tinyint(1) NOT NULL default '0',

PRIMARY KEY (coupon_id)

) TYPE=MyISAM;

all the fields are in the coupons table, and i can populate them through the admin ie making coupons, values etc.

Neil

Share this post


Link to post
Share on other sites

Unlimited Coupon HELP !

 

Hi guys,

 

i have a big problem.

The contrib works great and thanks a lot for this !

But, (because there is always a " but ") ! lol

 

Coupon can not be erased ( even if option is " used once" ). So custumers can use the coupon (that will automatically deduct from total) for each order they pass without any restriction !

They pass by checkout_success.php, but coupon still here !

 

Please help !!!

Thanks

Share this post


Link to post
Share on other sites
@Jay: Gary has some good ideas on his blog at clubosc.com. Here are a few:

1 - install More Logical Checkout (written by Gary).

2 - instead of asking for the customer to enter a password, auto-generate one for them and email it to them.

3 - remove some required fields (gender? DOB? why??) so that it just looks like you're asking for shipping information. Using this method, plus the auto-generated password (see previous suggestion), looks like they're just giving shipping information, not checking out.

 

-jared

 

I have just deployed One Page Checkout (LINK) and it works with Discount Coupons - out of the box it supports CCGV and has a box on the checkout page to enter a coupon for CCGV but if you remove that box and just let the customer enter their coupon on the shoping cart page then when you go to checkout it picks up the coupon and totals etc are correct.

 

The only snag I have hit is every time you checkout with a coupon it sets it to inactive even if the coupon is set to multiple uses which I suspect is something to do with the CCGV code in the One Page Checkout add on - Im slowly removing all the CCGV parts to see if I can find out whats causing it but its working and working well just now and is a HUGE improvement on the normal mandatory signup and 4 page checkout in vanilla OSC.

Share this post


Link to post
Share on other sites

hello, (and sorry for my english) i have trouble about fix amount in discount code: max amouunt of discount is 999. i need more amount of fix discount. do yu have some idea how can i do that?. plese if you can give me some tip...really needed.

 

thnxs

 

im using ot_discount_coupon_codes_3_33

Share this post


Link to post
Share on other sites
Any tips on getting this to work with Express Checkout? (the one where you click the PayPal express checkout button _instead_ of the Continue button on checkout_payment.php)

 

-jared

 

Hi Jared,

 

Did you find a solution to this at all?

 

I have the coupon box on the same page as the payment details (PP Direct and PP Express) and if the yellow Express button is clicked the customer is taken to PayPal and the coupon discount is not applied.

 

Thanks anyone for any advice,

Helen

Share this post


Link to post
Share on other sites

I have just installed this and am having problems with it. It works untill the checkout_confirmation.php. I am getting the following error.

 

1366 - Incorrect decimal value: '' for column 'value' at row 1

 

insert into orders_total (orders_id, title, text, value, class, sort_order) values ('25', 'Coupon (Sportscar)', '-£1.60', '', 'ot_coupon', '4')

 

[TEP STOP]

 

This was working before. Have I put the code in the wrong place?

Share this post


Link to post
Share on other sites

I'm sorry but I'm confused as hell here...

 

are add ons

http://addons.oscommerce.com/info/5743

and contributions

http://www.oscommerce.com/community/contributions,5743

and "coupon version 5"

http://www.clubosc.c...-version-5.html

 

all the same contribution?

 

If they are all the same, the latest version I can download is V1.2. :blush:

 

Where can I find the latest version? I have a site already up and running that my admin will change.

http://www.anticoelements.com

 

 

 

Edited by BertaRecchia

Share this post


Link to post
Share on other sites

Hi There,

 

Installed v1.2 of this contribution and it works like a charm, exactly what I needed - the one tiny fly in the ointment seems to be integrating with the SagePay Form Module (v1.2).

For some reason the discount amount shows as £0.00.

 

For example, the checkout_confirmation page shows...

 

Sub-Total: £7.49

Coupon (30PERCENT) -£2.25

Royal Mail 1st Class Standard: £1.62

Total: £6.86

 

 

Yet the SagePay payment pages, emails and transactions all show...

 

Sub-Total: £7.49

Coupon (30PERCENT) £0.00

Royal Mail 1st Class Standard: £1.62

Total: £6.86

 

I have tried various settings and Order Total Module sort orders - all give the same result.

The bottom line is correct so no-one is being overcharged and I can live with it for now.

 

SagePay support say that their logs show the Coupon amount being passed to them is £0.00 but I don't know how to fix this.

I suspected the payment module and I have tried the forum for the SagePay module but to no avail - can anyone shed any light on this?

 

If it helps I am also using the QTPro and UK Royal Mail & Overseas Shipping Methods contributions.

 

Apologies in advance but I'm a total numpty when it comes to PHP!

Share this post


Link to post
Share on other sites

Just a thought....

 

I may be barking up completely the wrong tree here but I have noticed that there is no colon (' : ') generated between the Coupon title and the amount (see my post above for examples).

All the other amounts have this and I was led to believe that SagePay use the ' : ' sign as a seperator between each field.

 

Could be a red herring but how would I insert this in to the code to test it?

Share this post


Link to post
Share on other sites

I have a couple of questions,

 

Does this work with RC2 V 2.2

 

Does this give discounts for all payment modules?

 

@jzm

Edited by JZM

Share this post


Link to post
Share on other sites

Hey Burt/Gary,

 

Just wanted to thank you for the contrib. Works as advertised on PHP5.3/mySQL 5/latest from Github and will save me some hair pulling over the other CCGV contribs at the moment.

 

Much appreciated!

 

Iggy

Share this post


Link to post
Share on other sites

Hi Guys,

 

I have been spending the evening reading through this topic but haven't find the correct answer yet.

It's probably a known one but:

 

I get the opportunity to create coupon codes just fine.

I can enter them on the checkout.

On the checkout confirmation page it is not deducted however, if I take a step back and go forward again, it deducts itself just fine.

 

I have adapted into the order-total module:

 

       $this->output[] = array('title' => TEXT_COUPON . ' (' . $_SESSION['coupon_code'] . ')',
                               'text' =>  '-' . $currencies->format($coupon_discount, true, $order->info['currency'], $order->info['currency_value']),
                               'value' => $coupon_discount);

 

But this didn't solved my problem.

 

I installed the latest version available onto the site.

 

 

Someone out there who might have a brilliant input on this one?

 

Thanks!

Sofie

Share this post


Link to post
Share on other sites

I'm running 2.2 RC2a and had some issues: Mainly, the admin side was very messed up. Should tv1.2 work with this setup?

 

I'm going to take another swing at it tonight, as I was using a code-base that had another couple non-fucntional discount pieces added. I've reverted to clean code now.

 

Any suggestions?

 

My issues with the previous attempt were:

 

Admin side did not display properly. The top banner and part of the side boxes displayed, but only a few. Probably an issue with incorrectly adding code to the customers.php file. When i removed that change, I got these menus, but I noticed the module name did not display correctly in the modules list.

 

On the user side, I'm assuming I added the code wrong as one of the checkout pages was drawing weirdly, too.

Share this post


Link to post
Share on other sites

Hi there, I'm hoping some will be able to help me as I'm sure this hasn't been posted before. I'm running RC2 and have added in this coupon code after install the shop. I had a problem with the boxes in the admin area with the customer.php document but have sorted that now but when I go into customers in the admin area and select Coupons it shows:

 

Coupons

1146 - Table 'db318685302.coupons' doesn't exist

 

select count(*) as total from coupons

 

[TEP STOP]

 

Ive double checked everything and can't see anything wrong. I was wondering if anyone else had an idea I could try at all. Would it help if i posted my customer.php page from Admin??

 

Thanks Alix :)

Share this post


Link to post
Share on other sites

Hello to everyone!

 

I am totally new to osCommerce and I'd like to ask a question.

 

I would like to send my customers a promo code by email and have them enter this code on the order page. Can this add-on enable a customer to enter a promotional code?

 

Thank you for any help.

 

Tanja.

Share this post


Link to post
Share on other sites

This module is working great but I have a customer that wants to give a coupon that enables $5 off plus free shipping. Is there any way to do this with the current code? I didn't see a way and started to modify the discount coupon class but I don't follow the code exactly and aren't sure where the various amounts are being calculated. I also tried modifying the primary key of the db to allow 2 coupons with the same name (so i could set one to fixed and another to shipping but that didnt work so i reverted that).

 

I do have some php/mysql knowledge so if you can point me in the right direction I think I should be able to code it myself. Any help is appreciated! Thanks!

Share this post


Link to post
Share on other sites

I'm confused and hoping someone can help

I installed the contribution and I seem to have killed the checkout_payment file,

 

If I remove the coupon code the page loads just find, but No Matter Where I paste it into the checkout_payment.php I just get a blank page.

 

Anyone willing to tell me the secret on where I'm supposed to put the code?

 

 

Thanks in advance, I'm going slowly nutz here :P

Share this post


Link to post
Share on other sites

Hi,

 

I have just installed this contribution on my website and it seems to work well, however, as I am in the UK there is a problem with the TAX (VAT amount).

 

It seems to be working the tax ( UK VAT ) out based on the original amount of the items before the discount was applied. Everything else is fine.

 

Example:

 

 

Sub-Total (Inc VAT): £114.03 (Correct)

Voucher - 10% Discount (gdx45t10) -£11.40 (Correct)

Standard Delivery (Inc VAT) 13.079 kg(s)): £7.99 (Correct)

Total (Inc VAT): £110.62 (Correct)

UK VAT 20% (included in price): £20.34 (Wrong - Should be £18.44).

 

In the UK - we have to show our prices with tax (VAT) included on our stores and if a discount is applied to an order, we have to charge the VAT on the new amount (after discount) - not the original amount. Therefore the VAT amount of £110.62 Including VAT should be £18.44.

 

Maybe I'm doing something wrong. I can't be the only one with this problem?

 

I hope someone can help.

 

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0