Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm needing to add a few properties along with a product.
They have no price associated with them and aren't nodes in Umbraco with a price, so don't think I can add them as a bundle.
Reading this, i can add properties to an Order
But not sure how to programmatically add properties to a product/order line?
These product properties are configured on the front end and just needed adding to the product in the basket as reference.
I have so far:
public ActionResult AddToCart(AddToCartDto postModel)
using (var uow = _unitOfWorkProvider.Create())
var store = CurrentPage.GetStore();
var order = _sessionManager.GetOrCreateCurrentOrder(store.Id)
//add product properties to product <-----
ModelState.AddModelError("productReference", "Failed to add product to cart");
TempData["addedProductReference"] = postModel.ProductReference;
In TC I think we could add them as hidden inputs, is this still the case in Vendr? Or best to add it via ActionResult form post?
There is another AddProduct method that also supports A dictionary of properties to add to the order line.
Hope this helps
Brilliant, thanks Matt!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted