How do I change the order of Items on home page?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am, you could say, a newbie. I am hoping to change the order of some of the items on the home page. I would to have the "Featured Items" at the top of the page. Can someone please tell me how to do this? Thanks
13 years ago
dlgpdx wrote:
I am hoping to change the order of some of the items on the home page.

There's no way to manage it. All products displayed on home page are ordered by name. If you have some developer skills, then you can changes this behavior in \Nop.BusinessLogic\Products\ProductService.cs file (GetAllProductsDisplayedOnHomePage method)

dlgpdx wrote:
I would to have the "Featured Items" at the top of the page.

Go to Admin area > Content Management > Localization. Find 'HomePage.FeaturedProducts' resource and edit it to "Featured Items"
13 years ago
If I understand your question, you just want to re-arrange the order of the items that are rendered on the home page.  While not complicated, you do need to understand how the pages are rendered using Master pages.  For the default installation, the home page uses the ThreeColumn.master page.  The left column contains category navigator, manufacturer navigator, popular tags, information block and polls.  The middle column contains the Home page text, featured products, news, etc.  The right column contains the minishopping cart, live chat, newsletter subscription, etc.  

For the middle column (the one your interested in), the content place holder (cph1) in the master page does not have any of the modules you want to re-arrange but is found in the Default.aspx page.   The default.aspx page uses the threecolumn.master page and has the cph1 content place holder with the list of modules (usercontrols) you want to rearrange.  So to put the Featured Products on the top of the page, just change the order of the call to the usercontrol so it is rendered first.  

Original code:
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
    <nopCommerce:Topic ID="topicHomePageText" runat="server" TopicName="HomePageText"
        OverrideSEO="false"></nopCommerce:Topic>
    <div class="clear">
    </div>
    <nopCommerce:HomePageCategories ID="ctrlHomePageCategories" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:HomePageProducts ID="ctrlHomePageProducts" runat="server" />
    <div class="clear">
    </div>

    <nopCommerce:BestSellers ID="ctrlBestSellers" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:HomePageNews ID="ctrlHomePageNews" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:HomePagePoll ID="ctrlPolls" runat="server" />
</asp:Content>

Changed code so the featured products control is first:
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
    <nopCommerce:HomePageProducts ID="ctrlHomePageProducts" runat="server" />
    <div class="clear">
    </div>

    <nopCommerce:Topic ID="topicHomePageText" runat="server" TopicName="HomePageText"
        OverrideSEO="false"></nopCommerce:Topic>
    <div class="clear">
    </div>
    <nopCommerce:HomePageCategories ID="ctrlHomePageCategories" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:BestSellers ID="ctrlBestSellers" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:HomePageNews ID="ctrlHomePageNews" runat="server" />
    <div class="clear">
    </div>
    <nopCommerce:HomePagePoll ID="ctrlPolls" runat="server" />
</asp:Content>


If you want to change the order of the items in the left and right columns, you will need to change the order in the ThreeColumn.master page since that is where they are rendered.
12 years ago
The products are listed in order of name but you can use a trick and put a space at the front of the product name you want displayed first.
10 years ago
Add a space at beginning of the name, works. Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.