Good Day, I am trying to create a new module that I can use to change the format and the information of the products displayed on the home page. (similar to the HomePageProducts module)
(I am using version 1.20)
I copied the HomePageProducts module and renamed it to UpcomingEvents and made the following changes to the code
-------------------------------------------------------------------------------------------------- UpcomingEvents.ascx -------------------------------------------------------------------------------------------------- <%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.UpcomingEventsControl" Codebehind="UpcomingEvents.ascx.cs" %>
------------------------------------------------------------------------------------------------ UpcomingEvents.ascx.cs ------------------------------------------------------------------------------------------------ Changed the line
public partial class HomepageProductsControl : BaseNopUserControl {
to
public partial class UpcomingEventsControl : BaseNopUserControl {
and copy the files the version I have installed online (used the no_source version to deploy)
When I go to the home page I get the following error
---------------------------------------------------------------------------------------------------------- Could not load type 'NopSolutions.NopCommerce.Web.Modules.UpcomingEventsControl'.
Hi Mike, Thanks a lot for your response, I just figured out what I was doing wrong.
In case any of you had the same problem the mistake I was making is that I copied across the new User Control (.ascx file) but I did not update the files in /bin folder.
After you recompile and publish some of the files in the /bin folders may also be updated, so you must remember to copy across those files as well.
Again Mike, thanks a lot for your assistance.
I at least hope that this post may help someone else in case they make the same error.
Parser Error Message: 'NopSolutions.NopCommerce.Web.Modules.ProductGridAdd' is not allowed here because it does not extend class 'System.Web.UI.UserControl'.
Source Error:
Line 1: <%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.ProductGridAdd" CodeBehind="ProductGridAdd.ascx.cs" %> Line 2: <%@ Register TagPrefix="nopCommerce" TagName="SimpleTextBox" Src="~/Modules/SimpleTextBox.ascx" %> Line 3: <%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="~/Modules/NumericTextBox.ascx" %>
Source File: /Modules/ProductGridAdd.ascx Line: 1
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
I followed the same procudures as in this Forum thread except my Control name is ProductGridAdd...
Any ideas were to look for the issue would be welcome.