Skip to main content

Problem with CSV order export for Vendor in fron end

More
9 years 2 months ago #273893 by sabroso
-- 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!

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

More
9 years 2 months ago #273899 by Jerome
Hello,

Thanks for the report.
In "components/com_hikamarket/view/ordermarket/view.html.php" please replace
Code:
if(!empty($pageInfo->filter->filter_payment)) $filters['order_payment_method'] = 'hkorder.order_payment_method = ' . $db->Quote($pageInfo->filter->filter_payment);
By
Code:
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.

More
9 years 2 months ago #273930 by sabroso
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.

More
9 years 2 months ago #273931 by Jerome
Hello,

My bad, the filter give an ID, please replace the previous line with
Code:
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.

More
9 years 2 months ago #273978 by sabroso
OK, that works, thank you

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

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