Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

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

 

 

Many thanks

 

I have only just started to do these contributions, so its a minefield for me.

 

I managed all the security ones, they were pretty easy, but i was losing the will to live with this one. I had tried it several times but to no

avail.

 

Anyway, walked away and came back, did it all again, printed everything out and had my laptop and pc, and HEY PRESTO, it works. (well for the time

being anyway - till i mess something up again)

 

so i have to say this is a brilliant contribution, its what i really needed. It was just be not doing it right.

 

Hope you sort your out.

 

Cath

Link to comment
Share on other sites

Hello everyone,

I know this question has been posted before but I never saw a definitive answer. Is there a way to checkout of a store after a 100% Off coupon has been applied? It keeps redirecting the customers to Paypal with a zero balance.

 

I thought I could just click the "edit" link on the Payment Method and go back and pick "no payment" since the order total was now zero, but it doesn't keep the coupon in the system... it discards the coupon and essentially you start over again. Is there a way for it to remember the coupon code that has been applied so the "no payment" module would appear with the zero balance?

 

Thanks in advance!!

Link to comment
Share on other sites

Try adding this code:

 

if (!tep_session_is_registered('coupon')) tep_session_register('coupon');
 if (tep_not_null($HTTP_POST_VARS['coupon'])) {
$coupon = tep_db_prepare_input($HTTP_POST_VARS['coupon']);
 }

 

 

BEFORE these lines:

require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 

 

Which page do you add this too the checkout???

Link to comment
Share on other sites

I'm now getting this error which I've not had before:

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

 

SELECT dc.* FROM TABLE_DISCOUNT_COUPONS dc WHERE coupons_id = 'KKOU10' AND ( coupons_date_start <= CURDATE() OR coupons_date_start IS NULL ) AND ( coupons_date_end >= CURDATE() OR coupons_date_end IS NULL )

 

[TEP STOP]

 

My start date and my end date are 04/01/2010 (April 1st 2010) and 05/01/2010 (May 1st 2010) So why would this show??

Link to comment
Share on other sites

I'm now getting this error which I've not had before:

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

 

SELECT dc.* FROM TABLE_DISCOUNT_COUPONS dc WHERE coupons_id = 'KKOU10' AND ( coupons_date_start <= CURDATE() OR coupons_date_start IS NULL ) AND ( coupons_date_end >= CURDATE() OR coupons_date_end IS NULL )

 

[TEP STOP]

 

My start date and my end date are 04/01/2010 (April 1st 2010) and 05/01/2010 (May 1st 2010) So why would this show??

 

I found this thread which may be helpful: http://www.oscommerce.com/forums/topic/314747-table-discount-coupons-does-not-exist/

Link to comment
Share on other sites

Hi guys

 

probably a quickie for you,

 

can anybody tell me how (if it is possible) I would change the position on the coupond/discount code box on the payment information page (checkout_payment.php)

 

I would like it nearer the top, so that it shows above order comments box, if it possible.

 

Many Thanks

 

Cath

Link to comment
Share on other sites

 

Hi their, Thanks for your help. My error seems to have gone though without me doing anything so who knows what happened their. the only problem I have now is that when putting in a discount code it doesn't seem to take the discount off??

Link to comment
Share on other sites

Hi everyone,

 

I've posted this elsewhere but haven't figured out this problem yet. Has anyone here had issues getting discount coupons (v3.34) to work with PayPal Express? I had a customer who was able to check out with direct payment eventually with coupons working, but only after failing to get PayPal to work for them as they couldn't find where to enter the coupon code. I have the latest version of Dynamo WPP installed. Could someone at least list the correct procedure that a customer uses w/ PayPal Express so that discount coupons are included and applied properly?

 

Thanks,

 

Nick

Link to comment
Share on other sites

Hi,

 

I've installed the autoinstaller and when I get to the checkout_payment.php page (If I don't enter a code or do enter a code) I get looped back to the checkout_shipping.php page with the following error

 

"Your calculated shipping charges have changed."

Link to comment
Share on other sites

Hi everyone,

 

I've posted this elsewhere but haven't figured out this problem yet. Has anyone here had issues getting discount coupons (v3.34) to work with PayPal Express? I had a customer who was able to check out with direct payment eventually with coupons working, but only after failing to get PayPal to work for them as they couldn't find where to enter the coupon code. I have the latest version of Dynamo WPP installed. Could someone at least list the correct procedure that a customer uses w/ PayPal Express so that discount coupons are included and applied properly?

 

Thanks,

 

Nick

 

 

Hi there,

 

If you look about 4 or 5 pages back people are discussing this problem and a way to solve it... Fingers crossed that will help you out :)

Link to comment
Share on other sites

Hi,

 

I've installed the autoinstaller and when I get to the checkout_payment.php page (If I don't enter a code or do enter a code) I get looped back to the checkout_shipping.php page with the following error

 

"Your calculated shipping charges have changed."

 

forgot to state i'm using table rate shipping

Link to comment
Share on other sites

