I am trying to update a couple of fields within Extended Content against a product, this is a viewCount and likeCount which a customer can like a product or watch a video attached to a product after they have purchased the item. I am struggling to get this to work I can access iProduct Content to read the current viewCount and likeCount values but am unable to Save the updated values back to the Product.
Can anyone point me in the right direction please?
Extended Content Updating
I am trying to update a couple of fields within Extended Content against a product, this is a viewCount and likeCount which a customer can like a product or watch a video attached to a product after they have purchased the item. I am struggling to get this to work I can access iProduct Content to read the current viewCount and likeCount values but am unable to Save the updated values back to the Product.
Can anyone point me in the right direction please?
Hi Gary,
You should get the product with the product service.
You can get the product multiple ways, but in my example I use a SKU.
Then you can iterate through the detached contents (these are the extended content, and each detached content is 1 language).
After you're done adding/updating the value, you need to save the product.
I hope this helps :)
//Puck
Thank you, I shall give this a try later, and let you know how I get on.
Thanks Again
By the way, this is the productvariantservice, you also have the productservice.
Maybe you need that one ;)
//Puck
I did need the ProductService in the end, but that worked a treat, many thanks for your help.
Gary
Good to hear!
No problem ;)
is working on a reply...