How to put News and recent products in the sidebar of every page instead of on homepage only

Posted By whelanbe Sun 23 Jan 2011
Add to Favorites0

How to put News and recent products in the sidebar of every page...

Author Message
Mohammad
 Posted Tue 25 Jan 2011
Kartris Expert

Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Sorry Beatrice, I don't think the price could be shown in that part.

You are welcome Smile
whelanbe
 Posted Tue 25 Jan 2011
Supreme Being

Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)

Group: Awaiting Activation
Last Active: Sat 12 Feb 2011
Posts: 16, Visits: 26
Many thanks that worked!

I tried both of your solutions and they both worked great but the second one looks really well so I am going to keep that. To customise further, would it be possible to have the product price showing under the title/link?

All the best and thanks again for good support on the forum.

Beatrice
Mohammad
 Posted Tue 25 Jan 2011
Kartris Expert

Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Yeah, you can do that, below is how to do it, but would be good to have a copy of the existing file (UserControls > Skin > NewestItems.ascx) before you try, just in case:

1. Open this file UserControls > Skin > NewestItems.ascx
2. Copy and past this code:
<user:ProductTemplateImageOnly ID="UC_ProductImageOnly" runat="server" />

Between:
<ItemTemplate><li>

And This:
</li></ItemTemplate>

3. You can apply the needed css around the pasted code, but it should be inside the <ItemTemplate> tag.

OR you can try this if you like:
Replace this code:
<asp:Repeater ID="rptNewestItems" runat="server">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <asp:HyperLink ID="lnkProduct" runat="server" NavigateUrl='' Text='<%# Server.HTMLEncode(Eval("P_Name")) %>'></asp:HyperLink></li></ItemTemplate>
        <FooterTemplate>
            </ul></FooterTemplate>
    </asp:Repeater>

BY this code:
<asp:Repeater ID="rptNewestItems" runat="server">
        <ItemTemplate>
            <table>
                    <tr>
                        <td style="width:52px">
                            <user:ProductTemplateImageOnly ID="UC_ProductImageOnly" runat="server" />
                        </td>
                        <td valign="middle" align="left">
                            <asp:HyperLink ID="lnkProduct" runat="server" NavigateUrl='' Text='<%# Server.HTMLEncode(Eval("P_Name")) %>'></asp:HyperLink>
                        </td>
                    </tr>
                </table>
        </ItemTemplate>
    </asp:Repeater>


Give it a try and let me know if you have problems.
Tue 25 Jan 2011 by Mohammad
whelanbe
 Posted Mon 24 Jan 2011
Supreme Being

Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)

Group: Awaiting Activation
Last Active: Sat 12 Feb 2011
Posts: 16, Visits: 26
Thank you I did that and it worked, however it is displaying just the title/links of the Recent Products. Is it possible to have it display an image of each recent product above the product name/link?
Mohammad
 Posted Mon 24 Jan 2011
Kartris Expert

Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)Kartris Expert - (78,931 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Hi, You can have the recent products in either side bars, but unfor. you can't do that for the news for the time being, we are planning to have such stuff more customizable in the future, so to allow placing parts in other places.

To do the recent products, go to:
MasterPages > Kartris.master > Find the div with id="right_pad" and choose the place you want to have the list in and past this code inside the div:
<user:NewestItems ID="UC_NewestItems" runat="server" />


If you want to play with the css of the recent products, you can find the latest products in UserControls > Skin > NewestItems.ascx; but that will affect the home page (default.aspx) as well.
whelanbe
 Posted Sun 23 Jan 2011
Supreme Being

Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)Supreme Being - (10,368 reputation)

Group: Awaiting Activation
Last Active: Sat 12 Feb 2011
Posts: 16, Visits: 26
Hi,

By default the News headings and Recent products appear on the site homepage in the central column of the shop homepage. Is it possible to have the news headings and recent products appear in the right sidebar of the template so that they appear on every page in the site and not just the hpomepage?

I would like the news and recent products to appear in the right column on every page in the same way that the mini basket  and category listing appears on every page.

Anyone know hoe to do this?

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top