Jump to content

swissarmyknife

Members
  • Content count

    12
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Jeff
  1. swissarmyknife

    Help with $order object in payment module

    Thanks, Matti. I'll try to work with that. The reason I'm testing for that is to determine (in the payment modules) which status to write to the db. For instance, for our download orders, I want the status to show fulfilled, but for items needing to be shipped, it should show unfulfilled. And the only place I see that the status is being written is in the payment modules. Yet, I can't retrieve the shipping info there because the $order object is dead once that function is called. Maybe I'm making this way too hard. Any suggestions? Thanks again for your help! - jeff
  2. I'm trying to get my Smart Status contrib to work, but, in checkout_confirmation.php, $order is no longer an object when it reaches my payment module. Yet, in checkout_payment.php, it is an object. :( I basically need to be able to test $order->info['shipping_method'] or figure out another way of testing whether this order needs to ship. Here's the payment module code: ?class authorizenetaim { ? ?var $code, $title, $description, $enabled; // class constructor ? ?function authorizenetaim() { ? ? ? ? global $order; ? ? ? ? ? ? ? // TESTING IF OBJECT - RETURNS NO IN CHK_PROC ? ? if (is_object($order)) { ? ? ? ? ?echo "YEP - it's an object!"; ? ? } else { ? ? ?echo "NOPE"; ? ? } ?$this->code = 'authorizenetaim'; ?$this->title = MODULE_PAYMENT_AUTHORIZENETAIM_TEXT_TITLE; ?$this->description = MODULE_PAYMENT_AUTHORIZENETAIM_TEXT_DESCRIPTION; ?$this->enabled = ((MODULE_PAYMENT_AUTHORIZENETAIM_STATUS == 'True') ? true : false); ?$this->error = ''; ? ?if ((int)MODULE_PAYMENT_AUTHORIZENETAIM_ORDER_STATUS_ID > 0) { ? ? if ($order->info['shipping_method'] != '') { ? ?// SHIP ITEM - MARK UNFULFILLED ? ? ?$this->order_status = MODULE_PAYMENT_AUTHORIZENETAIM_ORDER_STATUS_ID; ? } else { ? ?// DOWNLOAD ONLY ITEM - MARK e-FULFILLED ? ? ?$this->order_status = (MODULE_PAYMENT_AUTHORIZENETAIM_ORDER_STATUS_ID + 3); ? } ? ? ? } ? ? ? if (is_object($order)) $this->update_status(); ?// Change made by using ADC Direct Connection ?$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); ? ?} TIA for any help or pointers you can provide. :) - jeff
×