Forums / Bug Reports / Freecharger not activating when discounts applied to bring total to $0.00

Freecharger not activating when discounts applied to bring total to $0.00

Locked

Started by shartlesville on 18 Jul 2009, 12:26 AM · Views: 4,437

Results 1 to 20 of 29
This thread is locked. New replies are disabled.
18 Jul 2009, 12:26 AM
#1
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Freecharger not activating when discounts applied to bring total to $0.00

Problem: adding a coupon that brings the total to $0.00 does not activate freecharger. It still shows all payment types (except free charger) and requires a choice of payment: Paypal, credit card, or check/mo.

I wasn't sure if I should put this in the Payment module section or the add-ons section. If I need to repost it, please let me know.

I am using v1.3.8 new install not an upgrade with the following (so far) mods installed:

  • sunflower_orange-0-5 template
  • contact us add subject v2
  • credit card sidebox 1-2-5
  • encrypted master password 1-2
  • module manager v16
  • quickbooks merchant services 1-9a
  • oscommerce data importer 1-8 (moved the data, removed the transfer files)
  • no logo v1
  • cross sell just another cross sell mod rev186
  • enhanced who's online 1-0-3
  • EPv1.2.5.4
  • image handler 2.0-zc13
  • sales report rev104
  • all security patches & upgrades listed in the announcements
  • business activity report1-5-0
  • improved attributes controller1-1b2
  • mailchimp ecommerce reporting 1-0-1
  • monthly sales and tax summary report 1-3
  • newsletter discount 1-3
  • sales tax summary report 2-0
  • order steps tableless
  • fast easy checkout w/ easy sign up & login

- Server OS: Linux 2.6.24.2-AM

  • Database: MySQL 5.0.32
  • HTTP Server: Apache/2.2.11 (Unix)
  • PHP Version: 4.4.8 (Zend: 1.3.0)
  • PHP Safe Mode: Off
  • PHP File Uploads: On
  • Max Size: 2M
  • POST Max Size: 8M

Hopefully that is enough information to get this sorted out :wink:

**Problem: **adding a coupon that brings the total to $0.00 does not activate freecharger. It still shows all payment types (except free charger) and requires a choice of payment: Paypal, credit card, or check/mo.

**Freecharger is activated **in the admin and is set to sort order 1

Fast and Easy Checkout Configuration:
Fast and Easy Checkout true
One Page Checkout **false **
Checkout Confirmation Alternate Text **Your order is being processed, please wait... **
Display Checkout in Split Column **false **
Activate Drop Down List false **
Gift Wrapping Module Switch
false **
Activate Gift Message Field false
Drop Down List Options **Option 1,Option 2,Option 3,Option 4,Option 5 **
Activate Checkbox Field **false **
Easy Sign-Up and Login true
Display Order Total true
Display Confidence Box false
COWOA Position side
Confirm Email true
Shipping Address true
Copy Billing true
Master Password true
Checkout Without Account false
Checkout Without Account Only **false **
Hide Email Options For No Account true
Automatic LogOff for No Account **false **

Per a recommendation from another thread I also changed this function in includes/classes/order_total.php from this:

  function pre_confirmation_check() {
    global $order, $credit_covers;
    if (MODULE_ORDER_TOTAL_INSTALLED) {
      $total_deductions  = 0;
      reset($this->modules);
      while (list(, $value) = each($this->modules)) {
        $class = substr($value, 0, strrpos($value, '.'));
        if ( $GLOBALS[$class]->credit_class ) {
          $order_total = $GLOBALS[$class]->get_order_total();
          if (is_array($order_total)) $order_total = $order_total['total'];
          $total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);
        }
      }
      $difference = $order->info['total'] - $total_deductions;
      if ( $difference <= 0.009 ) {
        $credit_covers = true;
      }
    }
  }

to this:

function pre_confirmation_check() {
    global $order, $credit_covers;
    if (MODULE_ORDER_TOTAL_INSTALLED) {
      $total_deductions  = 0;
      reset($this->modules);
      $orderInfoSaved = $order->info;
      while (list(, $value) = each($this->modules)) {
        $class = substr($value, 0, strrpos($value, '.'));
        if ( $GLOBALS[$class]->credit_class ) {
          $order_total = $GLOBALS[$class]->get_order_total();
          if (is_array($order_total)) $order_total = $order_total['total'];
          $total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);
        }
        else 
        {
          $GLOBALS[$class]->process();
          $GLOBALS[$class]->output = array();
        }
      }
      $difference = $order->info['total'] - $total_deductions;
      if ( $difference <= 0.009 ) {
        $credit_covers = true;
      }
      $order->info = $orderInfoSaved;
    }
  }

but changing it back has no effect on the issue.

Here it the website: http:// bestsewingdeals.com/zen-cart/

You can test the problem using:

