Use category description in XML

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #107281
    Olivier ERTLEN
    Participant

    Hello,
    How to use the category description in XML ?
    Thank you very much.

    #107520
    Olivier ERTLEN
    Participant

    UP please

    #107578
    WPWhale
    Moderator

    Hi 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

    #107671
    Olivier ERTLEN
    Participant

    Hy 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.

    #107720
    WPWhale
    Moderator

    Hi 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

    #107722
    Olivier ERTLEN
    Participant

    Hi 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 = 510

    Thank you so much.

    #108142
    Olivier ERTLEN
    Participant

    Hi 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

    #108519
    Olivier ERTLEN
    Participant

    Hi 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

    #108543
    Olivier ERTLEN
    Participant

    Hi 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.
    Cordially

    #109579
    WPWhale
    Moderator

    Hi 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

    #109984
    Olivier ERTLEN
    Participant

    Hi 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,

    #110228
    WPWhale
    Moderator

    Hi Olivier,

    Yes will do this and let you know when it’s released.

    Omar

    #110669
    WPWhale
    Moderator

    Hi 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

    #110711
    Olivier ERTLEN
    Participant

    Hi Omar,
    I get the category description fine with the new version, thanks you vry much.
    Cordially,
    Olivier

    #110719
    WPWhale
    Moderator

    Hey 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-reviews

    Omar

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