SocialEngine 4: Disallow Google Bots URL Login

Andrew - SocialEngine

Google Bots can be one of the annoying things for people creating a Social Network, Google will and can through you alot of error relating to redirect rules within the Social Engine framework.

This is a easy fix for this which is deny any bots from accessing the Redirect url login scripting.

If you open your Robots.txt file with note pad or another text editor and add this line to the Robot File.

User-agent: *
Disallow: /login/return_url/

Save the file and reupload it to your root folder, this should now stop any robots from accessing a return url.

 

Looking for quality SocialEngine Hosting? Look no further than Arvixe Web Hosting

 

Tags: , , , , , , | Posted under SocialEngine | 2 Comments

How to add product pictures in nopCommerce

Adding quality product pictures to the store site is an important design aspect of any e-Commerce website. Without the ability to touch or feel the actual product, pictures are the only medium that convince online shoppers to buy the product.

Today, we will go over the process of adding product pictures in nopCommerce.

From the Catalog menu, select Products > Manage Products.

 

Click Edit beside the product to edit and select the Pictures tab, as follows:

 

From the Add a new picture area, in the Picture field, click the Upload button, and navigate and select the new picture you want to upload to your product page.

Alt: Override “alt” attribute for “img” HTML element. If empty, then a default rule will be used (e.g. product name).

Title: Override “title” attribute for “img” HTML element. If empty, then a default rule will be used (e.g. product name).

Display order: Display order of the picture. 1 represents the top of the list.

 

After selecting / uploading a new image – Click Add product picture.

You can change the order of the images at any time and then click Edit to update the site with the new picture.

 

Result (product page):

 

 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | 1 Comment

Registering Routes in nopCommerce

nopCommerce is based on ASP.NET (MVC) and it follows the IRouteProvider interface for registering the routes during the application start event. All the routes are registered in the “Route Provider” class in the Nop.Web project.

In order to view the “Route Provider” class, go to: Nop.Web/Infrastructure/RouteProvider.cs.

 

You will see the route registration of the pages like homepage, login & shopping cart etc:

using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Localization;
using Nop.Web.Framework.Mvc.Routes;

namespace Nop.Web.Infrastructure
{
    public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(RouteCollection routes)
        {
            //We reordered our routes so the most used ones are on top. It can improve performance.

            //home page
            routes.MapLocalizedRoute("HomePage",
                            "",
                            new { controller = "Home", action = "Index" },
                            new[] { "Nop.Web.Controllers" });

            //widgets
            //we have this route for performance optimization because named routes are MUCH faster than usual Html.Action(...)
            //and this route is highly used
            routes.MapRoute("WidgetsByZone",
                            "widgetsbyzone/",
                            new { controller = "Widget", action = "WidgetsByZone" },
                            new[] { "Nop.Web.Controllers" });


            //MyNewPage
            routes.MapLocalizedRoute("ThisIsMyNewCustomPage",
                            "MyNewPage/",
                            new { controller = "MyNewPage", action = "Index" },
                            new[] { "Nop.Web.Controllers" });


            //login
            routes.MapLocalizedRoute("Login",
                            "login/",
                            new { controller = "Customer", action = "Login" },
                            new[] { "Nop.Web.Controllers" });
            //register
            routes.MapLocalizedRoute("Register",
                            "register/",
                            new { controller = "Customer", action = "Register" },
                            new[] { "Nop.Web.Controllers" });
            //logout
            routes.MapLocalizedRoute("Logout",
                            "logout/",
                            new { controller = "Customer", action = "Logout" },
                            new[] { "Nop.Web.Controllers" });

            //shopping cart
            routes.MapLocalizedRoute("ShoppingCart",
                            "cart/",
                            new { controller = "ShoppingCart", action = "Cart" },
                            new[] { "Nop.Web.Controllers" });
            //wishlist
            routes.MapLocalizedRoute("Wishlist",
                            "wishlist/{customerGuid}",
                            new { controller = "ShoppingCart", action = "Wishlist", customerGuid = UrlParameter.Optional },
                            new[] { "Nop.Web.Controllers" });

 

You can use this “Route Provider” class for the following:

  • Plugins custom routes
  • New custom pages

 

Example of registering route for Contact us page in nopCommerce:

 //contact us
            routes.MapLocalizedRoute("ContactUs",
                            "contactus",
                            new { controller = "Common", action = "ContactUs" },
                            new[] { "Nop.Web.Controllers" });

Hope it helps!

 

 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | Leave a comment