Hi, i have created a controller in order to punchout for personalisation.
I Have placed this code in the ShoppingCartController :
Extensions.PunchOut punchOut = new Extensions.PunchOut();
bool isPunchOut = true;
string id = productVariant.Sku; // this is the sku
string ticketId = null;
if (isPunchOut)
{
ticketId = punchOut.CreatePunchOutReference(id,Url,Request);
// save the reference from punch out into a custom attribute
// which is saved in the basket item
var attribute = new ProductVariantAttribute();
int punchOutAttributeId;
Int32.TryParse(ConfigurationManager.AppSettings["PunchOutAttributeId"], out punchOutAttributeId);
attribute.Id = punchOutAttributeId;
// add this to the product attributes
attributes = _productAttributeParser.AddProductAttribute(selectedAttributes,
attribute, ticketId);
}
//save item
var cartType = (ShoppingCartType)shoppingCartTypeId;
addToCartWarnings.AddRange(_shoppingCartService.AddToCart(_workContext.CurrentCustomer,
productVariant, cartType, attributes, customerEnteredPriceConverted, quantity, true));
................................................................................................
i wish to link this controller to a personalize button that i have created.
I am new to MVC so i do not quite understand linking views to controllers.
Many thanks