nopCommerce "My Account Page" need help

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anos atrás
Hello Respected Sir/Ma'am,
I Need Help In Removing Some Tabs In Nopcommerce In "My Account" page
I Am Using "nopCommerce_4.30_Source"
Image :
https://ibb.co/1L3LS7b

Any Help Is Much Appreciated
Thank-You
3 anos atrás
Edit nopCommerce_4.30\Presentation\Nop.Web\Factories\CustomerModelFactory.cs
3 anos atrás
Hello Yidna Thank You For Your Kind Answer,

But When I Comment It, I Can't See The Changes On The Site
Can You Please Explain Me Further...
Sorry And Thank You
3 anos atrás
John Wick wrote:
Hello Respected Sir/Ma'am,
I Need Help In Removing Some Tabs In Nopcommerce In "My Account" page
I Am Using "nopCommerce_4.30_Source"
Image :
https://ibb.co/1L3LS7b

Any Help Is Much Appreciated
Thank-You

Hello
Go  to => Presentation => Nop.Web => Factories => CustomerModelFactory.cs
You have to remove or comment CustomerNavigationItem in PrepareCustomerNavigationModel method.
I want only customer info in My Account , so only i added customer info values.

public virtual CustomerNavigationModel PrepareCustomerNavigationModel(int selectedTabId = 0)
        {
            var model = new CustomerNavigationModel();

            model.CustomerNavigationItems.Add(new CustomerNavigationItemModel
            {
                RouteName = "CustomerInfo",
                Title = _localizationService.GetResource("Account.CustomerInfo"),
                Tab = CustomerNavigationEnum.Info,
                ItemClass = "customer-info"
            });

            //model.CustomerNavigationItems.Add(new CustomerNavigationItemModel
            //{
                //RouteName = "CustomerAddresses",
                //Title = _localizationService.GetResource("Account.CustomerAddresses"),
                //Tab = CustomerNavigationEnum.Addresses,
                //ItemClass = "customer-addresses"
            //});


            model.SelectedTab = (CustomerNavigationEnum)selectedTabId;

            return model;
        }
3 anos atrás
John Wick wrote:
I Am Using "nopCommerce_4.30_Source"

I this in development or in the production site ?
You need to rebuild the source solution in Visual Studio after making changes in development
then publish to production
3 anos atrás
SagarKayasth wrote:
Hello Respected Sir/Ma'am,
I Need Help In Removing Some Tabs In Nopcommerce In "My Account" page
I Am Using "nopCommerce_4.30_Source"
Image :
https://ibb.co/1L3LS7b

Any Help Is Much Appreciated
Thank-You
Hello
Go  to => Presentation => Nop.Web => Factories => CustomerModelFactory.cs
You have to remove or comment CustomerNavigationItem in PrepareCustomerNavigationModel method.
I want only customer info in My Account , so only i added customer info values.

public virtual CustomerNavigationModel PrepareCustomerNavigationModel(int selectedTabId = 0)
        {
            var model = new CustomerNavigationModel();

            model.CustomerNavigationItems.Add(new CustomerNavigationItemModel
            {
                RouteName = "CustomerInfo",
                Title = _localizationService.GetResource("Account.CustomerInfo"),
                Tab = CustomerNavigationEnum.Info,
                ItemClass = "customer-info"
            });

            //model.CustomerNavigationItems.Add(new CustomerNavigationItemModel
            //{
                //RouteName = "CustomerAddresses",
                //Title = _localizationService.GetResource("Account.CustomerAddresses"),
                //Tab = CustomerNavigationEnum.Addresses,
                //ItemClass = "customer-addresses"
            //});


            model.SelectedTab = (CustomerNavigationEnum)selectedTabId;

            return model;
        }




Hello And Thank You For Your Solution,
When I Remove Or Comment It, It Give Me An Error : "throw new Exception(message, exception);"
3 anos atrás
Yidna wrote:
I Am Using "nopCommerce_4.30_Source"
I this in development or in the production site ?
You need to rebuild the source solution in Visual Studio after making changes in development
then publish to production


Yes, It Is In Development
"NopCommerce.sln"
3 anos atrás
Well... I Figure Out Some Error, It Is About Plugins
And How Do I Resolve this ?
Image :
https://ibb.co/yX1gGXc

Thank You
3 anos atrás
RE: "A plugin with name ... is already defined".
Did you copy the FacebookPixel plugin to create a new plugin?
Search your development folder \Presentation\Nop.Web\Plugins for files named
Nop.Plugin.Widgets.FacebookPixel.dll

There should only be ones in
   \Presentation\Nop.Web\Plugins\bin
and in
   \Presentation\Nop.Web\Plugins\Widgets.FacebookPixel

If you find others (in other plugin subfolders), then Clean the solution, and before you rebuild, search again.  If you still find copies, then manually delete them, and Rebuild the solution.  Do the search again.  If you still have duplicates, then I think there is a problem with a .csproj file / configuration.
3 anos atrás
New York wrote:
RE: "A plugin with name ... is already defined".
Did you copy the FacebookPixel plugin to create a new plugin?
Search your development folder \Presentation\Nop.Web\Plugins for files named
Nop.Plugin.Widgets.FacebookPixel.dll

There should only be ones in
   \Presentation\Nop.Web\Plugins\bin
and in
   \Presentation\Nop.Web\Plugins\Widgets.FacebookPixel

If you find others (in other plugin subfolders), then Clean the solution, and before you rebuild, search again.  If you still find copies, then manually delete them, and Rebuild the solution.  Do the search again.  If you still have duplicates, then I think there is a problem with a .csproj file / configuration.



thanks for the help, but I get it running

the error was : I actually took a copy of my project and accidentally paste it in the same drive, and then I removed it, it is working as it was supposed to, thanks for the help
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.