SpottedSparrow Posted March 21, 2012 Share Posted March 21, 2012 I purchased a template that uses the TM Categories module. Unfortunately, the template has proved less than stellar and I've had a horrible time getting support for it. The module uses Javascript to display subcategory drop-down menus upon hover. For some reason these drop-down menus are always being displayed on the Cart page. Although I'm well-versed in HTML and can usually find my around PHP, I'm lost when it comes to Javascript. http://www.spottedsparrow.com/order Can you help? I can happily provide the module docs as needed. Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 21, 2012 Share Posted March 21, 2012 Hello, You have this Javascript error: Timestamp: 3/21/2012 4:08:42 PM Error: missing ) after argument list Source File: https://www.spottedsparrow.com/themes/spottedsparrow/cache/406d457e373550ccb7133f88b2ffe768.js Line: 210 Source Code: {if(window.ajaxCart!==undefined) You should turn off cache, so we can determine which js file is this exactly. 1 Link to comment Share on other sites More sharing options...
Fyz83 Posted March 21, 2012 Share Posted March 21, 2012 i have the same problem http://www.pricefoot.com/ Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 21, 2012 Share Posted March 21, 2012 i have the same problem http://www.pricefoot.com/ Your problem is different: Timestamp: 3/21/2012 4:18:06 PM Error: $("#search_query_top").autocomplete is not a function Source File: http://www.pricefoot.com/ Line: 101 You do not have the autocomplete UI for jquery. http://jqueryui.com/demos/autocomplete/ Link to comment Share on other sites More sharing options...
Fyz83 Posted March 21, 2012 Share Posted March 21, 2012 All right thank you very much! but I am a newbie and I do not know how to fix this problem, Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 21, 2012 Share Posted March 21, 2012 First check if the file is on the server. It should be in 'js/jquery/jquery.autocomplete.js' Link to comment Share on other sites More sharing options...
Fyz83 Posted March 21, 2012 Share Posted March 21, 2012 sorry, yes i have this one Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 21, 2012 Share Posted March 21, 2012 You do not have the 'blocksearch' module installed, right? Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 21, 2012 Share Posted March 21, 2012 Actually it is installed, but not visible on the home page. You should check now in 'modules/blocksearch/bocksearch.php' if you have these lines: Tools::addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); Link to comment Share on other sites More sharing options...
Fyz83 Posted March 21, 2012 Share Posted March 21, 2012 Yes "Quick Search block" it's installed but not "Blocksearch" and ys i have these lines Link to comment Share on other sites More sharing options...
Fyz83 Posted March 21, 2012 Share Posted March 21, 2012 I have to modify this file? Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 22, 2012 Share Posted March 22, 2012 Blocksearch is the folder name of the "Quick Search block". You might need to edit some files, as the js is not included. Please post the content of blocksearch.php Link to comment Share on other sites More sharing options...
SpottedSparrow Posted March 22, 2012 Author Share Posted March 22, 2012 Thanks very much for your reply. Force compile is now on and cache is off. On closer inspection, this is happening on all SSL pages, not just the cart page. The code in the superfish.js file that came with the module is below: /* * Superfish v1.4.8 - jQuery menu widget * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt */ ;(function($){ $.fn.superfish = function(op){ var sf = $.fn.superfish, c = sf.c, $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), over = function(){ var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function(){ var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} },o.delay); }, getMenu = function($menu){ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { if (o.autoArrows) addArrow( $('>a:first-child',this) ); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a = $('a',this); $a.each(function(i){ var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); }); o.onInit.call(this); }).each(function() { var menuClasses = [c.menuClass]; if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf = $.fn.superfish; sf.o = []; sf.op = {}; sf.IE7fix = function(){ var o = sf.op; if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off'); }; sf.c = { bcClass : 'sf-breadcrumb', menuClass : 'sf-js-enabled', anchorClass : 'sf-with-ul', arrowClass : 'sf-sub-indicator', shadowClass : 'sf-shadow' }; sf.defaults = { hoverClass : 'sfHover', pathClass : 'overideThisToUse', pathLevels : 1, delay : 800, animation : {opacity:'show'}, speed : 'normal', autoArrows : true, dropShadows : true, disableHI : false, // true disables hoverIntent detection onInit : function(){}, // callback functions onBeforeShow: function(){}, onShow : function(){}, onHide : function(){} }; $.fn.extend({ hideSuperfishUl : function(){ var o = sf.op, not = (o.retainPath===true) ? o.$path : ''; o.retainPath = false; var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility','hidden'); o.onHide.call($ul); return this; }, showSuperfishUl : function(){ var o = sf.op, sh = sf.c.shadowClass+'-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; } }); })(jQuery); Hello, You have this Javascript error: Timestamp: 3/21/2012 4:08:42 PM Error: missing ) after argument list Source File: https://www.spotteds...3f88b2ffe768.js Line: 210 Source Code: {if(window.ajaxCart!==undefined) You should turn off cache, so we can determine which js file is this exactly. Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 22, 2012 Share Posted March 22, 2012 This seems to be ok. But you have another error displayed in https://www.spottedsparrow.com/themes/spottedsparrow/js/cart-summary.js This is incorrect: $(document).ready(function() baseDir="spottedsparrow.com" { baseDir="spottedsparrow.com" should be moved above $(document).ready(function() 1 Link to comment Share on other sites More sharing options...
SpottedSparrow Posted March 22, 2012 Author Share Posted March 22, 2012 It seems enabling smart cache for Javascript is causing the problem. I fixed the cart-summary.js code per your instructions. The problem was still there after I re-enabled the cache, but went away as soon as I ticked 'keep Javascript as original'. Thanks again for your help. It's very much appreciated. Link to comment Share on other sites More sharing options...
Fyz83 Posted March 22, 2012 Share Posted March 22, 2012 Thank you! so i have one "block search" folder in /www/modules/blocksearch/blocksearch.php : if (!defined('_PS_VERSION_')) exit; class BlockSearch extends Module { public function __construct() { $this->name = 'blocksearch'; $this->tab = 'search_filter'; $this->version = 1.0; $this->author = 'PrestaShop'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Quick Search block'); $this->description = $this->l('Adds a block with a quick search field.'); } public function install() { if (!parent::install() OR !$this->registerHook('top') OR !$this->registerHook('leftColumn') OR !$this->registerHook('rightColumn') OR !$this->registerHook('header') ) return false; return true; } public function hookHeader($params) { if (Configuration::get('PS_SEARCH_AJAX')) { Tools::addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); } Tools::addCSS(_THEME_CSS_DIR_.'product_list.css'); Tools::addCSS(($this->_path).'blocksearch.css', 'all'); } public function hookLeftColumn($params) { return $this->hookRightColumn($params); } public function hookRightColumn($params) { $this->_hookCommon($params); return $this->display(__FILE__, 'blocksearch.tpl'); } public function hookTop($params) { $this->_hookCommon($params); return $this->display(__FILE__, 'blocksearch-top.tpl'); } /** * _hookAll has to be called in each hookXXX methods. This is made to avoid code duplication. * * @param mixed $params * @return void */ private function _hookCommon($params) { global $smarty; $smarty->assign('ENT_QUOTES', ENT_QUOTES); $smarty->assign('search_ssl', (int)Tools::usingSecureMode()); $smarty->assign('ajaxsearch', Configuration::get('PS_SEARCH_AJAX')); $smarty->assign('instantsearch', Configuration::get('PS_INSTANT_SEARCH')); return true; } } and i have a www/themes/themexxx/modules/blocksearch/blocksearch-top.tpl Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 22, 2012 Share Posted March 22, 2012 @SpottedSparrow Happy we could help. @Fyz83 do you still have the issue? Link to comment Share on other sites More sharing options...
Fyz83 Posted March 22, 2012 Share Posted March 22, 2012 Yes my problem is not resolved thanks in advance Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 22, 2012 Share Posted March 22, 2012 Try the following modification: //if (Configuration::get('PS_SEARCH_AJAX')) //{ Tools::addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); //} Link to comment Share on other sites More sharing options...
Fyz83 Posted March 22, 2012 Share Posted March 22, 2012 in the blocksearch.php file? Link to comment Share on other sites More sharing options...
Fyz83 Posted March 22, 2012 Share Posted March 22, 2012 there is the template demo of my website: http://www.inputcreativos.es/gestion/catalogo/visor.php?id=Njgx Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 23, 2012 Share Posted March 23, 2012 in the blocksearch.php file? yes Link to comment Share on other sites More sharing options...
Fyz83 Posted March 23, 2012 Share Posted March 23, 2012 Ok but i don't see the difference between those lines { if (Configuration::get('PS_SEARCH_AJAX')) { Tools::addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); and yours //if (Configuration::get('PS_SEARCH_AJAX')) //{ Tools::addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); //} I have to change the lines or put your lines in the end of the file? sorry i'm a noob... Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 23, 2012 Share Posted March 23, 2012 // - this marks a comment. The line that has is at the start will be ignored. Link to comment Share on other sites More sharing options...
Fyz83 Posted March 23, 2012 Share Posted March 23, 2012 GREAT you're so good !! but in my back office i have the error : modules suivants can't be load: blocksearch (erreur de syntaxe dans /modules/blocksearch/blocksearch.php) blocksearch (classe manquante dans /modules/blocksearch/blocksearch.php) that's a problem? Link to comment Share on other sites More sharing options...
Fyz83 Posted March 25, 2012 Share Posted March 25, 2012 I can't see the tm block banner 1,2 and 3 in the back office since this modification , those banner works but there are invisible in the back office, i think this is a consequence of this script you don't know? Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 26, 2012 Share Posted March 26, 2012 Seems like you made other modifications too or didn't make them correctly. Turn on error reporting. Link to comment Share on other sites More sharing options...
Fyz83 Posted March 29, 2012 Share Posted March 29, 2012 i'm sure that's when i past your the blocksearch code because when i cut this one, i can see some modules in my Back office (but the problem comeback) but when i re-past the code i can't see them. it's not a big trouble but it's annoying :s I have juste put your code in the end of the block search.php that's no correct? Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 30, 2012 Share Posted March 30, 2012 No, it is not correct. Link to comment Share on other sites More sharing options...
Fyz83 Posted March 30, 2012 Share Posted March 30, 2012 ok i will try different kind of position to past the code. thank you very much cartexpert have a nice day Link to comment Share on other sites More sharing options...
CartExpert.net Posted April 2, 2012 Share Posted April 2, 2012 ok i will try different kind of position to past the code. thank you very much cartexpert have a nice day Please check if the Ajax search is enabled. Go to Back office, Preferences tab, Search sub-tab. If it's disabled enable it and reset your blocksearch.php to the original state. Link to comment Share on other sites More sharing options...
ayor777 Posted April 9, 2012 Share Posted April 9, 2012 Hi CartExpert.net, I purchased a template (#36032 from "http://www.templatemonster.com/prestashop-themes/36023.html") that uses the TM Categories module, I think.. Uaunfortunately, the template is not working properly.. The module displays subcategory drop-down menus upon hover. For some reason these drop-down (sub-subcategories) menus are always being displayed on the Cart page (on subcategory). Or more shortly described: On my webshop there are sub-subcategories under subcategories, but the sub-subcategories are not droping down like the subcategories and the sub-subcategories are displyed on subcategories cart. Please help me to rezolve this issue! Best regards, ayor777 Link to comment Share on other sites More sharing options...
ungoliand Posted June 27, 2012 Share Posted June 27, 2012 (edited) I have a similar problem, my menus not drop-down. my website: http://www.ikocenter.com Edited June 27, 2012 by ungoliand (see edit history) Link to comment Share on other sites More sharing options...
bujufer Posted August 14, 2012 Share Posted August 14, 2012 i have a same proble the categories dont do drop menu is a java problem or engine incompatibility, template moster support say me: downgrade my prestashop version for work properly } my site: www.heberzl.com/shop please help me i going crazy!!! Link to comment Share on other sites More sharing options...
mir-aus Posted October 9, 2012 Share Posted October 9, 2012 I have same problem Link to comment Share on other sites More sharing options...
DenPH Posted June 17, 2013 Share Posted June 17, 2013 Strangely? On my website does not displays the category. http://цветы-пхукет.рф/ Maybe this is due to the fact that PrestaShop 1.5.4.1 Link to comment Share on other sites More sharing options...
solidfr Posted July 1, 2013 Share Posted July 1, 2013 I have a same problem my template is for prestashop 1.4.8.2 and i have installed prestashop 1.4.8.2 for the template but i have no sub-menu !!!! I think there are lot of probleme with this menu !!! Prestashop please react for everybody !!! Excuse my bad english ! Link to comment Share on other sites More sharing options...
larsky Posted July 23, 2013 Share Posted July 23, 2013 (edited) The problem with the theme not displaying the submenu is "sort-of" solved by adjusting the global.css. I am in no way a css/php/tpl expert, not even close, so my fix is most likely far from correct, but does the job for correctly showing one sub-level. Sub-subs are still not displaying right though! Maybe someone can give me a hint on that... Check it out here Here is what i did in the themes global.css: Around line 532, replace /* ————— tmcategories.tpl ————— */ #tmcategories {height:54px; margin-bottom:20px; background:url(../img/images/tmcategories.gif) left top repeat-x; padding-top:0px; border-radius:0 0 3px 3px;} #cat {} #cat > li {float:left;position:relative;z-index:100; border-right:1px solid #484e56;} #cat > li + li {margin:0 0 0 0;} #cat > li > a {height:40px;display:block;padding:14px 20px 0 20px;background:url(../img/images/cat_active.gif) left top repeat-x;font:normal 15px/24px "Arial";color:#fcfbfb;text-decoration:none; text-transform:uppercase; -moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;} #cat > li:first-child > a { border-radius:0 0 0 3px;} #cat > li:hover > a, #cat > li > a.selected { background-position:left bottom; color:#fff;} #cat li ul.subcat {width:200px;background:#212121;position:absolute;left:0;top:54px;display:none; padding:5px 0 5px 0;} #cat li:hover ul.subcat {} #cat ul.subcat li {padding:0px 20px 0 20px;position:relative; border-top:1px solid #383838;} #cat ul.subcat li:first-child { border:none;} #cat ul.subcat li.last {padding-bottom:;} #cat ul.subcat li a {color:#747575;text-decoration:none; font:normal 12px/30px Arial, Helvetica, sans-serif;padding:0; background:url(../img/images/cat-marker.gif) right center no-repeat; display:block; } #cat ul.subcat li a:hover, #cat ul.subcat li a.selected { font-weight:normal; color:#fff;} #cat ul.subcat li ul.subcat {left:200px;top:-5px;} with: /* ————— tmcategories.tpl ————— */ #tmcategories {height:54px; margin-bottom:20px; background:url(../img/images/tmcategories.gif) left top repeat-x; padding-top:0px; border-radius:0 0 3px 3px;} #cat {} #cat > li {float:left;position:relative;z-index:100; border-right:1px solid #484e56;} #cat > li + li {margin:0 0 0 0;} #cat > li > a {height:40px;display:block;padding:14px 20px 0 20px;background:url(../img/images/cat_active.gif) left top repeat-x;font:normal 15px/24px "Arial";color:#fcfbfb;text-decoration:none; text-transform:uppercase; -moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;} #cat > li:first-child > a { border-radius:0 0 0 3px;} #cat > li:hover > a, #cat > li > a.selected { background-position:left bottom; color:#fff;} #cat li ul.subcat {width:200px;background:#212121;position:absolute;left:0;top:54px;display:none; padding:5px 0 5px 0;} #cat li:hover ul.subcat {width:200px;background:#212121;position:absolute;left:0;top:54px;display:block; padding:5px 0 5px 0;} #cat ul.subcat li {padding:0px 20px 0 20px;position:relative; border-top:1px solid #383838;} #cat ul.subcat li:first-child { border:none;} #cat ul.subcat li.last {padding-bottom:;} #cat ul.subcat li a {color:#747575;text-decoration:none; font:normal 12px/30px Arial, Helvetica, sans-serif;padding:0; background:url(../img/images/cat-marker.gif) right center no-repeat; display:block; } #cat ul.subcat li a:hover, #cat ul.subcat li a.selected { font-weight:normal; color:#fff;} #cat ul.subcat li ul.subcat {left:200px;top:-5px;} Edited July 23, 2013 by larsky (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now