Export Specific SKU ONLY

  • Posts: 36
  • Thank you received: 1
  • Hikashop Business
4 months 5 days ago #327956

Hey guys, ok an ongoing issue my client has is that when we select a specific SKU to export all sales based on product, clearly for targeted marketing and retargeting, it export ALL products the customer has made. This is causing issues for various reasons and doesn't make sense to any of us really.

The option to export per SKU should be just that but it is not? Is there something we are missing here? I can control the other fields we wish to export, that's great, although for some reason we get duplicate name fields, no big deal but, this SKU export issue is genunely causing us a nightmare.

Please could you advise/help point us in the right direction if possible. I think the whole mass action part of Hikashop needs a massive rethink in terms of usability and has so much more potential, it's just a little bit too developer and less end user friendly tbh. I get it's time and effort but clearly a lot of end users struggle with it and my client certainly has absolutely no clue how t use it, it just loses him and his staff, that's not really a god thing when your using Hikashop for client eCom.

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
4 months 5 days ago #327959

Hi,

There is no such feature in the mass action system.
So I suppose that what you're doing is that you've configured a mass action on the "order" data type with a filter on the order_product_code column and and action to export a CSV with columns you selected in it.
This mass action will export the data of the orders with this order_product_code corresponding for at least one product in the order.
I suppose that you're confused as to why the columns of the table order_column are repeated in the CSV and why you don't see the corresponding product in these columns.
That's because what the export does is an export of orders and not of "sales of a product" like you want.
So each row of the CSV is an order.
And then, for the columns of the order_product table, it will repeat them once for each product in the order.
So if you have ten products in the order that match with the filter, you'll get these columns ten times, and each time, you'll have the information of one product of the order in the columns.
So you will have the information of the product of the filter in the CSV, but not always in the same columns.
For one order it might be in order_product_code in another one, it might be in order_product_code_3 (because it's the third product in the order and not the first).
What you would need for your goal is a mass action on the order_product data type so that you would have one product of an order on each row of the CSV and in that case, you would have only one set of columns of the order_product table and the information of the product you're looking for would always be in the same column.

But I can't say much more as I don't know what columns you're exporting and what use you have for them.
If you're only interested for the email address of the users who purchased product X, then a mass action as described above will work just fine.
But if you want to get the quantity of product X in each order, then that would indeed not be suitable solution.

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

  • Posts: 36
  • Thank you received: 1
  • Hikashop Business
4 months 4 days ago #327998

Hi Nicolas, thanks for the reply although a tad confusing.

I just want to export order info for a single SKU as stated, I don't want any other SKUs in the same order.

I still need customer info, name, email, number, order price, discount codes if aplicable.

I set mass action and have what I want, it's just it keeps adding all other products ordered when the SKU selected was ordered at the same time?

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
4 months 4 days ago #327999

Hi,

Yes, that's normal. As I said, if you select a column of the order_product table for your export (so it's the order_product_code column from what I understand), you'll get one column for each product of the order.
The filter is there to select the order, but not to select the product in the order. So when the export action is run, it doesn't know that you want only one product. And thus, it will load the information of all the products in the order, and have one column order_product_code for each product in the order.
But then, why do you need the ordrer_product_code information at all in the export ? You already know it since you entered it in the filter, no ?

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

  • Posts: 36
  • Thank you received: 1
  • Hikashop Business
4 months 4 days ago #328009

I need to export the sales for a single SKU without any other products showing, the export should show all the data I want as explained, minus SKU's I have not requested. I need to export customers data who have ordered a specific product without the other content for export into another system that makes calculations based on number of orders, it's for a competition system.

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
4 months 3 days ago #328033

Hi,

Why not just not export the "order_product_code" column ?
All the rows will be for the same SKU anyways, so why would that be needed ?
If you really need it, as I said, it's not possible with a order mass action. It would require developing a new type "order product" of mass action so that you would get one row per product ordered instead of one row per order. That sure is possible, but that's days of development on our end. A quicker approach would be to modify a core file of HikaShop with some custom coding to change the behavior of the export mechanism for that column, but that's still a few hours job.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum