troubleshooting Question

Problem writing data from textbox to new field in Order table in NopCommerce 2.65

Avatar of homeshopper
homeshopperFlag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingC#E-CommerceMicrosoft DevelopmentProgramming
4 Comments1 Solution719 ViewsLast Modified:
I am trying to write data from a textbox as below to a newly created field in the Order table
of a sql server database. I am using NopCommerce 2.65
I am at the moment pullly my hair out trying to find an answer on the internet.
Nop.Web/Themes/CorpWear2/Views/ShoppingCart/OrderSummary.cshtml
Thanks in advance for any help given.
<textarea cols="20" rows="2" id="AdditionalInformation" name="AdditionalInformation">
@Session["AdditionalInformation"]</textarea>
The following code is what I have achieved by reading data from the Field and displaying
it on the OrderSummary.cshtml page.
1.Created Field: OrderEnquiry in Order Table
2.Nop.Core.Domain.Orders.Order.cs
#region Properties
public virtual string OrderEnquiry { get; set; }
3.Nop.Data.Mapping.Orders.OrderMap.cs
this.Property(o => o.OrderEnquiry).HasMaxLength(255).IsOptional();
4.Nop.Web.Themes.CorpWear2.Views.Order.Details.cs
http://localhost:2619/orderdetails/7697
@Html.Widget("orderdetails_page_bottom")
<div class = "order-enquiry">
OrderEnquiry:@Html.Raw(Model.OrderEnquiry)#
</div>
5.Nop.Web.Controllers.OrderController.cs
#region Utilities
[NonAction]
protected OrderDetailsModel PrepareOrderDetailsModel(Order order)
{
// Alteration
model.OrderEnquiry = order.OrderEnquiry;
ASKER CERTIFIED SOLUTION
homeshopper

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros