Hello
I am creating a custom Quotes Flow, within a specific OrderContext, totally separate from the Shopping Cart flow.
In the process of development, I noticed a couple of improvements and fixes to do in Rapido, to ease the Quotes implementation and reduce the need for custom files and helpers.
1) Add the OrderContext var in some key files:
- \Designs\Rapido\eCom7\CartV2\Step\Blocks\ReviewOrder.cshtml - pass it to the data-json-feed
@helper RenderReviewOrder() { <div class="grid__col-12"> <div class="js-handlebars-root" id="Cart" data-template="CartContent" data-cart-id="@CartFeedPageId" data-json-feed="/Default.aspx?ID=@CartFeedPageId&OrderContext=@GetString("Ecom:OrderContext.ID")" data-preloader="overlay"></div> </div> }
- \Designs\Rapido\Json\eCom7\CartV2\Step\Cart.cshtml - declare it as public string
public string OrderContextId { get; set; } var cartOrderContext = HttpContext.Current.Request.QueryString.Get("OrderContext"); cartOrderLine.OrderContextId = !String.IsNullOrEmpty(cartOrderContext) ? cartOrderContext : String.Empty;
- \Designs\Rapido\js\source\Cart.js
- I created a separate QuotesCart method to prevent upgradability issues, but, that might not unnecessary, if the "&OrderContext" is included in Cart.js methods.
I also noticed, in the latest Rapido version, there are two issues in Quotes flow:
1) when we edit the quotes cart, it changes the products in the Cart, and vice-versa - due to not passing the OrderContext
2) Dynamicweb.Ecommerce.Common.Context.Cart.IsQuote returns false when we are in Quote context - see image attached, please
I tested it both in Rapido, and in my application - where I am using the OrderContext, but still returns false. That is why we see the Quantity input field.
Any chance these fixes will be in place anywhere soon?