• Resolved stephde123

    (@stephde123)


    Hi,

    I tried to include the product_detail attribute, but it didn’t work.
    The product_detail attribute is an repeatable attribute, but I only can add it once. Therefore I tried to make a comma-separated list and prepare it by filter/action correctly. That doesn’t work either.
    The expected output should be:

    <g:product_detail>
    <g:section_name>General</g:section_name>
    <g:attribute_name>Inngredients</g:attribute_name>
    <g:attribute_value>Aqua (Water)</g:attribute_value>
    </g:product_detail>

    But the output was:

    <g:product_detail>
    Array
    </g:product_detail>

    I suppose that the product_detail attribute is not supported as an repeatable field with child elements. Can you give me any workaround or fix for this?

    Best regards
    Stephan

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter stephde123

    (@stephde123)

    In addition: I used the wppfm_feed_item_value filter and my code explodes the coma-separated list and adds the data to the attributes list as you can see below:

    $array = [];
    foreach ( explode( ', ', $attributes['product_detail'] ) as $ingredient ) {
    	$array[] = [
    		'section_name'    => 'General',
    		'attribute_name'  => 'Ingredients',
    		'attribute_value' => trim( str_replace( '.', '', $ingredient ) ),
    	];
    }
    $attributes['product_detail'] = $array;
    return $attributes;
    • This reply was modified 4 years, 5 months ago by stephde123.
    • This reply was modified 4 years, 5 months ago by stephde123.
    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi @stephde123,

    I must have overlooked this attribute. I’ll start working on an update for this.

    Does your work-around using the wppfm_feed_item_value filter work? That would give me a bit more time to implement the update ??

    Thread Starter stephde123

    (@stephde123)

    Unfortunately not. I had to overwrite the method make_xml_string_row in wppfm-feed-processing-support.php which makes my solution not updateable.

    It works for now, but I can’t update the plugin at the moment, therefore it would be great if you can supply an official solution.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    For sure I will make an official solution, I was just asking to see how much priority I should give this issue. As you have a solution I can take a bit more time to make a formal update.

    What version are you using currently?

    Thread Starter stephde123

    (@stephde123)

    Yes sure. Take your time. Thanks.

    I’m using 1.24.0. Do you think I can easily update to 1.25.0 and overwrite the method again? Couldn’t find a changelog for 1.25.0

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    The changelog should be in the readme.txt. There was no code changed but the plugin has been tested on WooCommerce 4.6 (which should have been released yesterday).

    So no problem to update, but it’s also not an issue to stay on 1.24.0 if you want.

    I expect to have a fix before the end of this week.

    Thread Starter stephde123

    (@stephde123)

    Ok perfect. Then I wait for the update. Thanks for your efforts.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    @stephde123,

    Could you send me an email to michel @ wpmarketingrobot.com? This would give me the opportunity to send you the update and explain how to use it, so you can try it out.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi @stephde123,

    I did send you the update last week. Can you confirm it solved the issue and we can close your topic?

    Thread Starter stephde123

    (@stephde123)

    Yes it worked. Thanks a lot for your support.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    You’re welcome @stephde123.

    Have a nice day.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘product_detail attribute’ is closed to new replies.