Extending the feed for WooCommerce for PureClarity
-
We are using the Woodmart theme and Woocommerce. We are using Pureclarity as a third party to show products that customers recently viewed, and we need to show a section called “complete the look” like the one on https://www.farfetch.com/in/shopping/women/alexander-wang-dahlia-crystal-embellished-105mm-sandals-item-18775128.aspx?storeid=13537
We’ve contacted the Pureclarity team to ask them to add that section on our website and to show the brand link before the product title on the products grid view that they provided, but they said, “Regarding “Complete the look,” we attempt to show this on the product page where data is provided for this in the feed. As this is not standard WooCommerce functionality, you would need to extend the feed and set the Related Products array to have the Skus required. I have provided links to documentation on achieving this below:
Extending the feed for WooCommerce:https://intercom.help/pureclarity-academy/en/articles/5485286-woocommerce-extending-the-feed
Related Products in the feed: https://pureclarity.stoplight.io/docs/bespoke-docs/ad73bd8bcd36c-product-feed-model
On our single product page, we want to show the Pureclarity “Complete the look: section on: https://coveti.com/product/cashmere-silk-turtleneck-2/ We added the hook on the function.php child theme but it is not working. Any help would be appreciated.
* @param mixed[] $data – the array of data that will be sent to PureClarity
* @param WC_Product $product – the WooCommerce product object
* @return mixed
*/
function product_callback($data, $product) {
$data[‘MyCustomField’] = ‘woodmart_product_brands_links’;
return $data;
}
add_filter( ‘pureclarity_feed_get_product_data’, ‘product_callback’, 10, 2 );`
The page I need help with: [log in to see the link]
- The topic ‘Extending the feed for WooCommerce for PureClarity’ is closed to new replies.