Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

I have another MAJOR problem and maybe this thread is not the right place but the problem came when I reinstalled phpMyAdmin to add the info I needed under the sql tab.

Now my whole catalog is offline and I am getting this message:

 

1044 - Access denied for user 'pattie'@'localhost' to database 'osCommerce'

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

I went into the config.inc.php file to change the local host to mysql(as recommended by yahoo) because it kept saying I didn't have privlidges to alter the table.

I am soooo lost... can anyone help me? have I permanently cause some major problems? Even a retore of my database to a few days ago when it was working perfectly is not solving my problem.

Well, as I am tearing my hair out, anyone that knows sql and php can pm me for help.

Thanks so much,

Pattie

Link to comment
Share on other sites

This is the error that returned

 

Fatal error: Cannot redeclare class discount_coupon in /usr/local/psa/home/vhosts/piercedobsession.com/httpdocs/shop/includes/classes/discount_coupon.php on line 14

 

Open includes/modules/order_total/ot_discount_coupon.php and comment out line 14.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

i am having 2 problems:

 

when i input values in the fields to generate a code for $5 off, i get:

 

Warning: Division by zero in /home/site/public_html/admin/coupons.php on line 107

 

Warning: Cannot modify header information - headers already sent by (output started at /site/throwbac/public_html/admin/coupons.php:107) in /site/throwbac/public_html/admin/includes/functions/general.php on line 84

 

 

2. if i just put a number in the % field, say 10 for 10% off i assume, and click on insert, i get a coupon for 1000% off. why is that?

Link to comment
Share on other sites

Open includes/modules/order_total/ot_discount_coupon.php and comment out line 14.

 

Now we get the following message:

 

Fatal error: Cannot redeclare class discount_coupon in /usr/local/psa/home/vhosts/piercedobsession.com/httpdocs/shop/includes/classes/discount_coupon.php on line 14

 

In our setup we copied the files from the installation to both the httpdocs and httpsdocs folders.

Link to comment
Share on other sites

Dear All,

 

Thanks for this amazing contribution. I installed carefully within 45 minutes by reading all steps twice without any fatal error.

 

But,

 

When i enter invalid codes or used codes, I don't receive any error message on the site except URL. I read the previous messages where this may be due to installed template on default oscommerce. There are some other messages also which didn't replied.

 

the error_message is

******/checkout_payment.php?error_message=The+coupon+code+you+have+entered+is+not+valid.

******/checkout_payment.php?error_message=Our+records+show+that+you+have+used+this+coupon+1+time%28s%29.++You+may+not+use+this+code+more+than+1+time%28s%29.

 

kgt replied one of the messages,

 

"...as due to templates, the default warning messages were disabled..."

 

but I am still receiving some warning messages like below with my templated osc ms2.2,

8b5.jpg

091.jpg

 

 

SO, IS IT POSSIBLE TO RECEIVE THIS KIND OF WARNING MESSAGES WITH THIS CONTRIBUTION ?

