Close

Ho do I change columns from 4 to 3 after upgrade from 3.3 to 3.4

licensing@tgiltd.com-4925791-4925791
11 years ago
#8258 Quote
Avatar
  • 37
Ive upgraded my site from 3.3 to 3.4 and I noticed an issue.  In the previous build (based on your advice) I had updated my Mega Menu to display 3 columns instead of 4 via the following change in CategoryMenuTemplate.WithPictures.cshtml:

<!-- CHANGED FROM 4 ROWS to 3 HERE -->

@(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(Model.CategoriesModels, 3, "row", "box",

However in the 3.4 version of CategoryMenuTemplate.WithPictures.cshtml this code has changed and this is not where the rows value is set.  How do I change from 4 columns to 3 with the new cshtml?

Thanks!
licensing@tgiltd.com-4925791-4925791
11 years ago
#8261 Quote
Avatar
  • 37
FWIW - The new view has the following line:

    @(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(categoriesModels, megaMenuSettings.NumberOfCategoriesPerRow, "row", "box",
    @<text>

... so I replaced "megaMenuSettings.NumberOfCategoriesPerRow" with "3" and this worked.  My issue is resolved however Im curious if this hard-coding is no longer required?  Is there somewhere else I can set this variable so I dont have to change the view anymore going fwd?
hristian.dimov-4536702-4536702
11 years ago
#8263 Quote
Avatar
  • Moderator
  • 386
bobg@tgiltd.com wrote:
FWIW - The new view has the following line:

    @(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(categoriesModels, megaMenuSettings.NumberOfCategoriesPerRow, "row", "box",
    @<text>

... so I replaced "megaMenuSettings.NumberOfCategoriesPerRow" with "3" and this worked.  My issue is resolved however Im curious if this hard-coding is no longer required?  Is there somewhere else I can set this variable so I dont have to change the view anymore going fwd?


Hi,

yes, you can change it from the administration of the Mega Menu plugin. It is no longer required to be a hard-coded value. You simply need to open the Administration -> Nop Mega Menu -> Settings and from the Category Menu Settings panel you can edit the Maximum number of categories in category item field with whatever value you need.

Here you can see an online demo of the settings: http://admin-demos.nop-templates.com/admin/MegaMenuAdmin/Settings
Here you can see the documentation of the Nop Mega Menu plugin: http://www.nop-templates.com/mega-menu-plugin-for-nopcommerce-documentation
Regards,
Hristian Dimov
Nop-Templates.com
licensing@tgiltd.com-4925791-4925791
11 years ago
#8273 Quote
Avatar
  • 37
No, I probably wasn't clear enough in my initial description but I don't believe that's correct.  See the following image:

https://drive.google.com/?authuser=0#folders/0BxSwbWwuTCU1Q212ZDItQUViVHc

What Im trying to accomplish (and achieved with the hard-code listed above) is to control the number of top level category columns with images.  The field you have specified only controls the category items displayed within each top level category.

I would love this feature to be in the plugin settings as I have to update this in quite a few builds.  It appears the change made in 3.4 switched this to a variable, but it doesn't appear that this variable is set in the plugin settings?

Maybe I'm missing something.  Is there something else I can do to effect this without a hard-code?  If not, whats the point of variable?
licensing@tgiltd.com-4925791-4925791
11 years ago
#8274 Quote
Avatar
  • 37
Whoops - Wrong URL.  Here's the image:

https://docs.google.com/file/d/0BxSwbWwuTCU1cFVVVDhfdXlEZmM
Boyko
11 years ago
#8275 Quote
Avatar
  • 1570
bobg@tgiltd.com wrote:
FWIW - The new view has the following line:

    @(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(categoriesModels, megaMenuSettings.NumberOfCategoriesPerRow, "row", "box",
    @<text>

... so I replaced "megaMenuSettings.NumberOfCategoriesPerRow" with "3" and this worked.  My issue is resolved however Im curious if this hard-coding is no longer required?  Is there somewhere else I can set this variable so I dont have to change the view anymore going fwd?


You can change this setting from the All Settings page in the administration. We have a video about how to search and change settings in our Videos section.
Regards,
Nop-Templates.com Team
licensing@tgiltd.com-4925791-4925791
11 years ago
#8276 Quote
Avatar
  • 37
That's what I was looking for.  Awesome!