Originally Posted by
lat9
That documentation applies to order-total modules back to the Zen Cart 1.5.1 time-frame. Order-total modules don't have a payment method or a payment-module-code; that's for (er) payment modules.
lat9,
Good to know about the ZC versions covered by your docs!
That's what's confusing me when using gift vouchers, which is an order total module. The GV defines:
Code:
define('PAYMENT_METHOD_GV', 'Gift Certificate/Coupon');
define('PAYMENT_MODULE_GV', 'GV/DC');
are getting set here (notice it is using the GV as a payment method even though it is an order total module):
includes/classes/order.php
Code:
'payment_method' => (($this->info['payment_module_code'] == '' and $this->info['payment_method'] == '') ? PAYMENT_METHOD_GV : $this->info['payment_method']),
'payment_module_code' => (($this->info['payment_module_code'] == '' and $this->info['payment_method'] == '') ? PAYMENT_MODULE_GV : $this->info['payment_module_code']),
If I had to guess, since the Gift Certificate/Coupon (GV) is built into ZC, it is hard coded to be the default (as show in the above code) payment if no other payment (credit card, money order, etc) is used. Even though the Gift Certificate/Coupon is an order total module!
Maybe I need to modify the order.php class to look at my gift card order total module as a payment method similar to how it does this for the Gift Certificate/Coupon order total module?
Can I set $this->info['payment_module_code'] and $this->info['payment_method'] from an order total module? If so, where?
Bookmarks