Ubercart Coupon Module Rev 2

|

FIXED: I apologize, the last version I released had a few bugs (more like brain farts), that thankfully Ryan was able to point out. Go ahead and download this updated release below.

Well after a few requests I finally found some time to revisit the coupon module and implement some of the requests. This new version comes complete with order amount minimums!

All Fixes

  • Added Order Amount Minimums.
  • Display the coupon code in the coupon listing table.
  • Cleaned up some of the code

Have a download and let me know if it helps you out and any further feature requests.

Future Plans

  • Implement a local tab bar to seperate the active and inactive coupon views (thanks for the suggestion Ryan from Ubercart.org)
  • Implement coupon validation during the order processing phase so that an invalid coupon returns the user back to the checkout screen.
  • Figure out how to make the coupon code show up again in the input box when you click on the back button on the confirmation page.
  • Any future comments made by users!
AttachmentSize
uc_coupon_a6_ver_2_1.zip6.37 KB

Module's working great! One

Module's working great! One functionality suggestion: would it be possible to make coupons that are catalog-specific? For example, a coupon that gives 10% only to products in the t-shirts catalog, but not products in the sweatshirts catalog.

Great suggestion, I will

Great suggestion, I will look into incorporating this into a future release. I'm also still looking to make the administrative area more usable as well. Possibly doing something to the invoices for administration views, so that when you view an invoice you can click on the coupon they used and be shown the past uses of said coupon.

Hey- For some reason i got

Hey-

For some reason i got this as an error when i try to add a coupon:

user warning: Table 'aaron_comske.uc_coupons' doesn't exist query: SELECT name, code FROM uc_coupons WHERE code = 'Aaron' AND cid <> 0 in /home/aaron/public_html/comske/includes/database.mysql.inc on line 172.

it looks like i dont have any tables? How do i add these?

The query to insert the

The query to insert the tables should have been run when you installed the module. You can do this manually by taking out the query that is in the .install file packaged with the module. if you have any other trouble with it shoot me a direct contact through the contact form link located at the top of the page.

query 1

CREATE TABLE `uc_coupons` (
`cid` int(11) NOT NULL auto_increment,
`name` varchar(30) character set utf8 NOT NULL,
`code` varchar(40) character set utf8 NOT NULL default 'coupon_code',
`value` decimal(6,2) NOT NULL,
`type` varchar(12) character set utf8 NOT NULL default 'price',
`status` int(1) NOT NULL default '1',
`valid_until` int(11) default NULL,
`max_uses` int(4) NOT NULL,
`users` text character set utf8,
`roles` int(1) NOT NULL,
`minimum_order` decimal(6,2) NOT NULL default 0.00,
PRIMARY KEY  (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

query 2

CREATE TABLE `uc_coupons_orders` (
  `cuid` int(11) NOT NULL auto_increment,
  `cid` int(11) NOT NULL,
  `oid` int(11) NOT NULL default '0',
  `value` decimal(10,2) NOT NULL default '0.00',
  `user` varchar(50) NOT NULL default '0',
  `role` varchar(40) NOT NULL default '0',
  `code` varchar(40) NOT NULL default 'default_code',
PRIMARY KEY  (`cuid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Wonderful module, just what

Wonderful module, just what my Ubercart site needed! Would it be possible tho to track coupon usage? like on the coupon listing page just add "times used". and expanding on the same idea, maybe "amount saved"... just something that'll be cool since it's always good to have statistics.

There is a problem with the

There is a problem with the download link. Everytime I click on the link it sends me to the home page. I would really like to use this module but can't because the link is broken.

Thanks for the coupons

Thanks for the coupons module. Could you check out http://www.ubercart.org/forum/development/1262/discounts_and_coupons and offer some feedback? I'd like to either work with you on that or avoid stepping on your toes. :)

Coupon module works great so

Coupon module works great so far! Thanks! Any way to restrict Coupons to only work with certain categories?

I get Fatal error: Call to

I get

Fatal error: Call to undefined function uc_cart_checkout_new_pane() in C:\xampp\htdocs\ru\sites\all\modules\ubercart\uc_coupon.module on line 486

On CHECKOUT

Drupal 5.7

This is very likely to be

This is very likely to be happening because the coupon module was written for an alpha version of UberCart. The module is no longer up to date with their new versions and I have not had the time to upgrade the module. I would recommend asking around the UberCart forums to see if someone else has upgraded it.

For those who havn't seen it

For those who havn't seen it yet. We released a new version of the module to support the changes made in Ubercart core. The module now works for all versions of Ubercart beta.

http://boldsource.com/downloads/ubercart-coupon-module

Useful topic Thanks I have

Useful topic
Thanks
I have found two interesting sources http://fileshunt.com and http://filesfinds.com and would like to give the benefit of my experience to you.

zaI get Fatal error: Call

zaI get

Fatal error: Call to undefined function uc_cart_checkout_new_pane() in C:\xampp\htdocs\ru\sites\all\modules\ubercart\uc_coupon.module on line 486

On CHECKOUT

Drupal 5.7

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Upcoming events

  • No upcoming events available