(I actually don't know which kind of warning message is appearing since I see only in the url.)

 

Thanks a lot...

Link to comment
Share on other sites

Hi everyone,

 

I installed the coupon code contribution, however, now it reads that there is a credit card error when you try to apply the code and will not allow the user to proceed.

 

[The credit card number entered is invalid.<br>Please check the number and try again.]

 

It just reloads checkout_payment.php. Any suggestions.

 

I am using the cc module, for manual transactions...but the error is happening regardless of the payment module.

 

my site is www.marqsmen.com.

 

Thanks

Link to comment
Share on other sites

So, I took another look and what appears to be the issue is that i set a coupon with a max order total. Removing that allows the user to continue with the transaction, but at an unlimited transaction value.

 

Any ideas where I should look to correct this?

 

Hi everyone,

 

I installed the coupon code contribution, however, now it reads that there is a credit card error when you try to apply the code and will not allow the user to proceed.

 

[The credit card number entered is invalid.<br>Please check the number and try again.]

 

It just reloads checkout_payment.php. Any suggestions.

 

I am using the cc module, for manual transactions...but the error is happening regardless of the payment module.

 

my site is www.marqsmen.com.

 

Thanks

Link to comment
Share on other sites

I just downloaded and installed this and went thru the readme again and these posts, and I see that some people had the same issue I am having.

 

 

The coupon is calculated correctly and taken off the sub-total, but it does not have aline item showing the discount. I know this will cause havoc with the customers. Was there a final solutions?

 

I am using the version from 9-18...

Discount Coupon Codes 2.1 kgt 18 Sep 2006

 

 

Thanks in advance,

 

Don

Link to comment
Share on other sites

I just downloaded and installed this and went thru the readme again and these posts, and I see that some people had the same issue I am having.

The coupon is calculated correctly and taken off the sub-total, but it does not have aline item showing the discount. I know this will cause havoc with the customers. Was there a final solutions?

 

I am using the version from 9-18...

 

Thanks in advance,

 

Don

 

I figured this out. It was the settings in Module->order total that I needed to change the order, text etc.

 

Thanks!

Link to comment
Share on other sites

Can anyone point me in the right direction...

 

1. I'd like to pass the discount (amount) to my payment provider secure payment page. At the moment the discount isn't shown on this page so it looks a little odd.

 

2. I'd like to modify the contibution so that items already on special offer are not discounted any further when a discount coupon is used.

 

Any clues on where I need to start looking?

 

Many thanks

Graeme

Link to comment
Share on other sites

Can anyone point me in the right direction...

 

1. I'd like to pass the discount (amount) to my payment provider secure payment page. At the moment the discount isn't shown on this page so it looks a little odd.

 

2. I'd like to modify the contibution so that items already on special offer are not discounted any further when a discount coupon is used.

 

Any clues on where I need to start looking?

 

Many thanks

Graeme

 

I can't answer your first question - but I do know that a new version of Discount Coupon Codes is currently in testing and that this new version will allow you to choose whether or not to allow coupons to apply to items currently on special (as well as several other new features which I think are great)! I know initially Kristen was hoping to have this latest release ready about a week ago - but I think a few things were found during testing that have to be ironed out - but it is in the works ;)

 

Hopefully someone else here knows how to pass the discount amount to your payment provider :thumbsup:

~Tracy
 

Link to comment
Share on other sites

hello,

 

I've installed this contribution, and have gone over the code several times to ensure that I haven't made any mistakes.

 

when in my admin panel, I go to Catalog/Discount Coupons, I get the following error.....

 

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]

 

 

then again in the admin panel, when I go to Reports/Discount Coupons, I get the following error....

 

1054 - Unknown column 'dc.coupons_number_available' in 'field list'

select dc.coupons_id, dc.coupons_discount_percent, dc.coupons_number_available, COUNT(dcto.discount_coupons_to_orders_id) AS coupons_use_count from discount_coupons AS dc left join discount_coupons_to_orders AS dcto ON dc.coupons_id = dcto.coupons_id group by dc.coupons_id order by coupons_use_count desc, dc.coupons_id asc limit 0, 20

[TEP STOP]

 

I am using the most current version of OSCommerce, and the 2.1 version of the discount coupon codes contrib.

 

any help would be greatly appreciated,

thank you in advance.

Link to comment
Share on other sites

hello,

 

I've installed this contribution, and have gone over the code several times to ensure that I haven't made any mistakes.

 

when in my admin panel, I go to Catalog/Discount Coupons, I get the following error.....

 

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]

then again in the admin panel, when I go to Reports/Discount Coupons, I get the following error....

 

1054 - Unknown column 'dc.coupons_number_available' in 'field list'

select dc.coupons_id, dc.coupons_discount_percent, dc.coupons_number_available, COUNT(dcto.discount_coupons_to_orders_id) AS coupons_use_count from discount_coupons AS dc left join discount_coupons_to_orders AS dcto ON dc.coupons_id = dcto.coupons_id group by dc.coupons_id order by coupons_use_count desc, dc.coupons_id asc limit 0, 20

