I'm currently writing my first widget, and i'm having a little trouble with something.
I want to render a new button next to the buy button, in the productdetails_add_info zone.
However, I can't figure out how to get the product id in my controller class, PublicInfo.
[ChildActionOnly]
public ActionResult PublicInfo(string widgetZone, object additionalData = null)
{
var product = _productService.GetProductById();
var computerConfigureSettings = _settingService.LoadSetting<ComputerConfigureSettings>(_storeContext.CurrentStore.Id);
var model = new PublicInfoModel();
model.ProductId = product.Id;
return View("~/Plugins/Widgets.ComputerConfigure/Views/WidgetsComputerConfigure/PublicInfo.cshtml", model);
}
Any help is appreciated :)