| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Could be useful to many. Need help correcting | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi to all, could someone tell me what I'm doing wrong here.I'm trying to add a manufacturer menu block
to the existing manufacturer menu.Included code in home.tpl and duplicated code from menu_manfacturer.tpl into new file menu2_manufaturer.tpl. In first menu I want to list manufacturers from up to 300 (pos order) and in second menu 300 over. This is the code I'm trying but have some problems. {if $manufacturers_menu ne ''} {capture name=menu} <form name="form_manuf" method="get" action="manufacturers.php"> <select size="12" name="manufacturerid" onchange="document.form_manuf.submit()"> {section name=mid loop=$manufacturers_menu} <option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:18:"...":true}</option> {/section} </select> </form> {/capture} {include file="customer/menu_dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.menu additional_class="menu-manufacturers"} {/if} {foreach from=$manufacturers_menu item=m} {if $m.order_by lt 300} {<div class="Manufacturers list"><a href="home.php?cat={$m.manufacturerid}" class="VertMenuItems">{$m.manufacturers}</a></div> {/if} {/foreach} same for "menu2_manufaturer.tpl" but change {if $m.order_by gt 301} Doing what I have said both menus list the same manufacturers and links to pages don't work. I'm surely missing something.Any expert coder out there please help. Cheers ![]()
__________________
v4.2.2 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() The first part of the code already lists manufacturers
Code:
You need to edit that part not adding an additional one Code:
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thanks for trying to solve my problem cflsystems but still having same problems.Used your code for both menus changing "lt" but still both menus list the same manufacturers and links to pages don't work.
Anyone else to help please
__________________
v4.2.2 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Are you sure you are editing the correct template? Are you sure is "order_by" and not "orderby" or "pos"?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
![]() Thanks again Steve,
I'm editing in "skin1/modules/Manufacturers/menu_manufacturers.tpl" and editing order_by.As I said "In first menu I want to list manufacturers from up to 300 (pos order) and in second menu 300 (pos order) over. Antonio
__________________
v4.2.2 |
|||||||
#6
|
|||||||
|
|||||||
![]() Thanks Steve,
had to use pos so "orderby" ,but links from menu to maufacturer page still not working. Any other correction you could point out to get this working. Thanks a billion Antonio
__________________
v4.2.2 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Shouldn't form method be "post"? Is this the original code?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||
|
|||||||
![]() Hi Steve,
no its not the original code.The "lt" "gt" limits seem to be working fine. The problem now are the links from menu to manufacturer pages.Was thinking about something like this that was working before I made this customization. <div class="Manufacturers list"><a href="home.php?cat={$?????.manufacturerid}" class="VertMenuItems">{$?????.manufacturers}</a></div> Tried this in different ways and variables but links still not working Thanks Steve
__________________
v4.2.2 |
|||||||
#9
|
|||||||||
|
|||||||||
![]() That's what I thought. Not sure who did that for you and why they used form when you can just loop with foreach and use <a> tags
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() And select box is not good for SEO - SE can't read the links in there
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|