logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
jeffr_ca  
#1 Posted : Monday, November 9, 2020 8:37:36 PM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I've switched the default installation from the "Store Header Compact" Widget Board to the "Store Header Content" Widget Board.

The "Store Header Content" Widget Board uses the _StoreItemsMenu.cshtml view file. There appears to be some bugs related to this view file and widget control.

When toggling the Cart Link 'ON', the Cart Link does not appear. I have made a quick fix myself on this by forcing the Cart Link on by removing the "@if"
Quote:
@if (Model.DisplayCartLink)
{

<li class="hidden-xs basket pull-right">
<a href="@Url.Content("~/Checkout/Basket")">
<i class="fa fa-shopping-cart"></i> <b>
@GetResourceString("retail.storemenu.cart")
@if (basketItemsCount > 0)
{ <text>(@(basketItemsCount))</text>}
</b>
</a>
</li>
}


However, I haven't figured out a quick fix to solve the missing drop-down lists.

I've created a sample header showing both "Store Header Content Menu" at the top and "Store Header Menubar" below on the same page, viewable on this demo site:

http://demo.ablecommerce.com/9031028114404/

Notice how the "...Content Menu" does not show dropdows, but "...Menubar" properly shows dropdowns.

Please advise if there is further changes to _StoreItemsMenu.cshtml that I could make to fix this.

Thanks!

-Jeff



Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

ray22901031  
#2 Posted : Monday, November 9, 2020 9:36:25 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Went into my system to try to confirm your finding, I also dropped the "store header content" underneath my "store header compact", I cannot get the drop-down to work. I went into the settings and set the to display to two levels of products, it didn't work.

I try to remove the "store header content" from my system, there was a hiccup and the entire contents of the "store header content" was erased.

Shame on me for not doing a copy first. Went to my second server, open up the widget board and decided to do a copy first, the system did not copy, the system jammed, I had to hit the cancel button, and all contents of the "store header content" have now been erased.

Two different servers, same results, contents erased. I am now restoring from a backup that I did a few hours ago.

This file is bugging and support needs to investigate.

Question to Jeff: what benefit does this have over store header compact?

Question to support: I am assuming that restoring the database to previous version is going to fix this?

Edited by user Monday, November 9, 2020 9:45:38 PM(UTC)  | Reason: Not specified

ray22901031  
#3 Posted : Monday, November 9, 2020 9:41:55 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. View less
Exception: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. Stack Trace: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) at CommerceBuilder.Web.Extensions.HtmlExtensions.SafeRenderAction(HtmlHelper html, String actionName, String controllerName, Object routeValues) Inner Exception: Object reference not set to an instance of an object. Inner Exception Stack Trace: at AbleCommerce.Controllers.CategoryController.CategoryName(Int32 categoryId) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.Async.AsyncResultWrapper.<.cctor>b__0(IAsyncResult asyncResult, Action action) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.b__3() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
jeffr_ca  
#4 Posted : Monday, November 9, 2020 9:53:47 PM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I wasn't getting any major system failures when adding or removing the widget board.

Just the behaviour of the widget and view file are not consistent. The toggle to show the "Product Finder" operates correctly but the Cart Toggle and drop-down menu items don't.

The advantage with this widget is that it provides a more "static" menu bar appearance. But it isn't hard-coded to display the top level Categories...this widget allows you to specify the "Category ID" that you want to display, which means I can create a drop-down menu structure consisting of Pages, Products or Categories that are managed in the Catalog Categories list.

Kinda handy to make changes to the menu in the future without hard-coding the viewfile.

-Jeff
ray22901031  
#5 Posted : Monday, November 9, 2020 10:02:19 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Obviously the advantage of the system creating a menu structure for you is great, and the benefits of doing it manually leads to more control. A middle ground would be, if in the future AbleCommerce would have a menu maker built into the system with drag and drop features. I never like the menu structure, I don’t like the way it looks, and the tremendous lack of control. I’ll stick to my manual menus, yes it’s a little bit more work, but I get the results that I want.

Curious to see what Support has to say about this? I just finished restoring my database and it looks like I’m back to normal, but I’m gonna take a break and wait for Support to respond.
shari  
#6 Posted : Tuesday, November 10, 2020 4:17:23 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
The "Store Header Content" Widget Board uses the _StoreItemsMenu.cshtml view file. There appear to be some bugs related to this view file and widget control.
When toggling the Cart Link 'ON', the Cart Link does not appear. I have made a quick fix myself on this by forcing the Cart Link on by removing the "@if"


I am to able confirm that this is a bug. I have registered the bug and sharing a code fix.

