Jump to content
kgt

[Contribution] Discount Coupon Codes

Recommended Posts

Hi,

 

No matter if i toggle this subtotal with or without discount option on/off it still displays subtotal with the discount applied.

 

Any ideas as how to get this right?

 

Richard

 

Please take a look at the posting made by xhowiexo. He has couple good points to fix the problems with the coupons.

 

I also found that it works better if the coupon is in the position #1 in the admin.

 

I am going the reinstall everything (erasing the database tables for the coupons)

 

I hope it helps!


Andrea

Share this post


Link to post
Share on other sites
Please take a look at the posting made by xhowiexo. He has couple good points to fix the problems with the coupons.

 

I also found that it works better if the coupon is in the position #1 in the admin.

 

I am going the reinstall everything (erasing the database tables for the coupons)

 

I hope it helps!

 

 

I have the same problem

Look for discount coupons in total so I can not move.

Share this post


Link to post
Share on other sites

how can i round the discount total when coupon set to a percentage of the order total?

 

instead of 114.38$ to have it show 114$ or instead of 231.67$, 232$.

 

i also have installed the loyalty discount and there it was easy, there s a line $od_amount = round($od_amount, 2); and i just changed 2 to 0

Share this post


Link to post
Share on other sites

I know that there has been a lot of discussion about rounding, but I can't seem to wrap my head around the responses for this particular case to pinpoint a solution if one exists. I have "Display Prices with Tax" set to FALSE so that should not be the problem.

 

If an order total comes to, say, $63.25, and a 10% discount is applied ($6.33), the order total using such math should be $56.92 but it is instead $56.93. There usually seems to be an extra cent added. I am using v3.3 of the contribution. If anyone could tell me if any solution exists I would appreciate it.

Share this post


Link to post
Share on other sites

All,

 

If I am starting from scratch what is the recommended version to use ?

 

Please do let me know. Which is the complete and updated version ? Too many versions in the contribution thread.

 

Thanks

 

Amit

Share this post


Link to post
Share on other sites

Hello,

 

I was wondering if there has been a fix to allow discounts to properly pass to Paypal IPN? Do we still need to run in aggregate selection to get them to pass?

 

Thanks JR

Share this post


Link to post
Share on other sites

Love this contrib, need just a little help. I'm trying to issue coupons for 100% off for contest winners. During checkout, a CC is still required to proceed, the discount is then correctly applied but since the total amount is $0.00 the CC module returns an error:

 

"A valid amount is required. - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

 

Am I missing something obvious? How can I issue 100% off coupons?

Share this post


Link to post
Share on other sites

PLEASE can someone help me out here!! I cant find this issue from anyone else on this thread...but I cant see why not!

 

IN the admin panel, the 'invoice' and 'details' section of an order display incorrectly now the discount module is installed.

For an order without a discount, the shipping totals/order totals/tax etc has moved to the left of the page

 

and when a discount is applied, the invoice has all teh main table headings correct, but completely misses out the order total information!!!

 

and instead at the right of the invoice this time, it says 'Discount Coupon b applied: -£1499 '

 

The code that is responsible for displaying the order total is shown below. I havent yet managed to work out how the discount coupon module is inserting the discount info into this though...and why is it ignoring the Order total???

 

 

Someone MUST have had this issue??/ please help me out here!!!

 

My admin panel is bog standard current version!

 

<?php

