Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

Hello

 

I just installed the discount coupon...everything seem run fine...

but when I tried to check out...

some error occur...

I don't know why the paypal only count the sub-total not the total amount!?

how can I fix this problems?

Link to comment
Share on other sites

Hi, I have had this contribution installed for a while and it works just perfect for my site.

 

Now I have an issue that I have tried to find an answer for in the forum but not found.

 

I am selling products on several markets world wide and am using different currencies in my campaigns. My default currency is SEK and I would like to have the possibility to issue coupons in different currencies.

 

Anybody know how to solve this?

 

Greatful for any help!

Link to comment
Share on other sites

Hello

 

I've just installed Discount Coupon Codes and it is all working fine apart from the email order confirmation, which does not show the discount because I have the EPDQ CPI payment module installed which uses epdq_cpi/callback.php instead of catalog/checkout_process.php.

 

Does anyone how to update epdq_cpi/callback.php to get Discount Coupon Codes to work properly please?

Link to comment
Share on other sites

Thank you for the contribution and any help you can give me.

 

Everything works ... except ...

when using "Fixed Amount", the "Product Price" is always the same amount as the discount. I cannot enter 5 as a dollar amount (with Fixed Amount) as it will still display the discount and product price as exactly the same amounts ... not the $5 I entered for the coupon.

 

1 x test: $25.00

Discount Coupon Friend applied: -$25.00

Sub-Total: $0.00

Flat Rate (Best Way): $5.00

Total: $5.00

 

Please help ... and thank you for your time.

Link to comment
Share on other sites

I cam back here after not touching this contribution for a while in hopes of finding some help to the issue I was having on one of my sites. To refresh *ahem* my problem was/is that the coupon code does not show up or apply to the subtotal unless the checkout_confirmation page is refreshed.

 

I have tried this with stock checkout_payment and stock checkout_confirmation pages as well and it works the exact same way! it always needs a refresh.

 

One very odd thing is if I leave the checkout_confirmation page and continue to shop around or whatever then go back and try to apply the code it works without a hitch! I can't for the life of me figure this out..

 

The refresh "trick" does not work either because it gives the user the popup message saying that the information needs to be resent. then gives the option to resend or cancel. That is not something I can have popping up everytime someone advanced to checkout_confirmation.

 

Any help is GREATLY APPRECIATED!

 

If you want to play around on the site to see the problem in action here is the domain I am working on:

 

http://bit.ly/bbFdFi

 

coupon code is test1

Edited by sackling
Link to comment
Share on other sites

I am having a problem with this contribution. I used the auto installer, so I didn't have to change anything. When I use the percent off on the checkout_confirmation.php page it says "Discount Coupon applied:" and the total is just about double what it should be, but then the total is correct. When I have a coupon that is suppose to give them an exact amount off like $5.00 off, it give's them some random number off depending on the total. I tested a $10 off coupon when my total was $10.00 it said the discount was $19.00 off and my total was $1.00. When my total was $30.00 and I used the $10 off coupon it says it took of $21.00 and the total was $4.00. I don't know why it isn't working. I don't know where to start to even try to fix this. Any help would be greatly appreciated!

Link to comment
Share on other sites

Hello, i am also having the same problem

 

Discount does not shows in checkout_confirmation.asp every time i have to refresh it to display discount. Does any one have the solution

 

Dear Friends,

 

Adding the following code

 

<script type="text/javascript">

if(window.location.search.indexOf('reload')<0)

window.location.replace(window.location.href+'?reload');

</script>

 

after <head> tag in checkout_confirmation.php works fine for me as given from one of the previous posts.

 

Tested only under Mozilla Firefox browser

Link to comment
Share on other sites

Hello all,

 

My site will go 'live' in a couple of weeks and I've installed this contribution a while ago. Now I'm fine tuning my site and I've made orders above 75e free for sending in the admin. When I use a discount coupon code for a order under 75e, it will not be used. When I use a discount coupon code for a order above 75e it will work. If I turn free sending off it will also work. I've looked over the code but can't find the solution.

 

Is there anyone who can help me? Or does have anyone else have the same problem?

 

Thanks,

 

Mark

Link to comment
Share on other sites

Hello everyone,

I have installed this contrib and everything works fine except the Max Amount. If I run an order through the store with a coupon code that is supposed to give each customer 1 use, I can checkout again using the same coupon code over and over. It doesn't just give the customer 1 use.

 

I have my coupon code set to 1 on Max Use?

 

Help please?

 

Thanks!

Link to comment
Share on other sites

