1. Add it in metadata (in MetadataDefintion.xml, locate basket entity and add the following)
<PropertyMapping property="MyCustomProp" csProperty="MyCustomProp "/>
...
<Property name="MyCustomProp" dataType="String" isStronglyTyped="false" />
2. Set model property, for example, in the shoppingcontroller.cs
In AddBasketLineItemCreateRequest function, add the following after the last line of this function.
builder.Model.Properties[" MyCustomProp"] = "value";
Then when you add item to your basket, this MyCustomProp is available in basket pipeline.
You probably want to add the same to other type of requests, such as AddBasketLineItemUpdateRequest , AddBasketLineItemDeleteRequest , etc. based on your business need.
3. access it in Pipeline through order dictionary indexer
orderDictionary["MyCustomProp" ]
<PropertyMapping property="MyCustomProp" csProperty="MyCustomProp "/>
...
<Property name="MyCustomProp" dataType="String" isStronglyTyped="false" />
2. Set model property, for example, in the shoppingcontroller.cs
In AddBasketLineItemCreateRequest function, add the following after the last line of this function.
builder.Model.Properties["
Then when you add item to your basket, this MyCustomProp is available in basket pipeline.
You probably want to add the same to other type of requests, such as AddBasketLineItemUpdateRequest
3. access it in Pipeline through order dictionary indexer
orderDictionary["MyCustomProp"
No comments:
Post a Comment