nicole wrote:Excellent contribution; however, I am having some trouble implementing it. I copied the files to the appropriate folders as noted, but when I tried to open my site, I got a compilation error regarding the MiniShippingCartBox.ascx file that stated ..."no reference to <ul id="basketItems">". I thought that this had something to do with the DarkOrange stylesheet file so I did a search for the word "basket" in the styles.css to see if and where I should reference “basketItems”, but found nothing. So I tried to rebuild the solution and now I keep getting a build error on the MiniShoppingCargBox.ascx.cs file that says...'NopSolutions.NopCommerce.Common.Utils.CommonHelper' does not contain a definition for 'BindScriptToPage'. I didn't want to copy each and every file from the download in order to get this working because I already have some customizations on my site that I don't want to botch up. Any ideas as to how to get around the 'BindScriptToPage' error when rebuilding?
Sorry I forgot to mention additions in commonhelper.cs file, I just thought that these changes might be difficult to implement for everyone so I have put the methods in ascx files, so if you just download from the website again and copy the changes to your solution there wont be any compile errors.
There few things which are required to make this work. In mini basket this code is absolutly required;
<div class="listbox" id="basketItemsWrap">
<span id="emptybasket"><asp:Literal runat="server" ID="lShoppingCart" EnableViewState="false" /></span>
<span id="subtotalMiniCart"><asp:Label runat="server" ID="lblOrderSubtotal" CssClass="subtotal" /></span>
<div class="buttons" id="buttonsMiniCart">
<asp:Button runat="server" ID="btnCheckout" Text="<% $NopResources:MiniShoppingCartBox.CheckoutButton %>"
OnClick="BtnCheckout_OnClick" CausesValidation="false" CssClass="minicartcheckoutbutton" />
</div>
<asp:PlaceHolder runat="server" ID="plCart" EnableViewState="false">
<ul id="basketItems">
<li></li>
<%= getBasket() %>
</ul>
</asp:PlaceHolder>
</div>
if you look at the code, the items with id are required to have the same id, otherwise it won't work so the best thing to do is copy these changes to your existing solution and the change the styling by class.
Same way in ProductBox1.ascx, ProductBox2.ascx, Templates/Products/OneVariant.ascx, there are couple of things you need to look for
<div class="picture" id="productImageWrapID_<%# Eval("ProductId") %>">
<asp:HyperLink ID="hlImageLink" runat="server" />
</div>
this is required to make the image animation, and
<div class="buttons" id="addtocartbtns">
<asp:Button runat="server" ID="btnProductDetails" OnCommand="btnProductDetails_Click"
Text="<% $NopResources:Products.ProductDetails %>" ValidationGroup="ProductDetails"
CommandArgument='<%# Eval("ProductId") %>' CssClass="productgridproductdetailbutton" />
<asp:PlaceHolder ID="plAddToCart" runat="server">
<br />
<a href="/addtocart.aspx?action=addToBasket&productID=<%#Eval("ProductId") %>" class="productgridaddtocartbutton" onclick="return false;"><span id='<%#Eval("ProductId") %>'><%= GetLocaleResourceString("Products.AddToCart")%></span></a>
</asp:PlaceHolder>
<asp:Button runat="server" ID="btnAddToCart" OnCommand="btnAddToCart_Click" Text="<% $NopResources:Products.AddToCart %>"
ValidationGroup="ProductDetails" CommandArgument='<%# Eval("ProductId") %>' CssClass="productgridaddtocartbutton" />
</div>
this is required for addtocart button.
Download from the website again and see if it works for you, otherwise you can leave your website here and I would have a look for you.