Top WooCommerce & WordPress Plugins › Forums › Product XML Feeds for WooCommerce › Customize XML feed for variations
- Support forum for the Product XML Feeds for WooCommerce.
- This topic has 11 replies, 2 voices, and was last updated 4 years, 8 months ago by
Tom Anbinder.
- AuthorPosts
-
April 4, 2019 at 9:22 am #105608
Michael
GuestHello
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 11103We 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 6 months, 4 weeks ago by
Omar.
April 4, 2019 at 9:23 am #105609Michael
GuestVariationSku: 11101
ParentSku: 111[alg_product_title]
[alg_product_formatted_name]
[alg_product_url]
[alg_product_type]
[alg_product_price]April 4, 2019 at 1:31 pm #105610Hi 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.
April 4, 2019 at 1:49 pm #105611Michael
GuestSomething 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?
April 4, 2019 at 6:10 pm #105612Hi 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.
April 5, 2019 at 8:36 pm #105613Hi 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.
April 6, 2019 at 11:47 am #105614Michael
GuestYes 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
April 6, 2019 at 11:50 am #105615Michael
GuestI 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
April 8, 2019 at 2:35 pm #105616Michael
GuestHello.
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.
April 8, 2019 at 2:55 pm #105617Hi 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 useuse_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].April 9, 2019 at 8:39 am #105618Michael
GuestSorry 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.
April 9, 2019 at 12:42 pm #105619Sure, no problem. Please let me know if you have any more questions.
- This topic was modified 6 months, 4 weeks ago by
- AuthorPosts
- You must be logged in to reply to this topic.