Support » Plugin: PW WooCommerce Gift Cards » Reporting

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter idigmarketing

    (@idigmarketing)

    I am trying to use WP all export to export he gift card useage but its not coming back with any data… please advise.

    Plugin Author pimwick

    (@pimwick)

    To display all gift cards, click on Pimwick Plugins -> PW Gift Cards -> Leave the search field blank and click the blue Search button. You can copy/paste this data into a spreadsheet if you want to export it.

    Alternatively, the data is stored in two tables if you want to get it directly from the database:

    wp_pimwick_gift_card
    wp_pimwick_gift_card_activity
    Thread Starter idigmarketing

    (@idigmarketing)

    That will show me usage? I’m looking to use WP export to export orders that include the Gift Card numbers and amounts that were used.

    Plugin Author pimwick

    (@pimwick)

    When a gift card is redeemed it is stored in the WooCommerce Order Line Item table. As long as your export information grabs all of the line items, it will appear in that data.

    Thread Starter idigmarketing

    (@idigmarketing)

    I have literally 10s of 1000s of gift cards in my system and I have a WP network with 10 sites and need to dump out gift card useage for each site… As mentioned when I do All Export I use the field PW Gift Card Debited but nothing shows on the order that one was used on. So doesn’t seem to grab the data.

    See here: https://imgur.com/a/gEcKt23

    Thread Starter idigmarketing

    (@idigmarketing)

    One caveat is that I used a bit of code you guys provided so that all stores in the WP network feed off one table as the gift cards need to be shared across the network. I presumed when exporting order data it would come through somewhere.

    Thread Starter idigmarketing

    (@idigmarketing)

    ahhh sorry missed your last response… line item table eh ok i’m going to give that a try now.

    Thread Starter idigmarketing

    (@idigmarketing)

    Just did a line item export but not seeing the gift card codes… or anything stating Gift Card… not sure I’ve got this working right… I used Order Line title which did output all the line items in the order but no sign of gift cards – https://imgur.com/a/mQV7BSD

    Really hoping there is a simple way to see how many gift cards have been used by each store per month

    • This reply was modified 3 years, 11 months ago by idigmarketing.
    Plugin Author pimwick

    (@pimwick)

    I’m unfamiliar with the export plugin, we don’t provide a field called “Pw Gift Card Debited” so I’m not sure where this is being found.

    Contact the developer for the export plugin and let them know the data you are looking for is stored here:

    wp_woocommerce_order_items

    The order_item_type is ‘pw_gift_card’. For example, this will show you all of the order IDs that have redeemed a gift card:

    SELECT * FROM wp_woocommerce_order_items WHERE order_item_type = 'pw_gift_card'

    Hope this helps!

    Thread Starter idigmarketing

    (@idigmarketing)

    this must work totally different in WP multisite as I can’t even find that table wp_woocommerce_order_items … I have a pimwick gift card activity and pimwick gift card

    You guys had me add this my wp-config file:

    define( ‘PWGC_MULTISITE_SHARED_DATABASE’, true );

    /* That’s all, stop editing! Happy blogging. */

    I presume that might have adjusted where things might be… I see activity in wp_pimwick_gift_card_activity table but it actually doesn’t show the gift card # so its hard to trace back… shows order id but not which store the order was for… so pretty impossible to read.

    Plugin Author pimwick

    (@pimwick)

    First, understand that “wp_” is the default prefix and will be different for a multi-site installation. So anywhere below that you see “wp_” you may need to replace with your site’s prefix.

    This table (on your main site) contains the gift card number, expiration date, etc:

    wp_pimwick_gift_card

    When a transaction occurs (a credit or debit) then a record is placed here:

    wp_pimwick_gift_card_activity

    There is a note on this activity that shows you the order that was used for the credit/debit or the note may be whatever you enter during a manual adjustment.

    With that said, both of these tables store only the gift card information and are not part of WooCommerce directly. They do not contain order information (other than the human-readable information stored in the Note on the activity record).

    You should not use these tables if you are looking for WooCommerce Orders that have used gift cards.

    Instead, here is a crash course in how WooCommerce stores it’s Order information:

    wp_posts - contains the Order data.
    wp_postmeta - contains the Order meta data.
    wp_woocommerce_order_items - contains the order line items.
    wp_woocommerce_order_itemmeta - additional meta information for the order line items.

    Your export plugin author should know about the WooCommerce tables (if it’s compatible with WooCommerce) and will be able to tell you how to extract the data from the wp_woocommerce_order_items table.

    When a PW Gift Card is redeemed it will be an Order Line Item in the wp_woocommerce_order_items table.

    Hope this clarification helps!

    Thread Starter idigmarketing

    (@idigmarketing)

    Yes I did find them in those tables. I’m able to do a search in wp_woocommerce_order_items and can find them… question is how to actually export that using WP all export or anything else… bit tricky to find them in the wp all export plugin but perhaps I’ll have to ask that plugin author as you suggest…

    Plugin Author pimwick

    (@pimwick)

    Hope you had luck with the export plugin, I’m marking this thread as closed however if you need further help just let us know!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Reporting’ is closed to new replies.