Edfitng Store Header

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Edfitng Store Header

Post by kwikstand » Sat Jul 18, 2015 7:37 pm

I am trying to edit my store header and the changes don't show up on account pages like MyWishlist.aspx, MyAccount.aspx. Do they use a different store header?
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Sun Jul 19, 2015 10:48 am

I figured it out. I needed to put code in the head of the page and I read an older post explaining that you need to edit the Fixed/BaseMaster as well as the BaseMaster. But that didn't seem to work; Until I realized I need to use absolute references because the other pages in the /Members/ folder.
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Sun Jul 19, 2015 1:15 pm

Maybe I don't have it all figured out. It is not working on MyAccount, MyWishlist or the LogIn page when you are NOT logged in. If you log in, then everything works fine. It works fine on all pages of my dev site whether I am logged in or not.

Just so you know what it is, I installed a css drop down menu in the nav bar. The style sheet for it is referenced in the head.
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Sun Jul 19, 2015 2:34 pm

OK, now I am trying in different browsers.

In IE11, it is working just fine, logged in or not.

In Chrome and Firefox, the Account page is not working at all, whether logged in or not. It acts as if it can't see the style sheet that is referenced in the head section. If you go from Account to Wishlist, it doesn't work either. But if you go to another page, like the Cart or Home page, and then back to Wishlist, it works fine. Back to Account and it stops working again. You must go to an alternate page before Wishlist to make the wishlist page work.

I think it has something to do with the Account page being a secure page. (https) When you go directly to Wishlist, the URL stays https. When you go to an alternate non secure page, the new menu bar renders nicely. If you then go back to Wishlist, it is no longer an https url and it still renders. It is when you go to the https Account page that stops rendering.

Does anybody know why the secure page would stop the style sheet reference?
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Mon Jul 20, 2015 9:16 am

The CSS menu was causing mobile friendly issues, so I disabled it for now. I found that hard coding the style sheet link in Base.Master causes mobile problems.

But if I paste the same code in the HTML Head section of an individual page it works fine with no mobile problems when I run it through Google's Mobile-Friendly Test.

Why does it make a difference? How can I put this code in all of my pages without entering it in each and every product and category page? Not to mention the inaccessible pages that can't be edited.

Here is the line of code: <link rel="stylesheet" href="http://www.contractors-solutions.net/Mega Menu_files/css3menu1/style.css" type="text/css" /><style type="text/css">._css3m{display:none}</style>

and this is how I put it in the Base.Master:

<asp:ContentPlaceHolder ID="HtmlHeader" runat="server">
<link rel="stylesheet" href="http://www.contractors-solutions.net/Mega Menu_files/css3menu1/style.css" type="text/css" /><style type="text/css">._css3m{display:none}</style>
</asp:ContentPlaceHolder>
Contractor's Solutions
www. contractors-solutions.net

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

Re: Edfitng Store Header

Post by mazhar » Tue Jul 21, 2015 5:52 am

In order to include new/custom style sheet all you need is to make entries in skin file of your theme. Go to your current theme folder and edit style.skin file. Then locate following

Code: Select all

<cb:StylePlaceHolder runat="server">
    <cb:Style runat="server" CssUrl="style.min.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>
    <cb:Style runat="server" CssUrl="footable.core.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>
    <cb:Style runat="server" CssUrl="print.css" TargetMedia="Print" DeviceConstraint="Standard"></cb:Style> 
    <cb:Style runat="server" CssUrl="jquery/jqueryui.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>
    <cb:Style runat="server" CssUrl="mobile.css" TargetMedia="All" DeviceConstraint="Mobile"></cb:Style>
</cb:StylePlaceHolder>
in order to add new style sheet for example custom.css you need to add following line right before </cb:StylePlaceHolder>

Code: Select all

...........
    <cb:Style runat="server" CssUrl="custom.css" TargetMedia="All" DeviceConstraint="Standard"></cb:Style>

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Tue Jul 21, 2015 6:30 am

I just tried it and now my site is broken.

I fixed it. Put it back the way I had it. I have the style sheet line at the bottom of the StoreHeader file. It puts the code below the <head> section and even below the code for the menu bar, but it works.
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Tue Jul 21, 2015 7:00 am

OK, I got it working now. I didn't enter the code correctly. I included the <link rel="stylesheet".....

Thanks a lot again Mazhar.

It is basically the same thing I did with the Base.Master page, but for some reason, it made the site fail the Mobile Friendly test.

After I changed the skin file, I had to move all the files for the menu under the Boot_Strap theme to make it render. It works perfectly now, except the Basket,Wish List and Account pages, but I don't really care too much about that.
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Edfitng Store Header

Post by kwikstand » Tue Jul 21, 2015 8:04 am

Just another question Mazhar,

In order to delete the standard "Home", "Product Finder" etc., I simply commented out the lines in under the section <!-- Collect the nav links, forms, and other content for toggling -->

Is there a better way to do this?
Contractor's Solutions
www. contractors-solutions.net

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

Re: Edfitng Store Header

Post by mazhar » Wed Jul 22, 2015 5:59 am

kwikstand wrote:Just another question Mazhar,

In order to delete the standard "Home", "Product Finder" etc., I simply commented out the lines in under the section <!-- Collect the nav links, forms, and other content for toggling -->

Is there a better way to do this?
That's fine.

Post Reply