Where is the folder root of nop?

один месяц назад
hi, I have to upload throught FTP a file for the homepage (file name: myfile.asp)
I need I can view it here:
www . mysite . com /myfile.asp
I have FTP access but I don't know where is the fit path to upload this file
Anyone could please help me ?

thanks

In /themes/Lighthouse/ there are some files and folders but I don't know where I could put this file
Also in /Views/ same thing
один месяц назад
In general, ASP.Net will not correctly interpret classic ASP files.   (ASP.NET Core controllers use routing to map URLs to actions)
один месяц назад
Hi I'd like to run classic asp files on nop.
Only to connect to remote database of old site and do a url 301 redirect.

Is it possible?

Because otherwise I don't know how to do with 301 redirect of URL they come from Google on old product details and product lists
Thanks
один месяц назад
https://stackoverflow.com/questions/43101899/net-core-and-classic-asp-in-the-same-solution

You probably need to use some redirection process outside of nopCommerce
Alternatively you can setup a plugin with definitions stored then search the definitions to catch the product URLs that do not exist in nopCommerce and redirect to the external site
один месяц назад
Yidna wrote:
https://stackoverflow.com/questions/43101899/net-core-and-classic-asp-in-the-same-solution

You probably need to use some redirection process outside of nopCommerce
Alternatively you can setup a plugin with definitions stored then search the definitions to catch the product URLs that do not exist in nopCommerce and redirect to the external site


Hi, I have an excel document (who can be imported in a nop DB table) where I have the old product url and the new site product url

example:

OLD PRODUCT URL    |    NEW SITE PRODUCT URL
/detail.asp?code=123456   |    /wonderful-item-for-sale

is there a plugin where i can give the old link and new link and when a person arrives on a asp classic page, will be redirected to the new url ?
thanks
один месяц назад
I searched the Marketplace
https://www.nopcommerce.com/en/extensions?searchterm=redirect
there seems to be a couple although I have not used any so I dont know anything more than that

i.e. https://www.nopcommerce.com/en/easy-url-redirection
and
https://www.nopcommerce.com/en/url-redirect-manager-301-redirect-foxnetsoftcom
один месяц назад
Thanks, sorry I posted 2 posts without reading the answer
один месяц назад
emitest2020 wrote:

example:

OLD PRODUCT URL    |    NEW SITE PRODUCT URL
/detail.asp?code=123456   |    /wonderful-item-for-sale

is there a plugin where i can give the old link and new link and when a person arrives on a asp classic page, will be redirected to the new url ?
thanks


Have a look at how the "BackwardCompatibilityXXControllers" work in Nop.Web/Controllers and "BackwardCompatibilityXXRouteProviders" in Nop.Web/Infrastructure/.

You could create your own that routes on the old product "code" ID.

E.G.


    public partial class BackwardCompatibilityASPController : BasePublicController
    {
        #region Fields
        private readonly IProductService _productService;
        private readonly IUrlRecordService _urlRecordService;

        #endregion

        #region Ctor

        public BackwardCompatibilityASPController(          
            IProductService productService,          
            IUrlRecordService urlRecordService)
        {        
            _productService = productService;          
            _urlRecordService = urlRecordService;          
        }

        public virtual IActionResult RedirectProduct(string code, bool idIncludesSename = true)
        {
            if (string.IsNullOrWhiteSpace(code))
                return RedirectToRoutePermanent("Homepage");
            
            //we can't use dash in MVC, and parse out dangerous querystrings
            var productId = idIncludesSename
                ? int.TryParse(code.Split(new[] { '-' })[0], out var numValue1) ? numValue1 : 0
                : int.TryParse(code, out var numValue2) ? numValue2 : 0;            

            if (productId == 0)
                return RedirectToRoutePermanent("Homepage");

            var product = _productService.GetProductById(productId);
            if (product == null || !product.Published)
                return RedirectToRoutePermanent("PageNotFound");

            return RedirectToRoutePermanent("Product", new { SeName = _urlRecordService.GetSeName(product) });
        }

}



    public partial class RedirectFromASP : IRouteProvider
    {
        public void RegisterRoutes(IRouteBuilder routeBuilder)
        {
            //products
            routeBuilder.MapRoute("", "/detail.asp",
                new { controller = "BackwardCompatibilityASP", action = "RedirectProduct" });
        }

        public int Priority => 1000;
    }
один месяц назад
ok thanks