Indisponibilidade parcialshare-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
Enviada há cerca de um mês
Resposta selecionada
1

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

15 de outubro às 09:01
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']"; }

18 de novembro às 13:50
Mohamed

isnt work

18 de novembro às 13:50
3

I see the same issue.

16 de outubro às 23:56
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>
17 de outubro às 00:23
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']

17 de outubro às 14:29
Vessy

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

18 de outubro às 00:43