Test account: junkmail @ arkanddove.com (no spaces)
password: 123456
coupon code: TEST (ignore the text in the box, I haven't updated it yet, just click the refresh button to apply the discount, btw in case it matters, using the enter key instead of the refresh button does not resolve the issue)
must have $5 in the cart to activate the coupon

Does anyone have any idea where to start? Are there any known conflicts? Is anyone else running into this issue?

I can copy and paste any code you can write but I can't write it to save my life, :eek: :bangin: :lol: I'd greatly appreciate any help you can provide.

Blessings,
Krisann

Keywords: freecharger, free, coupon, discount, FEC, fast easy checkout, requiring payment, requires payment

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

18 Jul 2009, 1:40 AM
#2
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

It won't work with gift certificates either. :bangin:

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

18 Jul 2009, 1:48 AM
#3
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Sorry, I tried to edit the other post but I ran out of time...

After redeeming a GC code, it says "you've redeemed..." at the top of the page but the box showing that the GC is active and the GV balance is missing until you refresh the page.

Then when you try to check out using the GC to cover the total order ($0 balance order) it shows all payment methods except freecharger and requires users to choose one or it spits the error 'choose a payment'.

Anyone?

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

18 Jul 2009, 4:29 AM
#4
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Another update, if I use ONLY a GC to make a checkout with any amount over 0, it works.

I still have to refresh twice to make the GC application box appear but if I have any amount other than a $0 balance after a coupon I can checkout with just a gift certificate. I will have to word the box to let the customer know exactly what to do (not good, people don't bother to read) because the payment choices are all still showing.

The problem is a $0 order - there is no way to checkout without choosing check/mo or inputing credit card information, even if you have a GC balance.

frustrating! :frusty:

Is it possible that I need to move the process before something else?

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

18 Jul 2009, 5:50 AM
#5
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

**Freecharger will not display at all **when a coupon is used to make the total $0 BUT if I put only FREE items into the cart I CAN checkout with freecharger.

Hmm, maybe this isn't a FEC issue, maybe it is something else?

I've also tried using different browsers with the same trouble. I am running FF Firebug and the DTB and not coming up with anything on that end.

  • I tried a 100% coupon vs. a fixed price coupon both bringing the cart to $0 - no difference.
  • I tried disabling and reenabling the freecharger module, no change.
  • I've tried different fake customers with different email accounts in areas with and without tax; used different products, etc. same result everytime.
    Anyone have any other ideas?

:bangin: :wacko: :Flush: :eek: :frusty:

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

18 Jul 2009, 7:38 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Freecharger not activating when discounts applied to bring total to $0.00

This is a bug without all the add ons ... so we will look into it further ... thanks ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Jul 2009, 8:59 PM
#7
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Ajeh:

This is a bug without all the add ons ... so we will look into it further ... thanks ... :smile:

THANK YOU!! :hug: I thought I was losing my mind. :lol: I have been searching and searching and trying every possible suggestion.

The one thing I noticed while looking at my files is in the includes/classes/order_total.php there is a section that says it should load the discount information AFTER the payment options have been displayed but in order for the freecharger to work shouldn't they load before the payment options are displayed?

It is a pure guess because as I have mentioned, I am a copy & paste coder. :wink:

Here is the info just in case it helps:

line 138 (but I have FEC installed so it is probably closer to line 120) //This function is called in checkout payment after display of payment methods. .... function credit_selection()

Thanks again!

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

19 Jul 2009, 3:39 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Freecharger not activating when discounts applied to bring total to $0.00

Now one thing I am noticing is that while the Free Charger is not showing, even if I pick the Check/Money Order I am still showing as the Payment Method the:
Gift Certificate/Coupon

Which is, actually how I got the $5.00 off to give me the $0.00 order ...

Are you getting other results besides this when the Order is $5.00 and the Discount Coupon is $5.00 off ... Do you show the order as Payment Method Gift Certificate/Coupon after the order is completed in the Account information?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Jul 2009, 10:26 AM
#9
crops315 avatar

crops315

New Zenner

Join Date:
Jun 2007
Posts:
7
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

I'm experiencing the exact same issue at www.stinkball.com. Free Charger doesn't show up when the order total gets to zero based on a coupon. We just sent a bunch of 100% coupons to friends of the site and they're of no use!

Please help!

19 Jul 2009, 2:39 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Freecharger not activating when discounts applied to bring total to $0.00

Do your orders all end up showing as:

Payment Method:
Gift Certificate/Coupon

If so, isn't that what was done? Meaning, a Discount Coupon or GV brought the balance to $0.00 ... vs an Order with $0.00 products and $0.00 shipping which then uses the Free Charger? :unsure:

Does the Payment Method, regardless of the Payment Method selected switch to: Gift Certificate/Coupon ... regardless of which Payment Method is selected and continue through the checkout when the Discount Coupon/Gift Certificate takes the balance to $0.00?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Jul 2009, 5:54 PM
#11
crops315 avatar

crops315

New Zenner

Join Date:
Jun 2007
Posts:
7
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

I've attached a screen shot of my payment options once the 100% coupon has been entered. Even if I try to use one of these two options it returns an error saying that there's an invalid argument.

If the order total isn't reduced to $0.00, either of these payment methods works just fine.

Is there an easy way to add the code so that FEC checks for an order total of zero AFTER a coupon is entered and if so, it allows the use of the FREE CHARGE option?

Thanks in advance for your help!

http://www.stinkball.com/images/stinkball_screenshot.jpg
19 Jul 2009, 6:51 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Freecharger not activating when discounts applied to bring total to $0.00

crops315:

I've attached a screen shot of my payment options once the 100% coupon has been entered.It doesn't look like you even have coupons enabled ... on a normal Zen Cart site the details of the coupon would be shown on that page, but your screenshot doesn't show any evidence of that.
crops315:

Is there an easy way to add the code so that FEC checks for an order total of zero AFTER a coupon is entered and if so, it allows the use of the FREE CHARGE option?If your problem is directly related to the FEC addon or if you're looking for coding customizations to the FEC addon, you should be asking the author of the FEC addon about those matters.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jul 2009, 9:18 PM
#13
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Ajeh:

Do your orders all end up showing as:

If so, isn't that what was done? Meaning, a Discount Coupon or GV brought the balance to $0.00 ... vs an Order with $0.00 products and $0.00 shipping which then uses the Free Charger? :unsure:

Does the Payment Method, regardless of the Payment Method selected switch to: Gift Certificate/Coupon ... regardless of which Payment Method is selected and continue through the checkout when the Discount Coupon/Gift Certificate takes the balance to $0.00?

No, I just tried it with Check/MO and it says on the confirmation page: Payment method Check or MO, please make payable to yada yada...

The weird thing is the first time I clicked proceed to checkout it only refreshed the page, I clicked again and it took me to the confirmation page.

If I choose credit card and leave it blank it just refreshes the page, no errors appear. If I put in a number it goes to the confirmation page with Payment Method: credit card with all the relevant information.

If I choose PayPal it goes to confirmation, says Payment method: Paypal, confirm takes me to Paypal.

Thank you for helping figure this out! :smile:

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

19 Jul 2009, 9:26 PM
#14
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

DrByte:

If your problem is directly related to the FEC addon or if you're looking for coding customizations to the FEC addon, you should be asking the author of the FEC addon about those matters.

Ajeh seems to think this is not related to FEC but a bug with Freecharger somehow not engaging if the base item isn't free.

I too have the FEC addon but even if FEC is removed, when a coupon is used to make the total $0 the freecharger does not engage.

Any ideas? :lookaroun

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

19 Jul 2009, 9:35 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Freecharger not activating when discounts applied to bring total to $0.00

crops315 was asking questions specific to FEC ... which is why I directed them to take that discussion to someplace that deals with FEC issues specifically.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jul 2009, 9:54 PM
#16
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

I thought it might be related to the product being downloadable but it isn't. I just added a non-downloadable test product and had the same result. :wacko:

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

20 Jul 2009, 12:03 AM
#17
crops315 avatar

crops315

New Zenner

Join Date:
Jun 2007
Posts:
7
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Coupons are enabled on the site. I reduced the price from $39.95 to $0.00 using a 100% coupon that I created. The screenshot only shows the bottom of the checkout page to show my available payment methods.

I have no proof that this is an FEC issue, I was basing that assumption on previous posts in this thread.

The problem seems to persist whether FEC is being used or not.

As I understand it, any time an order total comes to $0.00, the FREE CHARGER should appear as a payment option. So that the customer can proceed to confirm their purchase without entering any type of payment information. Is this a correct assumption?

How can I get a customer with a 100% coupon successfully through the checkout process without having them provide payment information?

Thanks for your time and help!

20 Jul 2009, 2:30 AM
#18
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

I honestly have no idea how the freecharger actually works but is it based in any way on the base price being free? I mean is there logic that tells it that the item must be marked "free" or is it supposed to actually figure out that the final cost is $0?

I am not a coder in anyway (copy and paste is my coding motto :lol:) but I would like to help solve this.

I guess in this instance we're not zenned cuz we REALLY have to think. :wink:

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

20 Jul 2009, 5:09 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Freecharger not activating when discounts applied to bring total to $0.00

Free Charger freecharger is NOT used when the Total is brought to $0.00 due to a Gift Certificate or a Discount Coupon ...

It only shows when the Total in the cart is $0.00 and the Shipping is $0.00 making a $0.00 order ... and NOT a Free shipping Discount Coupon ... but an Always Free Shipping or 0 weight for Free Shipping ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Jul 2009, 5:39 AM
#20
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Freecharger not activating when discounts applied to bring total to $0.00

Ok, you lost me, lol.

Are you saying it is not possible to use the Freecharger if you get to a $0 order by using a coupon or discount? Would we have to possibly re-word the check/mo option and manually update those orders? Or is there another solution?

I don't anticipate having a lot of $0 orders with a coupon but my demographics are older ladies who become very unsettled if things aren't crystal clear and easy. :wink:

Thank you for your help with this!

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;