Accessing product info from within a widget

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi all,

We are writing a widget plugin that writes extra meta data in the Head tag, as part of some integration work we are doing.
When on the product detail page, I want to write extra meta data such as the product name and price.

I can get hold of the RoutingData and extract the Product ID, but how do I then use the ProductService to get hold of the product name, price etc.

The widget plugins appear to have access to the CategoryService, but not the ProductService.

Any help would be much appreciated as I'm relatively new to this area of nopCommerce.

Thanks,

Nick
11 years ago
Just add the productservice interface to the constructor of the widget controller and assign it to a private variable
11 years ago
Thanks - worked perfectly.

Regards,

Nick
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.