• Resolved juliashih

    (@juliashih)


    Dear support team,

    So far we believe this app is the most suitable one for us to create the FB catalog automatically. However, there are a few issues that we need your assistance to fix it.

    I had set the description like this:
    Fill with a static value 雅緻窗簾捲簾精選商品 if Product Descriptionis empty
    Product Description for all other products
    However, FB still notify us a report of “Products need to have descriptions to run in ads. Include a description for each product in your data feed file and upload it again.”

    And we had set the price like this:
    Combine source fields Regular Price& space& WooCommerce Currency for all products
    and change values overwrite to 0 if Regular Price is empty
    and change nothing for all other products.
    But we still got a report of “Products need to have prices to run in ads. Include a price for each product in your data feed file and upload it again. Prices must include cost and an ISO currency code (for example: 10 USD instead of $10 for American dollars).”

    Therefore, we’re not sure which part that it went wrong.
    Could you please help us to look into this issue? Thank you in advance!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi @juliashih,

    First question that comes to my mind is, if you open the feed does it contain the set product descriptions and the prices? Or are they indeed missing from the feed?

    Maybe you can share the link to the feed?

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed ,

    Thank you for your reply.
    Yes, the product descriptions and the prices are included in the feed.
    Please check on this link: https://blindsandcurtainsdirect.com/tw/wp-content/uploads/wppfm-feeds/BCD-Test-2.xml

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Well, Facebook is correct. Many products in your feed do not have a description and there are a lot of products without prices in your feed.

    As far as I can see, for both the description as well as the price, only the static values are included in the feed. So this means that for the products that do have a description and/or a price, these are not coming through.

    Just to test things out, could you turn the filters around so they read:
    Fill with Product Description if Product Description is not empty and a static value 雅緻窗簾捲簾精選商品 for all other products.

    And do that for the prices as well.

    Let me know what the result is.

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed

    Thank you for your reply.
    I’ve modified the setting as your advice.
    It looks like it works now! Thank you.
    Since I’m not that familiar with Facebook catalog yet, to be confirmed, could you please check it on your side for us too?

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello @juliashih,

    I’m not an expert on Facebook specifications, but you can find more details about them here: https://www.facebook.com/business/help/120325381656392?id=725943027795860

    As far as I can see all data is now included in the feed, but you’re having a lot of links and html code in your description. According to the specifications that is not allowed. (https://www.facebook.com/business/help/2302017289821154?id=725943027795860)

    That is also the problem why the filter did not work the other way around. The filter filtered out the descriptions that had html code in it.

    So you probably need to make sure both the links as well as the html code are not in the feed or else Facebook will not accept it.

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed

    Many thanks for your awesome assistance and suggestion!
    I will look into that.

    Have a nice day!

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed ,

    Sorry to bother again.
    I’ve been trying to get rid of the html in the product description but failed.

    In PHP, I heard that we can use strip_tags function to remove HTML tags from product description. By any chance you could help me with this?

    Thank you in advance!

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    No problem @juliashih,

    You could use the wppfm_feed_item_value filter build in our plugin to use the strip_tags function on the description.

    Information about the wppfm_feed_item_value filter can be found here: https://gist.github.com/Auke1810/c62bb043926f539f9a99b418c06a3e6e

    If?you’re not familiar with using filters in your wp-admin, the best?and easiest way to do this is by using a plugin like “Code Snippets” (https://www.ads-software.com/plugins/code-snippets/).?And here you can find a great video explaining the use if this plugin https://www.youtube.com/watch?v=I1_ZqnQmwJs.

    Let me know if that worked.

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed ,

    Thank you for your reply.
    I had installed “Code Snippets” and add the code as below,
    “function alter_feed_item( $attributes, $feed_id, $product_id ) {

    // The $attributes variable is an array that contains all the product data that goes into the feed. Each item
    // can be accessed by it’s feed key. So if in the feed file an item has a key like ‘description’, you
    // can access that specific item by $attributes[‘description’].
    // The $feed_id (string) makes it possible to only edit a specific feed. You can find the id of a feed in the
    // url of the Feed Editor, right after id=.
    // The $product_id (string) makes it possible to select a specific product id that you want to filter.

    // The following example only changes the data of a feed with ID 7
    if( $feed_id === ‘7’ ) {

    // this line changes the title data and removes the ” <prompt> ” string
    $attributes[‘title’] = str_replace( ” <prompt> “, “”, $attributes[‘title’] );

    // this lines puts the text Dollar behind the price data
    $attributes[‘price’] = $attributes[‘price’] . ” Dollar”;

    // And you can be more specific by using the $product_id
    if ( $product_id === ’13’ ) {
    $attributes[‘availability’] = ‘unknown’;
    }
    }

    // or you can just make a simple change that will influence all feeds
    // If you have shortcodes in your product description you can remove them with het next code
    // Remove WordPress shortcodes from Description
    $attributes[‘description’] = strip_shortcodes( $attributes[‘description’] );

    // If you use Visual Composer markup in your product descrioptions you can remove Visual Composer markup with the next code.
    $attributes[‘description’] = preg_replace(“/\[(\/*)?vc_(.*?)\]/”, ”, $attributes[‘description’] );

    // To remove Divi markup in your product description use the below preg replace.
    $attributes[‘description’] = preg_replace(“/\[\/?et_pb.*?\]/”, ”, $attributes[‘description’] );

    // IMPORTANT! Always return the $attributes
    return $attributes;
    }

    add_filter( ‘wppfm_feed_item_value’, ‘alter_feed_item’, 10, 3 );”

    However, the product description still shows the html on catalog.
    Could you please check for us if there is any mistake of the code we use?
    Many thanks in advance!

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello @juliashih,

    Well, the code on the link is only informational and not intended to be used as is!

    In your case you should use something like:

    function alter_feed_item( $attributes, $feed_id, $product_id ) {
    	// Remove html and php code from Description
    	$attributes['description'] = strip_tags( $attributes['description'] );
    	
    	// IMPORTANT! Always return the $attributes
    	return $attributes;
    }
    
    add_filter( 'wppfm_feed_item_value', 'alter_feed_item', 10, 3 );

    That should remove all html and php code from the description of all your feeds. If you only want to remove it from a specific feed let me know.

    Also, after adding this code snippet and regenerating your feed, make sure to open the feed and press CNTL-F5 to refresh the browser. It sometimes happens that you don’t see the changes because the feed has been cached and you’re looking at an old version of it.

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed ,

    Thank you for your explanation.
    Could you please help us to look into which part went wrong since now the catalog had been uploading for an hour and still not done yet. It used to take only about 3 minutes.
    Here is the screenshot of our “Code Snippets” setting shared from dropbox:
    https://1drv.ms/u/s!AlyTcFbklpT6pAuGY7f_BZqa1pe4?e=dX3CPw
    Also the link of product catalog:
    https://blindsandcurtainsdirect.com/tw/wp-content/uploads/wppfm-feeds/BCD-Test-2.xml

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    The product catalog looks ok to me now. But I’m not sure if Facebook minds the   code. If they complain about that, let me know.

    When your feed gets stuck the best way to proceed is to open the Feed Manager -> Settings page, click the “Clear feed process” button and then try to regenerate the feed again.

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed ,

    Thank you for the suggestion. We’d cleared feed process as you suggested but somehow it’s still uploading for no ending. However, I refreshed the page and saw that the html is not in the description anymore, so I guess we can ignore the problem of not being able to finished uploading?

    There is another question, we also have all the additional images for all the products on the website, so we wonder if it’s possible that we can upload additional images to Facebook catalog?

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello @juliashih,

    After using the “Clear feed process” button, be sure to re-generate the feed again. It will not do that by itself.

    Should the feeds still keep failing, have a look at these steps: https://www.wpmarketingrobot.com/support/faq/#toggle-id-17 (always start from step one, even though you already did the first steps).

    I don’t think adding the code to remove the html from the description has any influence on the feed process.

    As for the additional images, I’m not an expert on the Facebook attributes, but I do see a “additional_image_link” option in the “Optional attributes”, so I guess that that’s the one you’re looking for?

    Thread Starter juliashih

    (@juliashih)

    Hi @michel-jongbloed

    Thank you so much for the suggestion.
    I’ve tried these ways and the weird part of Facebook catalog is that it still… shows that it’s still uploading after a long while. However, when I refresh the page, it shows that it had finished uploading.
    I guess it’s not a big issue, but I just have to refresh the page to finish the uploading process.

    Furthermore, about the additional images, thank you so much for answering. It is exactly what I need! However, there is only one issue in the file. It shows that the last image of every product with no name, which should not even been showed at all.
    For example:
    <g:additional_image_link>https://blindsandcurtainsdirect.com/tw/wp-content/uploads/2020/07/Honeycomb_Clutch_Opaque_Ocher_iStock.jpg</g:additional_image_link&gt;
    <g:additional_image_link>https://blindsandcurtainsdirect.com/tw/wp-content/uploads/2020/07/OCHER_c1_720X720.jpg</g:additional_image_link&gt;
    <g:additional_image_link>https://blindsandcurtainsdirect.com/tw/wp-content/uploads/2020/07/OCHER_c_720X720.jpg</g:additional_image_link&gt;
    <g:additional_image_link>https://blindsandcurtainsdirect.com/tw/wp-content/uploads/2020/09/</g:additional_image_link&gt;

    Could you please help to look into this matter?

    Sorry to bother for so many times and really appreciate your excellent help!!!

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Need help with the FB catalog report issue’ is closed to new replies.