Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

Do you have SPPC installed? I have Ultimate SEO and I don't remember having this problem for that reason - I had the problem as I had SPPC. I'm trying to remember what we did to fix it, and I think it had something to do with changing a bit of code towards the top of one of the checkout pages. If you'd like, PM me with your email address and I can send you our checkout pages for you to compare with yours :blush:

 

Can someone help me with Discount coupons? It was working fine the last time I tested it. The only change I've made to the site was adding the Ultimate SEO.

 

When you go to check out on the checkout payment screen and enter a valid coupon it takes me to the login screen and you can't log back in either. I can't figure out why it would do that. Any idea what portion of the module to check?

 

my site is www.ghilliesuitclothing.com and a coupon code is 28YTMH7A ($5 off). Add something to the cart and use Paypal as a payment. For customer info, use [email protected] password "testtest"

 

Also, There's a bug where the coupon will correctly take the discount (say 10% off) of your order at checkoutpayment, but if the customer goes back into the site and adds stuff to their cart, the additional products won't get the discount.

UPDATE: I've turned off Ultimate SEO URLs for the time being so customers can use coupons. So testing the site with coupons will work. In the meantime, any idea why Ultimate SEO would clash with Discount Coupons?

~Tracy
 

Link to comment
Share on other sites

I would suggest going through the installation one more time, when taking notice to the actual "copy paste" you are doing.

 

@ this point add a . @ the end of line '</a><br>'

 

Eg Original it looks like this //kgt - discount coupons report

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

 

Add a .

 

//kgt - discount coupons report

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

 

Try :)

Link to comment
Share on other sites

I tried searching the thread and couldn't find an answer to my problem. I am trying to install this contribution but encounter a problem with the following instructions on catalog/includes/classes/order.php:

 

FIND on line 244:

 

$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
       $this->info['subtotal'] += $shown_price;

 

REPLACE with this code:

 

//kgt - discount coupons
       if( is_object( $this->coupon ) ) {
         $applied_discount = 0;
         $discount = $this->coupon->calculate_discount( $this->products[$index], $valid_products_count );
         if( $discount['applied_discount'] > 0 ) $valid_products_count++;
         $shown_price = $this->coupon->calculate_shown_price( $discount, $this->products[$index] );
         $this->info['subtotal'] += $shown_price['shown_price'];
         $shown_price = $shown_price['actual_shown_price'];
       } else {
         $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
         $this->info['subtotal'] += $shown_price;
       }
       /**************
       $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
       $this->info['subtotal'] += $shown_price;
       **************/
       //end kgt - discount coupons

 

I do not have that code in my order.php. Has anybody else encountered this problem?

Link to comment
Share on other sites

I just installed Discount Coupon Codes 3.31

 

and I get this error message under - Catalog - Discount Coupons

1054 - Unknown column 'cd.coupons_date_end' in 'order clause'

 

select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20

 

[TEP STOP]

 

So I tried to install a couple of different ones and it comes up with the same error code.

 

There is no other error messages.

 

Can someone please help.

 

Thanks

Link to comment
Share on other sites

Hi

 

i have osc 2.2 with different contrib. on of them ist Discount Coupon Codes. Every thing works fine.

