- Support forum for the Product XML Feeds for WooCommerce.
- This topic has 14 replies, 2 voices, and was last updated 1 year, 7 months ago by WPWhale.
-
AuthorPosts
-
January 9, 2023 at 4:52 pm #107281Olivier ERTLENParticipant
Hello,
How to use the category description in XML ?
Thank you very much.January 13, 2023 at 1:42 pm #107520Olivier ERTLENParticipantUP please
January 14, 2023 at 11:30 am #107578WPWhaleModeratorHi Olivier,
Sorry for the delay getting back to you, I was out of town for a week.
This is not possible using the plugin settings, because generally what is pulled to other marketplaces is product info, and not description of a category that the product belongs to.
If you have specific requirements for this feed from a merchant, please send them our way to see what we can do here, reach us at [email protected]
Omar
January 16, 2023 at 10:53 am #107671Olivier ERTLENParticipantHy Omar,
Thank you for your comeback.
The merchant makes mandatory the name of the category and an attached ID number.
The category ID number is defined and mandatory.
The category name is defined and required.
I had thought of using the category description to assign it this ID number.
Do you have a solution ?
Thank you so much.January 17, 2023 at 8:12 am #107720WPWhaleModeratorHi Olivier,
Sorry that wasn’t clear for me, so you were able to assign name & id successfully, but you want also to insert ID in the description? Or you still need help getting the category ID?
Omar
January 17, 2023 at 9:43 am #107722Olivier ERTLENParticipantHi Omar,
Sorry I’m French, my English is not perfect to explain well.
Yes, I can get the category name and id.
But the id must have a defined value and not generated by Woocommerce.
So I was thinking of using the category description instead.
The name of the category and the number are defined, imposed and mandatory by the sales platform which will retrieve the XML feed.
I need to send for example (category name and number):
– Agricultural tipper = 543
– Grape Bucket = 878
– Farm Tractor = 510Thank you so much.
January 24, 2023 at 12:48 pm #108142Olivier ERTLENParticipantHi Omar,
Do you have any idea for me to solve this problem “id”?
The goal is to add the information (a number) to each category that I would need to generate in the XML feed.Thank you so much
January 29, 2023 at 5:14 pm #108519Olivier ERTLENParticipantHi Omar,
Can you help me?
The solution is near.
I manage to retrieve the category description by forcing the ID in the shortcode.
With this function :
function productxml_func( $atts ) {
$a = shortcode_atts( array(‘id’ => ”, ), $atts );
$term = get_term_by(‘id’, $a[‘id’], ‘product_cat’);
return $term->description;
}
add_shortcode( ‘cat_description’, ‘productxml_func’ );
In XML feed :
[cat_description id=”254″]
It works but must be fixed.
You should be able to do
[cat_description id=”[alg_product_categories_ids]”]Thanks very much
January 30, 2023 at 9:52 am #108543Olivier ERTLENParticipantHi Omar,
You don’t have to be in a hurry with your support.
Anyway, the solution for me is simple.
If you modify the class-alg-products-shortcodes.php file by adding the function for the description of the categories, this is done in 5 minutes.
I think for my next client, I will turn to another XML feed extension.
CordiallyFebruary 15, 2023 at 8:26 am #109579WPWhaleModeratorHi Olivier,
I apologize for the delay, since this is not a standard need, we might not be able to include it as part of the plugin, as we’ve mentioned above, the shortcodes are generally built around products, but not category.
Your request was to include a number after description, that’s why we asked you to contact us through email to help you further, but we haven’t received any email from you.
P.S. doing this will take a little more than 5 minutes, as there many cases need to be handled (like multiple categories for a product?).
Again, feel free to reach us directly, and we will be glad to help you on this.
Omar
February 21, 2023 at 2:00 pm #109984Olivier ERTLENParticipantHi Omar,
I need to have the category description in the xml feed.
So I modified the class-alg-products-shortcodes.php file.
– I added a shortcode
– I added a function (like alg_product_categories_names example).
I manage to go up the description of the category.
The question are you going to add this feature in the next update?
Cordially,February 24, 2023 at 9:28 pm #110228WPWhaleModeratorHi Olivier,
Yes will do this and let you know when it’s released.
Omar
March 4, 2023 at 1:20 pm #110669WPWhaleModeratorHi again,
This was added to latest version 2.7.2 using shortcode:
[alg_product_category_description id={alg_product_categories_ids}]Please update and let me know if you need any further help.
Omar
March 5, 2023 at 3:14 pm #110711Olivier ERTLENParticipantHi Omar,
I get the category description fine with the new version, thanks you vry much.
Cordially,
OlivierMarch 5, 2023 at 5:20 pm #110719WPWhaleModeratorHey Olivier,
Happy to hear this. If you’re happy with the plugin & support, it would be great if you can leave us a review please:
https://wpfactory.com/item/product-xml-feeds-woocommerce/#tab-reviewsOmar
-
AuthorPosts
- You must be logged in to reply to this topic.