Skip to main content

How to print order details from the listing view

More
8 years 8 months ago #285667 by PeterChain
-- HikaShop version -- : 3.2.2
-- HikaMarket version -- : 1.7.1 Multivendor
-- Joomla version -- : 3.8.2

Hi,

I want to put a button to send to the printer one order details from the vendor order listing view (ordermarket/listing).

I know that if I enter in the order details, I can click a button from the top menu that opens a modal with that option.

But it would be awesome if I can do the same thing from the list view.

There's some tweak to do it fast?

Thanks in advance.

--
Victor

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #285674 by Jerome
Hello,

You can perform a view override (ordermarket / listing) and add a button/link to open the invoice popup.
The usage of the HikaShop popup helper would be better and regarding the url ; it's just
Code:
hikamarket::completeLink('order&task=invoice&type=full&cid='.(int)$order->order_id, true)
At the end you will have a similar button than the one in the toolbar while displaying the order details.
But please do not forget to add some checks in PHP regarding the HikaMarket ACL
Code:
if(hikamarket::acl('order/edit/invoice')) { ... }
So you won't display the button if the vendor do not have the access.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: PeterChain

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #285710 by PeterChain
Thanks a lot!

Another question: How I call the Hikashop popup helper?

Thanks in advance.

--
Victor

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #285716 by Jerome
Hello,
Code:
$popupHelper = hikashop_get('helper.popup');
Afterwards I recommend you to take a look at some HikaShop code to see how it's used.
Here the display function definition :
Code:
function display($text, $title, $url, $id, $params_width, $height = null, $attr = '', $icon = '', $type = 'button', $dynamicUrl = false)

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: PeterChain

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago - 8 years 8 months ago #285772 by PeterChain
Thanks a lot for the answer.

--

Victor
Last edit: 8 years 8 months ago by PeterChain.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.159 seconds
Powered by Kunena Forum