Modify the HTML Head

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

Modify the HTML Head

Post by webmaz » Wed Mar 25, 2015 2:39 pm

Hello
Could someone point me in the right direction for how to add code to the HTML head of every page?
Also, where would I add code to the HTML head of the receipt page only? While I'm asking, how about other checkout pages like Basket.aspx or OPC.aspx?
I do see in the Admin where to add code to the HTML head of a specific page (homepage, product page or a category page for example), but it seems to be different for certain pages.

Thanks!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Modify the HTML Head

Post by mazhar » Thu Mar 26, 2015 1:05 am

If you want script to be on all pages then you can add it to layout files. In Layout/Base.master and Layout/Fixed/Base.master. If you just want it on all checkout pages then you can try adding script to Layout/Fixed/Checkout.master by adding another content control somthing like that

Code: Select all

<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeader" runat="server">
    <script language="javascript" src="~/yourscript_here.js" type="text/javascript" ></script>
</asp:Content>

webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

Re: Modify the HTML Head

Post by webmaz » Thu Mar 26, 2015 7:22 am

This has been helpful. Thanks!

Is there a way to add a script to the HTML head of Receipt.aspx only?

Thank you.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Modify the HTML Head

Post by mazhar » Thu Mar 26, 2015 7:51 am

Well for that edit Layout/Fixed/Account.master and add following to it

Code: Select all

<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeader" runat="server">
    <asp:ContentPlaceHolder ID="HtmlHeadScripts" runat="server">
    </asp:ContentPlaceHolder>    
</asp:Content>
then edit Reciept.aspx and add following to it

Code: Select all

<asp:Content ID="HeaderScripts" ContentPlaceHolderID="HtmlHeadScripts" runat="server">
    <script language="javascript" src="~/yourscript_here.js" type="text/javascript" ></script>
</asp:Content>
Now you should be able to add script this way to any page that uses Account.master layout.

Post Reply