• Resolved kallekid

    (@kallekid)


    If i Try to set an Attribute rule(in the Attribute mapper) then it is not possible to set the assigned value as an individual product field.

    Example:

    I have many product with an individual product attribute.(individual product attributes can be found, when turning on “individual fields” in the “customize view” setting of a product) This attribute is called example_attribute. When i go into the attribute mapper and try to create an attribute rule for “GTIN” and I try to set the value as “example_attribute”. It is not possible because the plugin doesn’t recognize the individual field as a selectable value.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi there,

    Thanks for reaching out to Woo Support!

    I have many product with an individual product attribute.(individual product attributes can be found, when turning on “individual fields” in the “customize view” setting of a product) This attribute is called example_attribute. When i go into the attribute mapper and try to create an attribute rule for “GTIN” and I try to set the value as “example_attribute”. It is not possible because the plugin doesn’t recognize the individual field as a selectable value.

    I understand you’re having trouble setting an attribute rule in the Attribute Mapper, specifically when trying to assign the value to an individual product field.

    The Attribute Mapper may not support direct mapping from individual product fields. However, you can try creating a custom field for your products and store the ‘example_attribute’ value there.

    Then, you should be able to map this custom field to the GTIN attribute in the Attribute Mapper.

    Please note that you’ll need to manually update this custom field every time the ‘example_attribute’ changes.

    Please try these steps and let us know how it goes.

    Thread Starter kallekid

    (@kallekid)

    Thanks for your help, but unfortunately that won’t be a viable option because I rely on the individual product field for multiple tens of thousands of products which may change over short periods of time. Would an update of your plugin(integrating this option) be a possible solution to this problem or do you maybe have a different solution that would make it possible to run a store this size facing these issues?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello kallekid

    To understand your question in a better way, could please clarify a few points?

    When you say “Individual Product fields” do you mean the Custom Fields as shown in this screenshot?

    The Google Listings & Ads extension doesn’t support showing all the custom fields available in a shop when mapping attributes. But it can be enabled by adding a Filter to your site. For more details please check this guide: https://woo.com/document/google-listings-and-ads/attribute-mapping-use-cases/#mapping-custom-fields

    I hope this helps. ??

    Thread Starter kallekid

    (@kallekid)

    Hey @doublezed2, thank you for your help it way exactly what i was asking for, but i stumbled upon a new problem.

    I had to use this code for multiple custom fields. These multiple custom fields are set to the same Target Attribute “GTIN” which means that one Target Attribute is set to multiple “Data Sources / Default Values” in the Attribute mapper.

    Example:
    The Target Attribute GTIN is set 4 times with the values xmpl_cstm_val_1, xmpl_cstm_val_2, xmpl_cstm_val_3, xmpl_cstm_val_4.

    I believe that the problem which I’m facing now is that while setting the product as 4 different values may be possible, it is only if I check them to not be nothing(or/aka. “NULL”)(would be great if it would be in general), because sometimes the products have xmpl_cstm_val_1 as the “GTIN” and no other value but the plugin also sets the value to xmpl_cstm_val_4 which isn’t defined and therefore “NULL”.

    Is there a code that would enable the checking for the plugin?

    Please ask if you have any further questions or needs of clarification.
    Thank you for your help!

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @kallekid

    Unfortunately, the Google Listings & Ads plugin doesn’t currently support checking if a custom field is NULL before setting it as a value. However, this is a great suggestion, and it would be great to have you add your ideas as a feature request, which is where developers look for future plugin features and improvements.

    In the meantime, you may consider using a conditional statement in your code to check if a custom field is NULL before setting it as a value. This would prevent the plugin from setting the value to a custom field that is not defined.

    If you are still having problems, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter kallekid

    (@kallekid)

    Thank you very much for your help. I have opend a feature request here.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Individual Product fields can’t be set as the Datasource of Target Attribute’ is closed to new replies.