Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupons v0.94


Ian

Recommended Posts

***updated***

Coupons are no longer deleted but marked inactive to preserve historical reports

 

Added code to preserve the state of the date selector. (Thanks to fredh for the patch)

 

 

This is the beta version of the Discount Coupons add on.

NOTE : you must have the Credit Class GV (v3.0 or v3.1) installed.

 

Create Discount Coupons in a variety of formats.

 

Coupons can be either percentage or fixed amounts.

 

Restrict to categories or products. Set Start and expire dates.

 

Admin functions to email coupon codes.

 

Note as this is beta code the install instructions are a bit terse.

 

http://www.oscommerce.com/downloads.php/co...ions,508/type,6

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hi Ian,

 

I just installed the update, and in the admin, it said,

 

TEXT_RESTRICT

 

I edit the coupon in the english, and don't see the define text_restrict anywhere. What is that support to say?

 

 

define('TEXT_RESTRICT', 'Restrict');

 

Nouck

Link to comment
Share on other sites

Nouck,

 

The TEXT_RESTRICT, is part of some work in progress. That's why it's not defined. The idea is that if you select the checkbox the coupon that you are emailing will only be redeemable by the peple you send it to.

 

I should have this working shortly.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Nouck,

 

The TEXT_RESTRICT, is part of some work in progress. That's why it's not defined. The idea is that if you select the checkbox the coupon that you are emailing will only be redeemable by the peple you send it to.

 

I should have this working shortly.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

..an obvious question that may have been answered elsewhere, but:

 

This coupon contrib is based on the credit class, which has this note:

 

"This is based on a July snapshoy before the new breadcrumb logic was intoduced."

 

Does that mean it's not readily integratable with recent snapshots?

 

I just want to make sure I'm not missing out on something.

 

Thanks!

Link to comment
Share on other sites

Hi.

 

Okay, I added the creditclass_GV mods to the site and I was starting on the coupon mods. The first thing I did was the sql table mods, and this is the error I got back:

 

Error



SQL-query : 



CREATE TABLE cc_coupons (

 cid int(11) NOT NULL auto_increment,

 name varchar(32) NOT NULL default '',

 description varchar(128) default NULL,

 code varchar(32) NOT NULL default '',

 amount int(5) NOT NULL default '0',

 type char(1) NOT NULL default 'F',

 min_order decimal(5,2) default NULL,

 startdate datetime default NULL,

 finishdate datetime default NULL,

 uses_coupon int(5) NOT NULL default '0',

 uses_user int(5) NOT NULL default '0',

 products varchar(256) default NULL,

 categories varchar(256) default NULL,

 customers text default NULL,

 use_count int(5) NOT NULL default '0',

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

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

 PRIMARY KEY  (cid),

 UNIQUE KEY code (code)

) TYPE=MyISAM



MySQL said:



Too big column length for column 'products' (max = 255). Use BLOB instead



Back

 

I'm running the 9/12 or 9/14 snapshot.

 

Thanks.

Link to comment
Share on other sites

Try changing

 products varchar(256) default NULL, 

categories varchar(256) default NULL,

to

 products varchar(255) default NULL, 

categories varchar(255) default NULL,

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

I got the coupon mod installed and so far it looks really good.

 

One little question: is there a plan to evolve a coupon set into a finite set of individual coupons each with their individual redemption codes?

 

Cheers.

Link to comment
Share on other sites

I absolutely love the two modules GV and Coupons. When I had GV only, there was a checkbox to use voucher$$ at checkout and all was well.

Now that I have coupons installed, everything is there EXCEPT for the checkbox, keeping a customer from using their voucher account.

 

Using gv_cc_install_2.1, coupon_v0.94 and OSC 2.2

 

See it at http://www.playlaxusa.com/shop/catalog

 

Any thoughts??

 

Thank,

 

ptrau

"Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!"

Link to comment
Share on other sites

ptrau,

 

2.1 credit class had some bugs which meant i't didn't work to well when more than one CreditClass mod was installed. I suggest you do the following. Download Credit Class v3.0 from this you only need

 

/catalog/includes/modules/order_total/ot_gv.php

/catalog/includes/languages/english/modules/order_total/ot_gv.php

 

make sure the version of

 

/catalog/includes/classes/order_total.php is that from the coupon v0.94

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Jasonv,

 

Not quite sure what you mean, do you mean a bulk send via email where each coupon has an individual redemption code or something else.

 

Please clarify.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Should I re-install Coupon v0.94 over the current install and then bring in the CC 3.0 files?

 

 

ptrau,

 

2.1 credit class had some bugs which meant i't didn't work to well when more than one CreditClass mod was installed. I suggest you do the following. Download Credit Class v3.0 from this you only need

 

/catalog/includes/modules/order_total/ot_gv.php

/catalog/includes/languages/english/modules/order_total/ot_gv.php

 

make sure the version of

 

/catalog/includes/classes/order_total.php is that from the coupon v0.94

"Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!"

Link to comment
Share on other sites

In admin->modules->order totals each module listed has a sort order. By clicking and editing each module in the left hand pane you can change the sort order.

 

You will need to increase the value of the final total module to give you some 'breathing space' to say 99, and set the value of the discount/ gv module to something less than this (10 is a good figure)

 

Note no two order total modules should have the same sort order

 

HTH

Trust me, I'm an Accountant.

Link to comment
Share on other sites

You wouldn't need the Credit Class for this. The Credit Class is only requird when some user interaction (redeem boxes etc) are needed at checkout.

 

You could do something like this using an ordert total module (If you only wanted the discount shown at checkout )

 

Take a look at something like the members discount module for ideas on how this works.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian,

 

I have installed credit_class_GV_v3.1 and then coupon_v0.93, swiftly followed by the updated coupon_v0.94.

 

My problem is that I have lost the check box to redeem gift vouchers. In the order_total.php the original code that set up the tick box has been commented out and a new line :

 

$output_string .= $GLOBALS[$class]->checkbox; added.

 

This however loses me my tick here to redeem box on checkout_payment.php.

 

If I reverse this and comment out the new line and reinstate the previous lines of code my tick box reappears and all 'seems' well.

 

Is it?

 

Cheers

/* Intellectual property: are you for or against the human race? */

if ( you want exclusive ownership of an idea ) {

keep your idea to yourself;

// you greedy bastard

}

Link to comment
Share on other sites

Adam,

 

My fault, I made some changes to order_total.php and ot.gv.php. This was intended to tidy up output formatting, and pass off the drawing of the checkboxes to the individual order_total modules.

 

Unfortunately when I created the zip file it seems that the ot_gv.php was not included.

 

For now your changes will work, the only problem would come if I created another order_total module which required checkbox support. I'll make a new download shortly. I've titdied up the code in some other areas as well. I'll add a note to the install instruction of which files need overwriting, so people in your position don't need to do a full install

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hey Ian!

 

I just installed .94 and I have 2 questions.

 

I'm using an older 2.2CVS, so I don't have currencies.php I have currencies_info.php - I did a search and replace on the coupon admin to point to the proper function, but I'm still getting this error:

 

Warning: Missing argument 1 for currenciesinfo() in /home/nhgene/www/admin/includes/classes/currencies_info.php on line 6

 

Any ideas on this?

 

Second - You mentioned about changing the sort order of the order total module so that the final total was at the bottom. However right now the total displayed still does not subtract the coupon amount - do you have a module that takes care of this and shows total, coupon amount and then final total?

 

Thanks!

 

Paul

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...