انقطاع جزئي للخدمةshare-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
تم طرح السؤال منذ حوالي شهر
الإجابة المحددة
1

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

‏١٥ أكتوبر‏‏٩:٠١ ص‏111
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']"; }

‏١٨ نوفمبر‏‏١:٥٠ م‏111
Mohamed

isnt work

‏١٨ نوفمبر‏‏١:٥٠ م‏111
3

I see the same issue.

‏١٦ أكتوبر‏‏١١:٥٦ م‏111
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>
‏١٧ أكتوبر‏‏١٢:٢٣ ص‏111
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']

‏١٧ أكتوبر‏‏٢:٢٩ م‏111
Vessy

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

‏١٨ أكتوبر‏‏١٢:٤٣ ص‏111