Good Evening,

 

I've downloaded the files and entred all the coding. At the end it says go into your admin section and go to Modules > Order Total. Select the Discount Coupons module and click the Install button in the box on the right. Ensure the module is enabled. Well that doesn't show in my Module area??? do you know why??

 

Thanks

Alix

Edited by KandyKisses
Link to comment
Share on other sites

Is anyone able to help at all??

 

Hi Kandy, I am not 100% sure if I am right as it has been quite a while since I installed this and I am not one of those oscommerce gurus, but it sounds to me like there may be an sql file which you did not run through your database. Look to see if you missed that. I don't know what it is named, but look for a file ending in .sql and run that. If you are not sure how to do that post back and I will try to explain it for you.

 

Hope that helps.

Link to comment
Share on other sites

So if it is missing, then add it using the sql file from the installation through phpmyadmin.

 

If you dont have it I think using this code should work too from my sql dump...

 

http://pastebin.org/126863

 

KM

 

in admin/coupons.php

 

i have this problem

 

 

 

1146 - Table 'reservdelarradiostyrt_se.TABLE_COUPONS' doesn't exist

 

select count(*) as total from TABLE_COUPONS

 

[TEP STOP]

Link to comment
Share on other sites

Since the error is UPPER_CASE it could be the define for it hasn't been added to /admin/includes/database_tables.php

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I have just installed this addon http://addons.oscommerce.com/info/4269

 

I have gone through all the files several times and it must be something that is missing in the package

 

kieran_mullen

Thanks but it did not help with your sql dump

 

 

 

This sql tables i have installed

 

