Customize XML feed for variations

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #105608
    blankMichael
    Guest

    Hello

    Can this plugin or the pro version create the following XML scenario?

    We want the XML file to have every variation of the product as seperate product listing.

    For example.

    We have a variable product with

    SKU 111

    and has

    3 Variations

    Color Blue, Size 01, SKU 11101
    Color Blue, Size 02, SKU 11102
    Color Blue, Size 03, SKU 11103

    We want each variation to show in the xml as different product.

    Now the XML version shows only the parent product with the SKU 111 and the shortcode available_variations shows the available variations.

    But we want to treat every variation as different product in xml so that the XML file will have

    11101
    111

    [alg_product_title]
    [alg_product_formatted_name]
    [alg_product_url]
    [alg_product_type]
    [alg_product_price]

    Etc.

    Is this possible? In free or paid version.

    We want this badly.

    Thank you.

    • This topic was modified 10 months, 2 weeks ago by blankOmar Dabbas.
    #105609
    blankMichael
    Guest

    VariationSku: 11101
    ParentSku: 111

    [alg_product_title]
    [alg_product_formatted_name]
    [alg_product_url]
    [alg_product_type]
    [alg_product_price]

    #105610
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi Michael,

    Yes, that is possible. What you need is “Variable products” option in each feed’s settings (i.e. “WooCommerce > Settings > Product XML Feeds > XML Feed #X > Products Filtering Options”). By default it is set to “Variable product only” and for your task you should set it to “Variation products only” (or maybe to “Both variable and variations products” if you want both parent and child products listed).

    Hope that helps. Please let me know if you have any more questions.

    #105611
    blankMichael
    Guest

    Something is wrong.

    I leave all the settings by default and enable only

    Variable products > Variation products only

    and from

    Categories to include > I select one category that has variable products

    but the feed is empty.

    If i choose a category with simple products the feed return results but this is not how is suppose to work right?

    #105612
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi Michael,

    I’ve just rechecked and you are correct – the problem is that variations don’t really have a category (only their parent variable product has a category), so when filtering products by category, variations are skipped. Already fixing this. Will get back to you as soon as possible.

    #105613
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi Michael,

    As promised, we’ve released new plugin version 1.4.4 today. After the update, you will find new “Query post type” option in each feed’s settings (in “WooCommerce > Settings > Product XML Feeds > XML Feed #X > Advanced Options”). Please set it to “Products only” – this should solve the issue with variations filtering by product’s category.

    The reason why we have added this as an option (and didn’t just make it the default behavior) is that in this case XML creation is a little bit slower (as we need to check every variation of a variable product manually). Anyway please try it out, the difference in time should be minimal.

    Please let me know if something is not working as expected. And if you like the plugin, please consider leaving us a rating.

    #105614
    blankMichael
    Guest

    Yes thank you.

    Now it seems to work. I will try to produce the right xml config that we want to see if it’s possible with your plug-in.

    For the SKU the default one now is bringing the products variation SKU that we want alright but there is no shortcode to also bring the parent SKU.

    We want something like that

    alg_product_title alg_product_sku alg_product_sku_parent

    etc.

    Will we have to create a custom shortcode for that or it is in the codebase?

    Thank you again

    #105615
    blankMichael
    Guest

    I mean something like that.

    [item]
    [alg_product_title] Product Name
    [alg_product_sku] Variation SKU
    [alg_product_sku_parent] Parent SKU
    [etc]
    [item]

    Thank you

    #105616
    blankMichael
    Guest

    Hello.

    Sorry to bother you again.

    I’m still testing the new update.

    Like i said before now it works but the following shortcode

    [alg_product_stock_quantity]

    does not bring the stock quantity for each variation.

    I think this shortcode gets the parent stock quantity but now that we want to display each individual variations the stock quantity is not working with this shortcode.

    Thank you.

    #105617
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi Michael,

    Sorry for a late reply.

    1. Parent SKU – that’s easy, you just need to add use_parent_id="yes" attribute to the shortcode, i.e.:

    [alg_product_sku] – variation’s SKU,
    [alg_product_sku use_parent_id="yes"] – parent’s (i.e. variable product’s) SKU.

    2. [alg_product_stock_quantity] – this one seems to be working fine on my test server, i.e. it brings variation’s stock, as it should. The only thing that I have noticed – if you haven’t set stock for variation, the shortcode will try to get the stock for the parent (in case if you have set it for the parent). And as with any other shortcode, you can also use use_parent_id="yes" attribute. Could you please recheck it once again. If it’s still not working as expected – maybe it’s possible for me to log in to your site’s admin to check it out? My private email is [email protected].

    #105618
    blankMichael
    Guest

    Sorry i re checked it.

    You are right, we were having problem with the staging test environment and our stock.

    I will keep testing.

    Thank you.

    #105619
    blankTom Anbinder
    Moderator
    Plugin Support

    Sure, no problem. Please let me know if you have any more questions.

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