Using Dynamic attributes in product XML feeds

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #105600
    Radomir
    Guest

    Hello Tom,
    I reply to that question for “dynamic attributes”.
    Yes, I’d like to use them in your plugin too, but it seems not to working.

    What are dynamic attributes:
    I have two of them by WooCommerce products.
    The first one “Brand” was created from the “Perfect WooCommerce Brands” plugin. I use this plugin to define and assign Brands to my products.

    The second one was defined through standard WooCommerce menu Products/Attributes. When I create such new Attribute, other plugins show them as “dynamic attributes”.

    I tried to use both this “dynamic” attributes in product-xml-feeds plugin, but with no success.
    I used the alg_product_terms shortcode and the alg_product_meta shortcode, but they didn’t work.

    Thank you
    Radomir

    • This topic was modified 1 year, 6 months ago by Omar Dabbas.
    #105601
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Radomir,

    1. Brands – I’ve checked the “Perfect WooCommerce Brands” plugin and what you need is:

    [alg_product_terms taxonomy="pwb-brand"]

    2. Product attributes – if, for example, you have a product attribute with size slug, then what you need is:

    [alg_product_list_attribute name="size"]

    Hope that helps. Please let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving us a rating.

    #105602
    Radomír
    Guest

    Thank you very much Tom!
    It both works (brands, product attributes)!
    I used propabbly improper shortcode or improper taxonomy name.

    Can I have another question?
    Is it possible (ist there some shortcode) to ommit whole XML tag or even whole XML block, when is some attribute empty?
    Then would this plugin be perfect!

    But I know – such a feature is not so easy to implement, because it should work together with all other shortcodes.

    Such a
    [omit_if_empty_start][some_test_shortcode]
    some xml text and other shortcodes here
    [omit_if_empty_end]

    or
    [omit_if_empty_start test_shortcode=”some_test_shortcode”]
    some xml text and other shortcodes here
    [omit_if_empty_end]

    Thank you, Radomir

    #105603
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Radomir,

    Happy to hear it’s working.

    Regarding omitting empty tags – actually this is already possible. What you need to do is to add before and after attributes to the shortcodes. These attributes are available in all plugin’s shortcodes. So instead of the standard:

    <brands>[alg_product_terms taxonomy="pwb-brand"]</brands>

    you need to add:

    [alg_product_terms taxonomy="pwb-brand" before="<brands>" after="</brands>"]

    This way the tag will be omitted in case if the resulting value is empty.

    #105604
    Radomir
    Guest

    Thank you Tom,
    this is little bit tricky to ommit whole xml tag with before and after – but perfect.
    May be, you can describe this usecase on yours plugin page for others too.
    I am really amazed, what I can do with your plugin!
    Radomir

    #105605
    Tom Anbinder
    Moderator
    Plugin Support

    Happy to help 🙂

    As for description – I agree, we need to expand the documentation, will do that as soon as possible. There is short description of all common (i.e. global) shortcode attributes (including before and after) at the beginning of the Shortcodes section in description, but we definetely need to add more examples etc.

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