CREATE TABLE `discount_coupons` (

`coupons_id` varchar(32) NOT NULL default '',

`coupons_description` varchar(64) NOT NULL default '',

`coupons_discount_amount` decimal(15,2) default NULL,

`coupons_discount_type` varchar(35) default NULL,

`coupons_date_start` datetime default NULL,

`coupons_date_end` datetime default NULL,

`coupons_max_use` int(3) NOT NULL default '0',

`coupons_min_order` decimal(15,4) NOT NULL default '0.0000',

`coupons_min_order_type` varchar(50) default NULL,

`coupons_number_available` int(3) NOT NULL default '0',

PRIMARY KEY (`coupons_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_categories` table :

#

 

CREATE TABLE `discount_coupons_to_categories` (

`coupons_id` varchar(32) default NULL,

`categories_id` int(11) default NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_customers` table :

#

 

CREATE TABLE `discount_coupons_to_customers` (

`coupons_id` varchar(32) default NULL,

`customers_id` int(11) default NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_manufacturers` table :

#

 

CREATE TABLE `discount_coupons_to_manufacturers` (

`coupons_id` varchar(32) default NULL,

`manufacturers_id` int(11) default NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_orders` table :

#

 

CREATE TABLE `discount_coupons_to_orders` (

`discount_coupons_to_orders_id` int(11) NOT NULL auto_increment,

`coupons_id` varchar(32) default NULL,

`orders_id` int(11) default '0',

PRIMARY KEY (`discount_coupons_to_orders_id`),

KEY `coupons_id` (`coupons_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_products` table :

#

 

CREATE TABLE `discount_coupons_to_products` (

`coupons_id` varchar(32) default NULL,

`products_id` int(11) default NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

#

# Structure for the `discount_coupons_to_zones` table :

#

 

CREATE TABLE `discount_coupons_to_zones` (

`discount_coupons_to_zones_id` int(11) NOT NULL auto_increment,

`coupons_id` varchar(32) default NULL,

`geo_zone_id` int(11) default NULL,

PRIMARY KEY (`discount_coupons_to_zones_id`),

UNIQUE KEY `discount_coupons_to_zones_id` (`discount_coupons_to_zones_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

#

# Data for the `discount_coupons` table (LIMIT 0,500)

#

 

INSERT INTO `discount_coupons` (`coupons_id`, `coupons_description`, `coupons_discount_amount`, `coupons_discount_type`, `coupons_date_start`, `coupons_date_end`, `coupons_max_use`, `coupons_min_order`, `coupons_min_order_type`, `coupons_number_available`) VALUES

('testing001','testing',2,'percent',NULL,NULL,2,1,'price',1);

 

COMMIT;

 

#

# Data for the `discount_coupons_to_categories` table (LIMIT 0,500)

#

 

INSERT INTO `discount_coupons_to_categories` (`coupons_id`, `categories_id`) VALUES

('testing001',22);

 

COMMIT;

 

#

# Data for the `discount_coupons_to_customers` table (LIMIT 0,500)

#

 

INSERT INTO `discount_coupons_to_customers` (`coupons_id`, `customers_id`) VALUES

('testing001',4);

 

COMMIT;

Edited by Groggo
Link to comment
Share on other sites

Exactly which version did you install?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

i have installed Discount Coupon Codes v3.34 FR 19 Feb 2010

I downloaded it.

 

I can't find TABLE_COUPONS in /admin/coupons.php

 

All I find is TABLE_DISCOUNT_COUPONS

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi

 

wonder if you guys can help me. I have installed the new files and manually altered the existing files.

 

It all seems to work fine in the admin section, looks a really good add on. I am having a problem though, can anyone help?

 

When I put the prouct in my cart and press checkout i get:

 

Warning: require_once(includes/classes/discount_coupon.php) [function.require-once]: failed to open stream: No such file or directory in /home/vivalab2/public_html/catalogue2/includes/classes/order.php on line 218

 

Fatal error: require_once() [function.require]: Failed opening required 'includes/classes/discount_coupon.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/vivalab2/public_html/catalogue2/includes/classes/order.php on line 218

 

can anyone shed any light on this, which file is wrong.

I am very new to this so can you please explain it quite simply.

many thanks

 

cath

Link to comment
Share on other sites

Hi

 

wonder if you guys can help me. I have installed the new files and manually altered the existing files.

 

It all seems to work fine in the admin section, looks a really good add on. I am having a problem though, can anyone help?

 

When I put the prouct in my cart and press checkout i get:

 

Warning: require_once(includes/classes/discount_coupon.php) [function.require-once]: failed to open stream: No such file or directory in /home/vivalab2/public_html/catalogue2/includes/classes/order.php on line 218

 

Fatal error: require_once() [function.require]: Failed opening required 'includes/classes/discount_coupon.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/vivalab2/public_html/catalogue2/includes/classes/order.php on line 218

 

can anyone shed any light on this, which file is wrong.

I am very new to this so can you please explain it quite simply.

many thanks

 

cath

 

Hi Cath,

 

I am not 100% sure on this, but I did a google search for the error you are getting which is something I found can be quite helpful to find answers besides going through the forums here. Anyway, this came up and may be what you need. It has been such a long time ago now since I installed this one I can't remember if I had this issue or not:

 

 

Here is the response first, then the issue that sounds like yours below that they responded to:

--------------------------------------------------------------------------------------------------------------------------------

Posted 25 September 2007 - 08:26 AM

 

If you go to the contribute site where you downloaded the Discount Coupon Module, you will see updates to the admin/includes/boxes/catalog.php page and the admin/includes/boxes/report.php page. It says:

 

At the code was missing two (.) :

 

1) At admin/includes/boxes/catalog.php has to be

//kgt - discount coupons

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>'.

'<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' );

/***************

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>' );

***************/

//end kgt - discount coupons

 

and

 

2) At admin/includes/boxes/reports.php has to be

 

//kgt - discount coupons report

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>'.

'<a href="' . tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_DISCOUNT_COUPONS . '</a>');

/*************

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); *************/

//end kgt - discount coupons report

 

 

So, instead of changing these files the way it suggested in the Installation document, you would change them according to the instructions above. This may help.

 

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

bargaingiftsstore, on Jul 29 2007, 08:36 PM, said:

 

Warning: order::require_once(includes/classes/discount_coupon.php) [function.order-require-once]: failed to open stream: No such file or directory in /home/bargaing/public_html/includes/classes/order.php on line 304

 

Fatal error: order::require_once() [function.require]: Failed opening required 'includes/classes/discount_coupon.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bargaing/public_html/includes/classes/order.php on line 304

 

I thought my site was PERFECT then, I had an idea....I already have gift cards so why not use the code I have on them to use for the coupon code. Well I did that and went to try it out and the above bull crap is what I got. I have absolutely no idea and certainly have not found that ANYWHERE. How nice it is to be unique. I emplore someone to please help me. If someone wanted to install this for me I'm willing to pay. Long as you have paypal. Please this is a complete and utter disaster.

 

This is what my code is in order.php

 

Line 302 //kgt - discount coupon

Line 303 if( is_object( $this->coupon ) ) {

Line 304 $this->info['total'] = $this->coupon->finalize_discount( $this->info );

Line 305 }

Line 306 //end kgt - discount coupon

Line 307 }

-----------------------------------------------------------------------------------------------------------------------------------------------------

 

Hope that is helpful to you

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...