Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

ideal responsive template menus

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-04-2019, 01:21 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default ideal responsive template menus

I am trying to make the speed bar and category links show up in drop down lists when the screen size is 767 px or less. I have it working on my 4.6.6 store php 5.4 but when I copy the code (and css) info over to my development 4.7.11 php7.2 site it doesn't quite work and I can't figure out why. They layout is showing up how I want, while the page is loading the first item in each of the drop downs shows up as text (so for the speed bar you can see Quick Menu and for the categories drop down, you can see Categories) but as soon as the page is finished loading, the text disappears and you can see 2 blank drop downs. If I click the drop down arrow I can see all the options just fine and when selected, they do what they are supposed to.

The default .tpl code is a little different between 4.6.0 and 4.7.11 so I'm guessing there is something there that is causing it. I did remove the javascript portion of the tabs-mobile and categories-mobile and the text remained visible when the page was finished loading but it didn't work properly when clicked. I don't know a lick of javascript so I'm not sure which part could be the issue.

I just can't figure out whey when the page finishes loading, the "default" text disappears. Here is the code from ideal_responsive/customer/tabs.tpl 4.7.11 Everything from
Code:
<div class="tabs-mobile">
is what I added
Code:
{if $speed_bar} <div class="tabs{if $all_languages_cnt gt 1} with_languages{/if} monitor"> <ul> {math equation="round(100/x,2)" x=$speed_bar|@count assign="cell_width"} {foreach from=$speed_bar item=sb name=tabs} {strip} <li{interline name=tabs foreach_iteration="`$smarty.foreach.tabs.iteration`" foreach_total="`$smarty.foreach.tabs.total`" additional_class="hidden-xs"}> <a href="{$sb.link|amp}"> {$sb.title} <img src="{$ImagesDir}/spacer.gif" alt="" /> </a> <div class="t-l"></div><div class="t-r"></div> </li> <li{interline name=tabs foreach_iteration="`$smarty.foreach.tabs.iteration`" foreach_total="`$smarty.foreach.tabs.total`" additional_class="visible-xs"} style="width: {$cell_width}%"> <a href="{$sb.link|amp}"> {$sb.title} <img src="{$ImagesDir}/spacer.gif" alt="" /> </a> {if $smarty.foreach.tabs.last}<div class="mobile-tab-delim first"></div><div class="t-l first"></div>{else}<div class="t-l"></div>{/if}<div class="t-r"></div><div class="mobile-tab-delim"></div> </li> {/strip} {/foreach} </ul> </div> <div class="tabs-mobile"> <select name="mobileTabs" id="mobileTabs"> <option value="">{$lng.lbl_quick_menu}</option> {foreach from=$speed_bar|@array_reverse item=sb name=tabs} {strip} <option value="{$sb.link|amp}"> {$sb.title} </option> {/strip} {/foreach} {*** On Sale :: alteredcart.com ***} {if $active_modules.On_Sale && $active_sales} <option value="onsale.php">DEALS</option> {/if} {*** On Sale :: alteredcart.com ***} </select> <script type="text/javascript"> $(function (){ldelim} $("#mobileTabs").val('1'); $("#mobileTabs").change(function(e) {ldelim} window.location.href = $(this).val(); {rdelim}); {rdelim}); </script> </div> {**mobile menu**} <div class="categories-mobile"> <select name="mobileCategories" id="mobileCategories"> <option value="">{$lng.lbl_categories}</option> {foreach from=$categories_menu_list item=c name=categories} {strip} <option value="home.php?cat={$c.categoryid}"> {$c.category} </option> {/strip} {/foreach} </select> <script type="text/javascript"> $(function (){ldelim} $("#mobileCategories").val('1'); $("#mobileCategories").change(function(e) {ldelim} window.location.href = $(this).val(); {rdelim}); {rdelim}); </script> </div> {**mobil Menu**} {/if}
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 06-05-2019, 09:28 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: ideal responsive template menus

I've attached 2 images of what it currently looks like in case I wasn't clear enough in my description of the problem.
Thanks.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (15).png
Views:	1070
Size:	32.8 KB
ID:	5343  Click image for larger version

Name:	Screenshot (16).png
Views:	1028
Size:	33.7 KB
ID:	5344  
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:13 PM.

   

 
X-Cart forums © 2001-2020