[TEP STOP]

 

I am using the most current version of OSCommerce, and the 2.1 version of the discount coupon codes contrib.

 

any help would be greatly appreciated,

thank you in advance.

 

Edit:

Fixed ! I found that when creating the tables in the database, the prefix "coupons_" was left off of a few columns

Edited by disfunkt
Link to comment
Share on other sites

I can't answer your first question - but I do know that a new version of Discount Coupon Codes is currently in testing and that this new version will allow you to choose whether or not to allow coupons to apply to items currently on special (as well as several other new features which I think are great)! I know initially Kristen was hoping to have this latest release ready about a week ago - but I think a few things were found during testing that have to be ironed out - but it is in the works ;)

 

Hopefully someone else here knows how to pass the discount amount to your payment provider :thumbsup:

 

Thanks Tracy, I'll look forward to the new release.

 

much appreciate it if anyone knows how to pass the discount amount to my payment provider - I tride for several hours to work it out last night, I could get the coupon code passed ok but not the discount amount.

I assumed it would be ['applied_discount'] but that didn't work.

Link to comment
Share on other sites

Thanks Tracy, I'll look forward to the new release.

 

much appreciate it if anyone knows how to pass the discount amount to my payment provider - I tride for several hours to work it out last night, I could get the coupon code passed ok but not the discount amount.

I assumed it would be ['applied_discount'] but that didn't work.

 

 

This depends entirely on the payment provider. Most don't have the ability to accept a discount line. You'd need to check the API for your payment provider.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

So, I took another look and what appears to be the issue is that i set a coupon with a max order total. Removing that allows the user to continue with the transaction, but at an unlimited transaction value.

 

Any ideas where I should look to correct this?

 

Can you describe in more detail what's happening? Also, please list any other contributions you have installed, and double-check the install instructions for checkout_confirmation.php and includes/classes/order.php to make sure you have made the correct changes.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Dear All,

 

Thanks for this amazing contribution. I installed carefully within 45 minutes by reading all steps twice without any fatal error.

 

But,

 

When i enter invalid codes or used codes, I don't receive any error message on the site except URL. I read the previous messages where this may be due to installed template on default oscommerce. There are some other messages also which didn't replied.

 

the error_message is

******/checkout_payment.php?error_message=The+coupon+code+you+have+entered+is+not+valid.

******/checkout_payment.php?error_message=Our+records+show+that+you+have+used+this+coupon+1+time%28s%29.++You+may+not+use+this+code+more+than+1+time%28s%29.

 

kgt replied one of the messages,

 

"...as due to templates, the default warning messages were disabled..."

 

but I am still receiving some warning messages like below with my templated osc ms2.2,

 

SO, IS IT POSSIBLE TO RECEIVE THIS KIND OF WARNING MESSAGES WITH THIS CONTRIBUTION ?

(I actually don't know which kind of warning message is appearing since I see only in the url.)

 

Thanks a lot...

 

You must add this code either to your header file or directly to checkout_payment.php:

 

<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Hi

 

Will this module be accepted by the "PayPal WPP Direct Payments" contrib

I have it working fine on Paypal IPN right now but will be upgrading to payment pro shortly ?

 

Ross

 

 

I haven't looked at it, but I believe this payment module works like most other payment modules. So I think you should be fine.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Now we get the following message:

 

Fatal error: Cannot redeclare class discount_coupon in /usr/local/psa/home/vhosts/piercedobsession.com/httpdocs/shop/includes/classes/discount_coupon.php on line 14

 

In our setup we copied the files from the installation to both the httpdocs and httpsdocs folders.

 

That's the same error message.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Hi

 

I think its should be possible, the provider is securehosting.

Can you give me any clues on how it may be done, I can give API details if that helps.

 

many thanks

Graeme

 

If they accept discount lines, you will find mention of it in the API. From there, you need to open the payment module you're using for osCommerce and add to the data that's being sent to securehosting.

Contributions

 

Discount Coupon Codes

Donations

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