How to print order details from the listing view

  • Posts: 634
  • Thank you received: 16
6 years 3 months ago #285667

-- 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.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 3 months ago #285674

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

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
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.

  • Posts: 634
  • Thank you received: 16
6 years 3 months ago #285710

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.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 3 months ago #285716

Hello,

$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 :
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.

  • Posts: 634
  • Thank you received: 16
6 years 3 months ago #285772

Thanks a lot for the answer.

--

Victor

Last edit: 6 years 3 months ago by PeterChain.

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

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