support

print the order as soon as order is placed

Started by Sam_78, January 11, 2017, 11:55:51 AM

Previous topic - Next topic

Sam_78

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"

abolabo

you should to use hooks for that.
for ex

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

Forum Rules Code of conduct
AbanteCart.com 2010 -