for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {

echo ' <tr>' . "\n" .

' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .

' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

Share this post


Link to post
Share on other sites
PLEASE can someone help me out here!! I cant find this issue from anyone else on this thread...but I cant see why not!

 

IN the admin panel, the 'invoice' and 'details' section of an order display incorrectly now the discount module is installed.

For an order without a discount, the shipping totals/order totals/tax etc has moved to the left of the page

 

and when a discount is applied, the invoice has all teh main table headings correct, but completely misses out the order total information!!!

 

and instead at the right of the invoice this time, it says 'Discount Coupon b applied: -£1499 '

 

The code that is responsible for displaying the order total is shown below. I havent yet managed to work out how the discount coupon module is inserting the discount info into this though...and why is it ignoring the Order total???

 

 

Someone MUST have had this issue??/ please help me out here!!!

 

My admin panel is bog standard current version!

ok, it seems its an unclosed tag somewhere that may be the problem.

 

Anyone know where?!

Share this post


Link to post
Share on other sites
Please take a look at the posting made by xhowiexo. He has couple good points to fix the problems with the coupons.

 

I also found that it works better if the coupon is in the position #1 in the admin.

 

I am going the reinstall everything (erasing the database tables for the coupons)

 

I hope it helps!

has anyone gotten the subtotal to not apply the discount if the admin option is set to false, without changing the sort order for this module to be above the subtotal? I can't find anything in any post by xhowiexo that fixes this.

 

Thanks.

Share this post


Link to post
Share on other sites
Love this contrib, need just a little help. I'm trying to issue coupons for 100% off for contest winners. During checkout, a CC is still required to proceed, the discount is then correctly applied but since the total amount is $0.00 the CC module returns an error:

 

"A valid amount is required. - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

 

Am I missing something obvious? How can I issue 100% off coupons?

 

Bump

Share this post


Link to post
Share on other sites
I just installed this for the third time, hoping that I did something wrong during the installation. However I am getting the same bug each time. Essentially when I click on an order to view the packing slip it is only displaying the page down to the discount portion. When I looked in the source it is showing that it has published the code inside an unclosed comment tag. This would be easy enough to fix if I could isolate the file that has this problem. Any assistance would be greatly appreciated!

 

The Source looks like this:

 

 

 

The poster says in a later post he added a comment tag in the admin/orders.php file...

 

Can anyone clarify if they have managed to fix this problem and what code they changed (and to what) if so please!!!

 

thanks

Share this post


Link to post
Share on other sites

Hi,

I've been using the Discount Coupons for a while now and they're really useful to us. I have one issue that causes us quite a headache.

We have some free products (zero priced) that we give to customers, if they place the free item in their basket after the main priced item then the coupon code works great, however, if they place the free item in their trolley first, followed by the other full priced item it breaks completely and gives incorrect discounts.

 

1 x Free item £0.00

1 x Priced Item £480.00

 

Sub-Total: £0.22

Our Carrier: £0.00

Discount Coupon (£50) applied: -£479.78

Total: £0.22

 

The above example should have deducted £50 and left the total at £430.

If I placed exactly the same order as above but placed the Priced item in the basket/trolley first then the code works perfectly.

 

If there is anybody that could help or tell us what we can do to get around this then it would be massively appreciated.

Share this post


Link to post
Share on other sites

Hi,

 

I'm facing a problem with a free shipping coupon and paypal.

I'm using a £6 flat rate and the confirmation page shows everything ok

 

eg:

Discount Coupon free delivery applied: -£6.00

Sub-Total: £323.00

Flat Rate (Best Way): £6.00

Total: £323.00

 

But paypal charges £329

 

My simple explanation is:

Paypal doesn't accepts negative values and discards free shipping discount.

 

I think if we added a new field like "Shipping total" that previously makes the shipping calculation before sending to paypal the end value(0 in this case) could solve it.

Can anyone do it ? or point the files and vars that need to be changed ? I'm newbie to oscommerce but I'm willing to help out fixing this

 

Cheers,

 

Nuno Rodrigues

www.nunorodrigues.net

Share this post


Link to post
Share on other sites

hi

 

i steel have the same proble with te discount coupon code contribution

 

when a customer confirmed an order with a percentual discount applied , the discount price is displayed with wrong decimals .

i mean when a customer got a 20 % discount on a 100euros product , the discount applied 2000 euros instead of 20,00 euros

and the order total result : - 1980 euros :blink:

 

is there someone here who can help me plese

 

thanks

Share this post


Link to post
Share on other sites
This is the support thread for the Order Total contribution Discount Coupon Codes found here:

 

http://www.oscommerce.com/community/contributions,4269

 

 

Hello,

 

Please Somebody HELP, SOS.

 

I have a small problem. I'm running version 3.31 and created coupon codes using an "#" in the item #. I am assuming this is no good because I can't edit these coupons nor delete them through the admin screen.

 

How can I get rid of them, perhaps delete them from a file or database? I took a quick look at MySql, but honestly, I don't know what I'm doing there and am afraid of messing something up. I couldn't even find a list of the coupon codes.


Andrea

Share this post


Link to post
Share on other sites

DCC not applying discount to products already 'on offer'

 

great contrib, anyone know if this is a feature/bug or user error?

 

Cheers

 

Duncan

Share this post


Link to post
Share on other sites

No matter what I do, even installed the latest 3.32 version, I just cannot get anyplace to fill out a maximum amount. I want to stop allowing the use of coupons up to a certain dollar amount, and despite everything, I'm back to where I started with version 3.0 -- no way to limit coupon uses.

 

Am I missing something?? It's driving me mad :angry:

Share this post


Link to post
Share on other sites
DCC not applying discount to products already 'on offer'

 

great contrib, anyone know if this is a feature/bug or user error?

 

Cheers

 

Duncan

 

Try:

 

Go to the admin

press on Modules, then Order total, you will find:

Discount Coupon. Edit

_Exclude product specials?

true

 

set if to false

 

I hop it helps


Andrea

Share this post


Link to post
Share on other sites

Need a bug fix doing on this as its messing up the layout on a couple of different pages (works ok it seems)

 

I am willing to pay a competent coder who would like to fix this bug. I know the problem but cant seem to fix it... :(

 

please pm me if you want to do it. payment by paypal.

Share this post


Link to post
Share on other sites

Greetings. This is a beautifully documented contribution and the admin is very professional looking and easy to use. My problem is that after configuring the discount, on which page should the box show up for the customer to enter the code? It is not showing up anywhere in the checkout process or elsewhere. I've verified the code changes as suggested in the troubleshooting guide. I've verifed the admin settings. I tried disabling STS. I'm probably overlooking something simple and would appreciate any advice. Thanks, codymaxx

 

I'm using osCommerce 2.2RC2a, PWA 2.0, Featured Products 1.6.3, STS v4.5.8, and manual shipping. My site is TobysUniqueCreations.com/screations

Share this post


Link to post
Share on other sites
has anyone gotten the subtotal to not apply the discount if the admin option is set to false, without changing the sort order for this module to be above the subtotal? I can't find anything in any post by xhowiexo that fixes this.

 

Thanks.

 

Hi,

 

Yes, I've come up with a solutions that works (finally).

This solves the problem with subtotals showing with the discount applied, even when Display subtotal with applied discount? is set to false.

 

includes/classes/discount_coupon.php ~line 368

 

Find:

if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) {
       //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax
       $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );
       $applied_discount = 0;
     }
     $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );

 

Replace with:

      if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) {
       //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax
       $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );
       $applied_discount = 0;
       $shown_price = $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'];
     } else {
       $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );
     }

Share this post


Link to post
Share on other sites

is it possible to send a discount coupon to a client's email address and to also make it show on the account.php page?

Share this post


Link to post
Share on other sites

Hello,

 

I have installed this Addon to my site, but all I get in the admin control panel is a header and nothing else. I have installed it alongside the Mindsparx admin tool.

 

The admin login box works fine, and the rest of the site appears fine, but there is no coupon box in any payment forms.

 

~Callum

Share this post


Link to post
Share on other sites

Hello,

 

I am using discount coupon codes contribution without any issue for order totals greater than zero. We have a requirement where we can allow free products too. But, if I give a coupon with 100% discount and if a user use this coupon for 1 product and if the order total is zero with the coupon, it is giving error during checkout that order total cannot be zero. how to allow 100% discount and skip payment in case of 0 order total?

 

Thanks,

Karuna.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×