• Resolved ianbee

    (@ianbee)


    Hi,

    I’m having trouble with Advanced Order Export and WPC Product Bundles for WooCommerce by WPClever – free version: When I export orders, I cannot see the individual products that were ordered within the products bundles. Instead, I am only able to see the name of the product bundle.

    So for example, if I export an order that has a product bundle in it titled “Box of 3 donuts”.. in which a customer ordered 3 donut flavours / products within the proudct bundle -> Vanilla donut x1 and Chocolate Donut x2. All I can see after exporting is the product bundle title “Box of 3 donuts”. I cannot see the actual indiviudal products / flavours that were ordered within the product bundle i.e Vanilla donut x1 & Chocolate Donut x2. Hope this makes sense.

    I’ve tried many things to fix this issue but nothing has worked for me so far – I’ve tried adding every possible item meta in both “Products” and “Product Items” to reveal the indiviudal products within the product bundles. I’ve also tried adding the customn meta key “_woosb_ids”. Which came close – it gives me the product ID #’s for the indivudal products within bundles, but not the actual product names.

    Any help with this would be greatly appreciated. I’m hoping there’s an easy fix, as the issue seems to be so close to being fixed with the “_woosb_ids” key. I’m really hoping to be able to see the individual products that were ordered within product bundles with the product bundle plugin by WPClever & this plugin – Advanced Order Export.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    Please, visit >WooCommerce>Orders, edit one order and check section “items”.
    Do you see nested items?
    Look at my screenshot https://imgur.com/cizKNbL

    thanks, Alex

    Plugin Author algol.plus

    (@algolplus)

    hi

    please, open >WPClever>Product Bundles>Settings and share the screenshot

    • This reply was modified 3 years, 5 months ago by algol.plus.
    Thread Starter ianbee

    (@ianbee)

    Thanks for the reply.

    Yes, I see nested items:
    https://i.imgur.com/qfJt0Pc.jpeg

    Here’s a screenshot of my WPClever Product Bundles plugin settings (zoom in to see better):
    https://i.imgur.com/yLdHwX2.jpeg

    Plugin Author algol.plus

    (@algolplus)

    I have same WPClever Product Bundles plugin settings ??

    Could you upload your settings here as new ticket to https://algolplus.freshdesk.com/ ?

    Use >WooCommerce>Export Orders>Tools to get them.

    Plugin Author algol.plus

    (@algolplus)

    Did you set filters in section “Filter by products” ?

    Please, mark “Export all products from the order” (inside this section too).
    Will you see other order items ?

    Thread Starter ianbee

    (@ianbee)

    Hi,

    Turning on “Export all products from the order” worked but it also creates a bigger issue – when turned on, it completely ignores product category filters.

    So for example, I have 4 product categories:
    1. Pre-Orders June
    2. Pre-Orders July
    3. Pre-Orders August
    4. Pre-Orders September

    When exporting June orders, I set the product category filter in “filter by product” to “Pre-Orders June”. And when “Export all products from the order” is unchecked, the export works properly and only exports products within the specified “Pre-Orders June” product category.

    However, when “Export all products from the order” is checked, the export now includes products from all other unwanted product categories – Pre-Orders July, Augst, September etc… even though the product category filter is set to June.

    Hope this makes sense. In short – turning on “Export all products from the order” allows me to see the products within the product bundles, but it also ignores the product category filter that i have set and thus includes unwanted / unspecified products in the order export.

    Plugin Author algol.plus

    (@algolplus)

    so nested items belong to another categories ( not 1-2-3-4 in your case) ?
    I’ll try to figure solution later today or tomorrow

    Plugin Author algol.plus

    (@algolplus)

    please, add following code to section “Misc Settings”

    option “Export all products from the order” must be ON.

    add_filter('woe_settings_validate_defaults', function ($settings) {
    global $wpdb, $woe_bundle_ids;
    $woe_bundle_ids = $wpdb->get_col( WC_Order_Export_Data_Extractor::sql_get_product_ids( $settings ) );
    return $settings;
    } );
    
    add_filter( 'woe_skip_order_item', function($skip, $product, $item, $item_meta, $post ) {
    global $woe_bundle_ids;
    //main product ?
    if( in_array($item->get_product_id(),$woe_bundle_ids) ) return false;
    //nested to bundle ?
    if( isset($item_meta["_woosb_parent_id"]) AND in_array($item_meta["_woosb_parent_id"][0],$woe_bundle_ids) )
    return false;
    // skip others
    return  true;
    },10,5);
    Thread Starter ianbee

    (@ianbee)

    This worked perfect! Thanks a lot.

    And just to clarify, the issue wasn’t that there were nested items in the bundle that belonged to different product categories, the issue was that there were more than one product bundle in some orders, each belonging to different product categories.

    So for example, a customer has two product bundles in their one order – first bundle is from product category 1, and the second bundle in their order is from product category 2. When “Export all products from the order” was turned on and the product category filter was set to product category 1, instead of exporting the bundle from just product category 1, it would also export the other bundle in their order from product category 2.

    None the less your code fixed my issue ??

    Thanks a lot!

    Plugin Author algol.plus

    (@algolplus)

    Yes, I reproduced exactly same situation on my server ??

    You’re very welcome.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cannot See Individual Products Within Product Bundles (WPClever)’ is closed to new replies.