Problem with CSV order export for Vendor in fron end

  • Posts: 128
  • Thank you received: 2
7 years 4 months ago #273893

-- HikaShop version -- : 3.1.1
-- HikaMarket version -- : 1.7.3
-- Joomla version -- : 3.7.3
-- PHP version -- : 5.6

Hi there,

When a Vendor tries to export his orders to CSV from the front end and filters the output by payment type, he gets error message "Nothign to export" - see screenshot.

However there are lots of orders with that Payment method.

When he filters the export by dates or order status seems to work fine, but not when filtering by Payment method.

I'm using two payment methods MangoPay and Stripe which have been renamed to "Credit/Debit Card" and "Test Payment" respectively.

thanks!

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #273899

Hello,

Thanks for the report.
In "components/com_hikamarket/view/ordermarket/view.html.php" please replace

		if(!empty($pageInfo->filter->filter_payment))
			$filters['order_payment_method'] = 'hkorder.order_payment_method = ' . $db->Quote($pageInfo->filter->filter_payment);
By
		if(!empty($pageInfo->filter->filter_payment) && $vendor->vendor_id <= 1)
			$filters['order_payment_method'] = 'hkorder.order_payment_method = ' . $db->Quote($pageInfo->filter->filter_payment);
		if(!empty($pageInfo->filter->filter_payment) && $vendor->vendor_id > 1)
			$filters['order_payment_method'] = 'hkorder.order_payment_method = ' . $db->Quote('market-'.$pageInfo->filter->filter_payment);
We will add that patch in our side for the next release.

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.

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

  • Posts: 128
  • Thank you received: 2
7 years 4 months ago #273930

Thank you Jerome,

Unfortunately I have tested the patch and it does not work, still no results when the Vendor selects a payment method on the front end.

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #273931

Hello,

My bad, the filter give an ID, please replace the previous line with

		if(!empty($pageInfo->filter->filter_payment))
			$filters['order_payment_method'] = 'hkorder.order_payment_id = ' . $db->Quote($pageInfo->filter->filter_payment);

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.

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

  • Posts: 128
  • Thank you received: 2
7 years 4 months ago #273978

OK, that works, thank you

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

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