Custom view for orders

Bring Your Business to LifeSupportImage StoreCustom view for orders

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #52890
    kilinkis
    Participant

    Hello 🙂

    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×30

    Any idea on how to approach this?

    Thanks in advance 🙂

    #52912
    Xpark Media
    Keymaster

    This 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.

    #52923
    kilinkis
    Participant

    well, thank you very much 🙂

    so I should use those functions you mentioned and no mysql queries?

    #52993
    Xpark Media
    Keymaster

    You 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.

    #53148
    kilinkis
    Participant

    Well, 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 🙂

    #53168
    Xpark 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.

    #53186
    kilinkis
    Participant

    yes, thats what I’m trying to do now. Thank you very much for your help 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.