Thanks

1- Go to \Website\Models\WebpageModels.cs
2- Search for

Code:
public StoreItemsMenuWidgetParams()
        {
            DisplayProducts = false;
            DisplayPages = true;
            DisplayProductFinderLink = true;
            CategoryId = 0;
            DisableCategoryLinks = false;
        }

3- Replace with

Code:
public StoreItemsMenuWidgetParams()
        {
            DisplayProducts = false;
            DisplayPages = true;
            DisplayProductFinderLink = true;
            CategoryId = 0;
            DisableCategoryLinks = false;
            DisplayCartLink = true;
        }


4- This is a controller file change so you will have to compile the code
shari  
#7 Posted : Tuesday, November 10, 2020 4:26:03 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
I've created a sample header showing both "Store Header Content Menu" at the top and "Store Header Menubar" below on the same page, viewable on this demo site:

http://demo.ablecommerce.com/9031028114404/

Notice how the "...Content Menu" does not show dropdows, but "...Menubar" properly shows dropdowns.


This is never recommended to use both widget boards simultaneously on the same page. You are experiencing style conflicts when using both boards at the same location.



Store Header Content Menu

The problem of drop-down not listing anything could happen because of two reasons.
- The dropdown will only list Products or Webpages that are assigned to that category. So if it isn't listing anything, you should confirm that the category contains Products or Webpages
- The widget settings contain two settings that control the display of Products and Webpages. Please confirm that they are set to true.
shari  
#8 Posted : Tuesday, November 10, 2020 4:29:14 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
a menu maker built into the system with drag and drop features


You can add this to AbleCommerce 9 Feature Requests.
Or alternatively, someone can create a widget for you using AC Plugin Framework.

Thanks
jeffr_ca  
#9 Posted : Tuesday, November 10, 2020 8:18:54 AM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi Shari,

I was able to work around the Cart Link problem.

Can you confirm whether your code fix will resolve the problem with the drop-down menus not working? That looks like it might be a different solution than what you've shown.


Yes, I wouldn't normally use both header widgets on a single page...it was just an example of showing the drop-downs working in one header widget, but not the other.

-Jeff

Edited by user Tuesday, November 10, 2020 8:21:01 AM(UTC)  | Reason: Not specified

shari  
#10 Posted : Tuesday, November 10, 2020 10:02:49 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Can you confirm whether your code fix will resolve the problem with the drop-down menus not working?


No, that solution was only related to the Cart Link problem.

Quote:
Store Header Content Menu

The problem of drop-down not listing anything could happen because of two reasons.
- The dropdown will only list Products or Webpages that are assigned to that category. So if it isn't listing anything, you should confirm that the category contains Products or Webpages
- The widget settings contain two settings that control the display of Products and Webpages. Please confirm that they are set to true.


Can you please elaborate on the drop-down issue?
jeffr_ca  
#11 Posted : Tuesday, November 10, 2020 10:14:06 AM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
On the demo page example, if you hover over "Pet" or "Department" with "...MenuBar" (second header widget board) you get drop-down list of categories.

If you hover those with "...ContentMenu" (header widget board at top), the drop-down lists don't show. I think they should be showing the same way. There is a bit of an outline that shows when hovering, but no visible content.

-Jeff
shari  
#12 Posted : Tuesday, November 10, 2020 11:43:01 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Store Header Content Menu

The problem of drop-down not listing anything could happen because of two reasons.
- The dropdown will only list Products or Webpages that are assigned to that category. So if it isn't listing anything, you should confirm that the category contains Products or Webpages
- The widget settings contain two settings that control the display of Products and Webpages. Please confirm that they are set to true.


The dropdown will only list Products or Webpages that are assigned to that category. It will not list sub categories.
jeffr_ca  
#13 Posted : Wednesday, November 11, 2020 10:20:24 AM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thanks...Yes, I've picked a new category to experiment with and the first level products show properly in the drop-down.

Is there a way that we could also display sub-categories in this drop-down along with Products & Webpages?

-Jeff
shari  
#14 Posted : Wednesday, November 11, 2020 10:40:17 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
A code change is needed. You can try the following steps

1- Open Website\Controllers\CategoryController.cs
2- Search for
Code:
var nodes = _catalogRepo.LoadForCategory(categoryId, true).Where(node => node.CatalogNodeType != CatalogNodeType.Category).ToList();

3- There will be two places. Replace with
Code:
var nodes = _catalogRepo.LoadForCategory(categoryId, true).ToList();

4- Compile the code and an application restart will also be needed to invalidate the cache.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.