Urgent: I need to create a new page with a fill in form, How ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I was wondering if this was at all posible on Ver 2.5 with the MVC.
I tried it but there seems to be no masterpages.(I am new to MVC)
The problem is the client's site is up an running at a hosting company with only ftp access.
11 years ago
hkhieu wrote:
Here you go!

MemberInfo.aspx

<%@ Page Language="C#" MasterPageFile="~/MasterPages/TwoColumn.master" AutoEventWireup="true"
CodeBehind="MemberInfo.aspx.cs" Inherits="NopSolutions.NopCommerce.Web.MemberInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
    <asp:Label ID="ResultLabel" ForeColor="Red" runat="server" ></asp:Label><br />
    Name: <asp:TextBox ID="NameTextBox" runat="server"></asp:TextBox><br />
    Company: <asp:TextBox ID="CompanyTextBox" runat="server"></asp:TextBox><br />
    Contact #: <asp:TextBox ID="ContactNumberTextBox" runat="server"></asp:TextBox><br />
    Mobile phone: <asp:TextBox ID="MobilePhoneTextBox" runat="server"></asp:TextBox><br />
    Address: <asp:TextBox ID="AddressTextBox" runat="server"></asp:TextBox><br />
    # of Attendants: <asp:TextBox ID="AttendantTextBox" runat="server"></asp:TextBox><br /><br />
    <asp:Button ID="SubmitButton" runat="server" Text="Submit"
        onclick="SubmitButton_Click" />
</asp:Content>

MemberInfo.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using NopSolutions.NopCommerce.BusinessLogic.Messages;

namespace NopSolutions.NopCommerce.Web
{
    public partial class MemberInfo : BaseNopPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string mailContent = string.Format("Name: {0}, Company:{1}, Contact#:{2}, Mobilephone:{3}, Address:{4},  Attendants:{5}",  NameTextBox.Text, CompanyTextBox.Text, ContactNumberTextBox.Text,
                                            MobilePhoneTextBox.Text, AddressTextBox.Text, AttendantTextBox.Text);
            try
            {
                MailAddress from = new MailAddress(MessageManager.AdminEmailAddress, MessageManager.AdminEmailDisplayName);
                MailAddress to = new MailAddress("[email protected]");
                MessageManager.SendEmail("Member Info", mailContent, from, to);
                ResultLabel.Text = "email successfully sent";
            }
            catch (Exception ex)
            {
                ResultLabel.Text = "Error: " + ex.Message;
            }
        }
    }
}

Add it to nopCommerceStore root folder, create a link some where to it and you ready to go.
I am not a graphic designer, so you make it beautiful yourself. But most importantly, It runs.



Hi team.,
I am in need of same requirement as like above(a feedback form which mails the clients request to admin)., but i am using NOP2.60. How can i customize this form for 2.60 version.? bcz in above they mentioned for master pages., but we not using those columntwo.master at right now. how to change the above code for .cshtml file.? Any one pls update the above code for 2.60 version. and pls mention where to add this file(root directory).? I am very new to mvc applications.

Thanks in advance

Regards
Gopinath.k
11 years ago
Maybe you can modify this Request Quote Plugin
11 years ago
New York wrote:
Maybe you can modify this Request Quote Plugin


Hi ., Thanks for ur suggestion., but "Request Quote Plugin" supports for NOP 2.0 version., i am using 2.60 version. i unable to install this plugin in admin part., then it not loading in 'plugin' menu of admin part also. What can i do now.? Pls guide me.
My application is in UAT state..,so i am need it urgent.

Thanks & Regards
Gopinath.K
11 years ago
Yes, that's why I indicated "... modify ...".   That extension was provided as source code only. You will need to compile it, and possibly make source code changes.
If you are not a developer, then you'll have to hire one.
7 years ago
Hi,
  If i changes single thing in it runs correctly sometimes but some times it shows error in admin panel
as page not found.
I have added two fields in product master.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.