Partial Outageshare-external
Product Feed "internal_label" not working (XML)
2

Hi, I use the product feed as XML and would like to tag my articles with the ‘internal_label’. My feed looks like this: <g:internal_label>'Accessory','Gaming','Headset'</g:internal_label>

However, the individual values do not arrive correctly, but as a collected string. (see screenshot)

Does anyone have an idea how I should structure my XML?

Thanks and regards, Kristian

Kristian
Asked about a month ago
Selected Answer
1

I have the same problem. Did this internal_label work before? Is it something that happen recently?

October 15 at 9:01 AM
Vessy
Mohamed

i use this :

$product_tags = wp_get_post_terms( $id, 'product_tag', array( 'fields' => 'names' ) ); if ( ! empty( $product_tags ) && ! is_wp_error( $product_tags ) ) { $product_data['custom_label_1'] = implode( ', ', $product_tags );

// Préparer les étiquettes internes au format requis
$internal_labels = array_merge( array( 'tous le stock' ), $product_tags );
$internal_labels = array_map( function( $label ) {
    return "'" . trim( $label ) . "'"; // Ajout des guillemets simples
}, $internal_labels );
$product_data['internal_label'] = '[' . implode( ', ', $internal_labels ) . ']';

} else { // Si aucun tag, internal_label contient seulement "tous le stock" au format requis $product_data['internal_label'] = "['tous le stock']"; }

November 18 at 1:50 PM
Mohamed

isnt work

November 18 at 1:50 PM
3

I see the same issue.

October 16 at 11:56 PM
Jacob
Jacob

I figured it out. You have to make multiple tags to make it recognize all the values. And the stuff about single quotes are simply not true:

<item>
<g:internal_label>
<![CDATA[ egnition-sample-data ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ men ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ summer ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ vans ]]>
</g:internal_label>
</item>
October 17 at 12:23 AM
Vessy

According to facebook documentation, that's not true. I will try it now and will write back again.


Add internal labels to help filter items when you create product sets. For example, you could add a "summer" label to all items that are part of a summer promotion and then filter those items into a set. Internal labels are only visible to you.

Enclose each label in single quotes (') and separate multiple labels with commas (,). Don't include white space at the beginning or end of a label. Character limit: 5,000 labels per product and 110 characters per label.

Example: ['summer','trending']

October 17 at 2:29 PM
Vessy

@Jacob You were right. It worked that way even though it wasn't specified like that in the documentation. Thank you!

October 18 at 12:43 AM