Author Topic: print the order as soon as order is placed  (Read 2884 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
print the order as soon as order is placed
« on: January 11, 2017, 11:55:51 AM »
Hello everyone,
I am making some changes-code-wise in AbanteCart cart and need help
It is basically for a show where user can make there own order but I have an issue there
 As soon as order is confirmed I want to print an invoice right then for customer and also mail him/her.. Can someone tell me where to get the code for printing functionality, or is there any extension available?
I see here I need to get the most recent order_number everytime to print it

Any help is highly appreciated!!

I am able to make an order successfully and can print the invoice from admin panel but I want that functionality on storefront where I have a button "paynow"

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: print the order as soon as order is placed
« Reply #1 on: January 11, 2017, 12:19:24 PM »
you should to use hooks for that.
for ex

Code: [Select]
public function afterModelCheckoutOrder_confirm(){
$that = $this->baseObject;

//do here what you want. Use $that as $this inside generic controller scope.

}

For quick test paste this code into some enabled extension such as public_html/extensions/banner_manager/core/custom_block_hook.php
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod