Forums / Bug Reports / [Not a bug] Payment required for Zero value purchase...

[Not a bug] Payment required for Zero value purchase...

Locked

Views: 937

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 Mar 2010, 4:52 PM
#1
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

[Not a bug] Payment required for Zero value purchase...

Not a bug as such but more an attempt to understand how zero value orders are being handled. I have written a mod (Reward Points) which when applied to the end total can render the purchase free. It is an Order Total mod. The problem is that the payment.php class, which decides whether to display freeshipper, runs before the full total is calculated- So my mod comes along and subtracts its value from $order->info['total'] but it is too late- the customer still has to select a payment method. This problem is then further compounded when checkout_confirmation redirects the user off to the payment website without checking to see if there is anything to pay.

I suppose my question is: What is the reason behind the freeshipper mod? Surely it makes more sense to check the value at the confirmation and just not go looking for payment for a zero value.

This is a follow on from: http://www.zen-cart.com/forum/showpost.php?p=704981&postcount=1

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

24 Mar 2010, 11:01 AM
#2
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: [Not a bug] Payment required for Zero value purchase...

Okay- looks like I've answered my own question. It comes from not really understanding what the collect_posts() function in the order_total modules does.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com