i use also the contrib Saferpay Module (http://addons.oscommerce.com/info/2338). this is a payment-module like pay pal.

 

the problem is, when i buy something with saferpay then i don't see the discount and i can't finishing the order. Its looks like a loop. it loads just the same page.

 

Any idea?

 

thx

olaf

Link to comment
Share on other sites

Hi

 

i have osc 2.2 with different contrib. on of them ist Discount Coupon Codes. Every thing works fine.

i use also the contrib Saferpay Module (http://addons.oscommerce.com/info/2338). this is a payment-module like pay pal.

 

the problem is, when i buy something with saferpay then i don't see the discount and i can't finishing the order. Its looks like a loop. it loads just the same page.

 

Any idea?

 

thx

olaf

 

i've made a new install again (4th time). new it works with the saferpay-module.

Link to comment
Share on other sites

I just installed Discount Coupon Codes 3.31

 

and I get this error message under - Catalog - Discount Coupons

So I tried to install a couple of different ones and it comes up with the same error code.

 

There is no other error messages.

 

Can someone please help.

 

Thanks

 

Check to see if your database has the coupons_date_end column in the discount_coupons table

 

Screaming01! and danog

Are you running RC1 or 060817? It looks like you may be running RC1 - in which case this contribution would need to be edited for the changes made to 060817.

~Tracy
 

Link to comment
Share on other sites

Check to see if your database has the coupons_date_end column in the discount_coupons table

 

Yes, I believe it does.

 

If I go to modules and remove the discount coupon module it still gives me the same error code in the catolog - discount coupons.

 

I am very new at all this, the guy that normal does all this is very busy right now and can't help out.

 

Thank you

Scott

Link to comment
Share on other sites

Hm.. I just installed the latest version of discount coupon. Everything works great. It's a great contribution. Thanks!

 

 

However, I am bumping into a strange session problem.

 

If I entered in an incorrect credit card number or entered in wrong expiration date, or used the wrong coupon

 

my store will loop me back into the login screen.

 

If i entered in a short CC number, the java pop up error still works.

 

But I'm missing the traditional error message that tells customers "hey you've entered the wrong credit card number/expiration date" or "hey the coupon code is wrong"

 

does anyone know how to fix this? please?

 

This is what the error message should look like

 

2.png

 

Once I type in an incorrect CC number,

 

1.png

 

It will shoot me back to login screen without displaying the credit card error message.

3.png

 

help ? anyone?

 

below is my screenshot for my current sessions setting under admin

4.png

Link to comment
Share on other sites

I am using RC1

 

I know that Discount Coupon Codes will need to be edited to work with RC1 - but I don't yet know what edits need to be made. I've not yet upgraded to RC1 (gonna work on that next month probably).

 

Wish I could offer you more help - but I don't know myself yet what changes will need to be made. Maybe someone else here has gotten this working with RC1 ? :blush:

~Tracy
 

Link to comment
Share on other sites

Yes, I believe it does.

 

If I go to modules and remove the discount coupon module it still gives me the same error code in the catolog - discount coupons.

 

I am very new at all this, the guy that normal does all this is very busy right now and can't help out.

 

Thank you

Scott

 

Try the info here:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1006131

 

Basically - double check your database and make sure the word "coupons_" is in front of the database columns ;)

~Tracy
 

Link to comment
Share on other sites

Hm.. I just installed the latest version of discount coupon. Everything works great. It's a great contribution. Thanks!

However, I am bumping into a strange session problem.

 

If I entered in an incorrect credit card number or entered in wrong expiration date, or used the wrong coupon

 

my store will loop me back into the login screen.

 

First question - are you using a template contribution (such as STS) ? If so - look here:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1071646

 

Second, if you're not using a template system, I would suggest first comparing your modified catalog/checkout_*.php files with the stock osC files and make sure that you haven't accidentally removed the code that displays error messages.

 

Also double check the "Common Problems" section of the Read Me document you should have gotten in the download. I remember when Kristen was working on this she emailed me that she had added a section to the Read Me about error messages not showing up :thumbsup:

~Tracy
 

Link to comment
Share on other sites

First question - are you using a template contribution (such as STS) ? If so - look here:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1071646

 

Second, if you're not using a template system, I would suggest first comparing your modified catalog/checkout_*.php files with the stock osC files and make sure that you haven't accidentally removed the code that displays error messages.

 

Also double check the "Common Problems" section of the Read Me document you should have gotten in the download. I remember when Kristen was working on this she emailed me that she had added a section to the Read Me about error messages not showing up thumbsup.gif

 

Hi Tracy, thanks for offering to help. :-)

 

1. Hm.. Im not using STS.. So that won't apply.

 

2. I checked all checkout_* files (all 7 of them) and they compare just fine with discount coupon module i downloaded. That being said, I don't know which codes generates the error messages. I wasnt able to locate them but they werent in the original OSC installation either.

 

3. I read through the entire ReadMe and common problems. There's no mention of missing error messages. Do you think you can contact Kristen? (please?)

 

I think there's a possibility that I have used the wrong full package. I'm currently using Discount Coupon Codes 3.31 by Dimi. I've also used the optional combo fix by agrafuese. Should I be using a different version?

 

I have consulted other php programmers. Without looking at my source code, they mentioned that the error could possibly from admin session's setup?? Do you know which codes generates the error messages so I can specifically look for them?

Link to comment
Share on other sites

What do I do if I have installed all the files, but I am NOT seeing this Modules > Order Total >Discount Coupon

 

Maybe I downloaded the wrong files? I did the latest one 3.31. The install.txt says what files I need to have, and they are all there.

 

Help???

Link to comment
Share on other sites

What do I do if I have installed all the files, but I am NOT seeing this Modules > Order Total >Discount Coupon

 

Maybe I downloaded the wrong files? I did the latest one 3.31. The install.txt says what files I need to have, and they are all there.

 

Help???

 

**************** STEP 2 ****************

Create the database tables

 

Run these statements via the SQL tab in phpMyAdmin.

 

 

CREATE TABLE discount_coupons (

coupons_id varchar(32) NOT NULL default '',

coupons_description varchar(64) NOT NULL default '',

coupons_discount_percent decimal(7,4) default NULL,

date_start datetime default NULL,

date_end datetime default NULL,

max_use int(3) NOT NULL default 0,

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

PRIMARY KEY (coupons_id)

);

 

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)

);

 

You pry forgot to do that step.

Link to comment
Share on other sites

Hi

 

First of all a brilliant and very much needed contribution

 

Everything has installed perfectly, however the order total isnt deducting the Discount

 

I have my Orders set to the following

 

Discount Coupon 3

Shipping 4

Sub-Total Excl. 1

Tax 2

Total 5

 

But the Discuont Isnt Deducted im sure its probably me missing somthing, but any help given is great!

 

Many Thanks

Link to comment
Share on other sites

Hi All:

 

I have tryed several time to implement the Discount Coupon Codes contribution. I am not able to get it to work. Is their anyone out here that could install it for me on my three websites. I am willing to compensate anyone that can get it woreking on my sites. Feel free to email me at [email protected] or visit the site http://www.bestbooknook.com and look around. The osCommerce is a vanilla install so that should make it a little easier.

Thanks

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