Commit 11cee81 1 parent d639e77 commit 11cee81 Copy full SHA for 11cee81
File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -326,14 +326,22 @@ function MouseOutSubmenuItem(source)
326
326
<?php
327
327
$ menus = get_template_menus ();
328
328
329
- $ countElements = count ($ config ['menu_categories ' ]);
330
- $ i = 0 ;
329
+ $ countElements = 0 ;
331
330
foreach ($ config ['menu_categories ' ] as $ id => $ cat ) {
332
- $ i ++;
331
+ if (!isset ($ menus [$ id ]) || ($ id == MENU_CATEGORY_SHOP && !setting ('core.gifts_system ' ))) {
332
+ continue ;
333
+ }
334
+
335
+ $ countElements ++;
336
+ }
333
337
338
+ $ i = 0 ;
339
+ foreach ($ config ['menu_categories ' ] as $ id => $ cat ) {
334
340
if (!isset ($ menus [$ id ]) || ($ id == MENU_CATEGORY_SHOP && !setting ('core.gifts_system ' ))) {
335
341
continue ;
336
342
}
343
+
344
+ $ i ++;
337
345
?>
338
346
<div id='<?php echo $ cat ['id ' ]; ?> ' class='menuitem'>
339
347
<span onClick="MenuItemAction('<?php echo $ cat ['id ' ]; ?> ')">
@@ -373,7 +381,7 @@ function MouseOutSubmenuItem(source)
373
381
?>
374
382
</div>
375
383
<?php
376
- if ($ id == MENU_CATEGORY_SHOP || (!setting ('core.gifts_system ' ) && $ i == $ countElements - 1 )) {
384
+ if ($ id == MENU_CATEGORY_SHOP || (!setting ('core.gifts_system ' ) && $ i == $ countElements )) {
377
385
?>
378
386
<div id='MenuBottom' style='background-image:url(<?php echo $ template_path ; ?> /images/general/box-bottom.gif);'></div>
379
387
<?php
You can’t perform that action at this time.
0 commit comments