Developer forum

Forum » CMS - Standard features » Hide cart icon in mobile view

Hide cart icon in mobile view

Hsu Sandi Phyo
Reply

Hi,

In mobile view, cart icon is appeared even checking in "hide cart icon " in website setting. I want to hide cart icon in my website. Please advice me how to solve that error.

Best regards

Phyo

desktop.png mobile.png websitesetting.png

Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Hsu

Sorry about the inconvenience. There is a bug here in Rapido 3.0. It is fixed in Rapido 3.1 - You can get the hotfix here: https://doc.dynamicweb.com/rapido/download 

To see the comple chaneges for the bug: TFS #57160

To fix it locally, go to templates/designs/rapido/masterblocks/header.cshtml and re-write the part with the "mobileHeaderMiniCart" Block, with this:

 

bool hideCart = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideCart");

if (hideCart == false)
    {
        mobileHeaderMiniCart = new Block
        {
            Id = "MobileHeaderMiniCart",
            SortId = 20,
            Template = RenderMobileTopMiniCart()
      };
   }
    else
    {
        mobileHeaderMiniCart = new Block
        {
            Id = "MobileHeaderMiniCart",
            SortId = 20
        }
}

 

Best regards
Karsten Thuen

 

You must be logged in to post in the forum