Bring Your Business to Life › Support › Image Store › Custom view for orders
- AuthorPosts
- May 3, 2013 at 9:00 pm #52890
kilinkis
ParticipantHello 🙂
I need to create an admin page that shows, from all the orders:
qty and size of each ordered image between two dates.
Eg:
DSC_0031: qty 15 size 20×30
DSC_0031: qty 5 size 30×40
DSC_0125: qty 2 size 15×30Any idea on how to approach this?
Thanks in advance 🙂
May 4, 2013 at 1:19 am #52912Xpark Media
KeymasterThis is a bit complicated, but you can use the file image-store/admin/sales/sales-details.php as a guide.
All the orders are save under the content type “ims_order”, each order has it’s own order id. Usee the meta_key “_ims_order_data” and “_response_data” to obtain all data related to the order.
May 4, 2013 at 1:57 pm #52923kilinkis
Participantwell, thank you very much 🙂
so I should use those functions you mentioned and no mysql queries?
May 9, 2013 at 3:13 am #52993Xpark Media
KeymasterYou can use the function get_post_meta
get_post_meta( $post_id, "_ims_order_data", true)
get_post_meta ($post_id, "_response_data", true)
Where $post_id is the sales id, these functions will return arrays with all the sales data.May 19, 2013 at 9:34 pm #53148kilinkis
ParticipantWell, I managed my way to accomplish this and I’d like to give you the code so you can use it if you want.
The code can be better for sure, but it can help. I’ll try to integrate it better and then paste the code here 🙂
May 22, 2013 at 1:22 am #53168Xpark Media
Keymaster@kilinkis,
we may not integrate this to the standard plugin, but you should add/integrate the code into a plugin so you can upgrade the image store plugin in the future.May 22, 2013 at 12:44 pm #53186kilinkis
Participantyes, thats what I’m trying to do now. Thank you very much for your help 🙂
- AuthorPosts
- You must be logged in to reply to this topic.