i'm using osc 2.2 and downloaded dcc 3.34 fr. I've manually installed it as so be honest i have noidea what im doing. It's the only add on i've added.

 

When I entre the discount code and go onto the Order Confirmation page the discount isn't showing??? I've double checked the install and can't see anything I've missed. I red through all 141 pages of this topic and it only seems to answer my problem for older versions which seem to give me error codes.

 

I was wondering if anyone know how to solve this problem before i throw the computer out of the window :(

 

Thanks

Link to comment
Share on other sites

Hi there,

 

If you look about 4 or 5 pages back people are discussing this problem and a way to solve it... Fingers crossed that will help you out :)

 

 

Yeah I'd actually posted back in February as well about another problem that I eventually figured out...unfortunately no solution for this PayPal Express problem so far. I'll have to experiment a bit...

Link to comment
Share on other sites

hi there !

 

i installed the latest version and it work fine but still have one issue :

 

the coupon utilisation limitation don't work, for example if i set 1 coupon with max 2 uses then when i use it for 3 time, the coupon used time counter (in admin/report) display -1 !!!

 

and so on if i still use it (its unlimited) !!!

 

how can i fix it ?

 

i've been looking the install process and its perfect,

 

i'm using One Page Checkout contrib (latest version)

 

anyone ?

 

 

 

thanks

:thumbsup:

 

 

and thank you for this great contrib !

Edited by gandahar

///

Link to comment
Share on other sites

Hi,

 

I've installed the autoinstaller and when I get to the checkout_payment.php page (If I don't enter a code or do enter a code) I get looped back to the checkout_shipping.php page with the following error

 

"Your calculated shipping charges have changed."

 

I see that several people in here is getting this error message.. including me :)

 

I have both table rate and flat rate as shipping methods.. when choosing table rate everything works fine. When choosing flat rate i get to checkout_payment, but after choosing a payment method I am sent back to checkout_shipping with the error message "Your calculated shipping charges have changed."

 

The strange thing is that if I change the flat price to match the table price, or price the flat lower than table.. it works just fine..

 

Help would be MUCH appreciated!

Link to comment
Share on other sites

You need to be specific.

 

Different people are having different issues for diffterent reasons.

 

What version of the controbution and oscommerce are you using? Did you apply all the updates? Finally what is the error?

 

it seems everyone is having issues with this add on :( I've ended up deleting it as no one seems to be able to fix it

Link to comment
Share on other sites

You need to be specific.

 

Different people are having different issues for diffterent reasons.

 

What version of the controbution and oscommerce are you using? Did you apply all the updates? Finally what is the error?

 

I also deleted it.. I need both Table shipping and Flat shipping to work, and the script seems to only work with table shipping so...

Link to comment
Share on other sites

Hi all and congratz for that very nice contrib.

 

The contribution works well, accepts my coupon, but when i want to pay, i have this message (translated from french...):

 

The link you used to access the PayPal system contains an incorrectly formatted item amount.

 

An important point is that I use the standard Paypal module that is already installed with my Oscommerce 2.2rc1

 

Thanks in advance for your support.

Link to comment
Share on other sites

There is a bug in the contribution.

If the customer choses Paypal Express, puts his username and password, and goes to the checkout finish page. There will be no discount.

 

He can just get the discount if he decides to, change the payment method, and choose paypal again.

 

Any fix ?

Link to comment
Share on other sites

i'm using osc 2.2 and downloaded dcc 3.34 fr. I've manually installed it, It's the only add on i've added.

 

When I entre the discount code and go onto the Order Confirmation page the discount isn't showing??? I've double checked the install and can't see anything I've missed. I red through all 141 pages of this topic and it only seems to answer my problem for older versions which seem to give me error codes.

 

I was wondering if anyone know how to solve this problem before i throw the computer out of the window :(

 

Thanks

 

 

You need to be specific.

 

Different people are having different issues for diffterent reasons.

 

What version of the controbution and oscommerce are you using? Did you apply all the updates? Finally what is the error?

Link to comment
Share on other sites

I have the same proble as KandyKisses, on 05 April 2010 - 06:19 PM, posted

After enter the correct coupon code but when go to checkout confirmation page, discount does not show and the total does not apply the discount

please help

 

I am using osCommerce 2.2-MS2 and disocunt coupon code 3.34 uploaded by xinxi

Link to comment
Share on other sites

I have the same proble as KandyKisses, on 05 April 2010 - 06:19 PM, posted

After enter the correct coupon code but when go to checkout confirmation page, discount does not show and the total does not apply the discount

please help

 

I am using osCommerce 2.2-MS2 and disocunt coupon code 3.34 uploaded by xinxi

 

add me to the list (ocs 2.2 rc2, dcc 3.34)

The few times I've seen someone post this issue it's simply...glossed over...?

 

I'm not even sure where to start looking. I had the total doubling issue, resolved. Made sure that files were updated correctly, made sure the sort order was a unique value...everything in the admin runs like a champ...just when it's time to checkout, no discount.

 

Anyone...?

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