MiniShoppingCart - 2 modifications needed

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 年 前
I'd like to change two things with the minicart :

1. I'd like the minicart to display ONLY when it has one or more items in the cart i.e. it's not visible if you're only browsing the site.

I've seen in the MiniShoppingCartBox.ascx.cs code on line 51 :- if (shoppingCart.Count == 0) phCheckoutInfo.Visible = false; So I've figured the same code using ctrlMiniShoppingCart.visible = false; inserted between lines 20&21 will work. Is this the correct method ?


2. I only use 3 currencies £, $ € and I want to change currency not by the dropdown combo but by 3 separate buttons, one for each currency.

I think this is easy but I'm not sure what code to pass to where to update the currency values.

Any help with these two please ?
14 年 前
Halfway there...I've moved my minicart to the header where it blends in nicely so it may cause a few issues in the LH column.

Change the code in MiniShoppingCartBox.ascx to :

<div class="title">
       <!-- <asp:Label runat="server" Text="<% $NopResources:MiniShoppingCartBox.Information %>" />-->
     <asp:Label ID="lmcTitle" runat="server" /><div class="title">

Change the code in MiniShoppingCartBox.ascx.cs to (from line 51):

if (shoppingCart.Count == 0)
            {
                phCheckoutInfo.Visible = false;
                lmcTitle.Visible = false;
                lShoppingCart.Visible = false;

                lvCart.Visible = false;
            }
            else
            {
                phCheckoutInfo.Visible = true;
                lmcTitle.Text = GetLocaleResourceString("MiniShoppingCartBox.Information");

          etc...

I've seen the code behind the twocolumn.master switches the minicart off and on so I suppose this is another option to look at and use instead.

Any ideas on the second item still welcome.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.