- Posts: 19
- Thank you received: 0
Create invoce only for "confirmed" orders
Is it possible to create an invoice only after an order becomes confirmed?
I use bank transfer and I'd like to show and assign othe rder number after I receive the payment, so that the order is based on Payment reception and not order creation.
Thank you!
Please Log in or Create an account to join the conversation.
The invoice number and the order number are the same number in HikaShop for now.
It's easier to understand for beginners...
It's always possible, but you will have to modify the code at several places in HikaShop... So if you're not a developer, it's not possible.
Please Log in or Create an account to join the conversation.
Is it necessarity to "hack" the core or is it possible to create a plugin?
Thank you!
Please Log in or Create an account to join the conversation.
First add a custom field of the table "order" via the menu Display->Custom fields (business edition) in order to be able to attached the invoice number to the orders.
Then create a hikashop plugin to generate the invoice number when orders are confirmed. We have some documentation for developers on that:
www.hikashop.com/en/support/documentatio...l#onAfterOrderUpdate
Then, you can override the views of HikaShop via the menu Display>Views and the emails of HikaShop via the System->Emails menu in order to display the invoice number when necessary.
Please Log in or Create an account to join the conversation.
also need to know just how to make the view "Display>Views>shows" is displayed only in state confirmed order.
Thanks again
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
How to make it only to download the bill that is in "Display> Views> shows" only if its state is set to "confirmed".
Hikashop use for a system in a university enrollments. I just want to discharge the bank receipt admitted students in state "confirmed".
Thank you for your quick response. I hope I explained correctly this time.
Please Log in or Create an account to join the conversation.
if( $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled'))){ ?>
to:
if( $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('created','refunded','cancelled'))){ ?>
Please Log in or Create an account to join the conversation.
It is possible that in "order / listing.php" only to access the link that shows "order / show.php" only "confirmed oeders".
Regards and thanks
Please Log in or Create an account to join the conversation.
Sure, after the line:
$row =& $this->rows[$i];
add the line:
if($row->order_status!='confirmed') continue;
in the order/listing.php file
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
<a href="<?php echo hikashop_completeLink('order&task=show&cid='.$row->order_id.$url_itemid); ?>">
<?php echo $row->order_number; ?>
</a>
to:
<?php if($row->order_status!='confirmed') {echo $row->order_number; }else{ ?>
<a href="<?php echo hikashop_completeLink('order&task=show&cid='.$row->order_id.$url_itemid); ?>"><a href="<?php echo hikashop_completeLink('order&task=show&cid='.$row->order_id.$url_itemid); ?>">
<?php echo $row->order_number; ?>
</a>
<?php } ?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.