Extracting info on individual purchases

  • Posts: 139
  • Thank you received: 1
13 years 1 month ago #49412

We are using HikaShop to sell tickets for Jubilee functions. When I export the sales I get everything in one spreadsheet which is difficult to extract data from.

I am needing a method of pulling a list of who purchased a particular product e.g. a list of all people who bought dinner tickets or a list of all people who purchased Jubilee booklets. At the very least I need the MySQL code to do this.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
13 years 1 month ago #49451

You can run a query like that:
SELECT d.name FROM jos_hikashop_order_product AS a LEFT JOIN jos_hikashop_order AS b ON a.order_id=b.order_id LEFT JOIN jos_hikashop_user AS c ON b.order_user_id=c.user_id LEFT JOIN jos_users AS d ON c.user_cms_id=d.id WHERE a.order_product_code = 'DINNER_TICKET'

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

  • Posts: 139
  • Thank you received: 1
13 years 1 month ago #49493

Thanks for that, I did the following:

SELECT d.name FROM jos_hikashop_order_product AS a LEFT JOIN jos_hikashop_order AS b ON a.order_id=b.order_id LEFT JOIN jos_hikashop_user AS c ON b.order_user_id=c.user_id LEFT JOIN jos_users AS d ON c.user_cms_id=d.id WHERE a.order_product_code = 'Jubilee Dinner'

But got zero rows returned even though there should have been about 75.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
13 years 1 month ago #49565

The product code does not contain any space if generated automatically.

Are you sure that the code of your product is "Jubilee Dinner" ? Isn't that the name of your product instead ?

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

  • Posts: 139
  • Thank you received: 1
13 years 1 month ago #49612

Oops... yes I used the description :blush:

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

Time to create page: 0.066 seconds
Powered by Kunena Forum