Hello, I'm pretty new to Nop and i've a problem.
I add a Custom Attribute to customer address through the dedicated form.
Now I would show Address Custom Attributes in Checkout Summary and add them in Order emails.
How can I do this?
I changed
/Themes/<mytheme>/Views/CheckOut/ShippingAddress.cshtml
and
/Themes/<mytheme>/Views/CheckOut/BillingAddress.cshtml
adding this code
@if (item.CustomAddressAttributes.Count > 0){
foreach(var attr in item.CustomAddressAttributes) {
<div class="custom">
@attr.Name: @attr.DefaultValue
</div>
}
}
and changed
/Themes/<mytheme>/Views/ShoppingCart/_OrderReviewData.cshtml
adding this code
@if (Model.BillingAddress.CustomAddressAttributes.Count > 0){
foreach(var attr in Model.BillingAddress.CustomAddressAttributes) {
<div class="custom">
@attr.Name: @attr.DefaultValue
</div>
}
}
and
@if (Model.ShippingAddress.CustomAddressAttributes.Count > 0){
foreach(var attr in Model.ShippingAddress.CustomAddressAttributes) {
<div class="custom">
@attr.Name: @attr.DefaultValue
</div>
}
}
but it seems that custom attributes are not loaded in theese views.
Any idea or suggests?
Thank you in advance
Stefano