celestesaad Posted February 1, 2012 Share Posted February 1, 2012 Hi everyone! I'm sorry if im posting on the wrong section here, this is my first topic on the forum. I was wondering if i could get any help with a problem I got after moving my blockcart module to the top Hook. I did a mix-up of modifications, first of all, I had to fix the extra "return;" on line 139 on the ajax-cart.js, which was blocking the cart from collapsing. Then I changed the cart to be expanded and collapsed by hovering it, as razaro showed on this topic: http://www.prestashop.com/forums/topic/51310-solved-block-cart-on-top/ . Up until here everything was fine, the cart collapsed great and the hover was working perfectly. But when I transplanted the module, after adding this to blockcart.php: function hookTop($params) { return $this->hookRightColumn($params); } My cart started looking like this: http://i.imgur.com/XpYAr.jpg I'm sure I missed something I else I had to change to make it work right. Link to comment Share on other sites More sharing options...
celestesaad Posted February 1, 2012 Author Share Posted February 1, 2012 By the way here's the site > http://www.coolsupertest.com.ar/ Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 2, 2012 Share Posted February 2, 2012 Hello, You have a javascript error: Error: $("#slideshow").cycle is not a function Source File: http://www.coolsupertest.com.ar/ Line: 54 This might be preventing the cart from collapsing/expanding. Link to comment Share on other sites More sharing options...
celestesaad Posted February 2, 2012 Author Share Posted February 2, 2012 No, that's the trigger for a slideshow I'm trying to place on the newproducts block (which is not working anyway). I removed it you know, just to be sure, but nothing happened, my cart's still stuck. Any ideas? Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 3, 2012 Share Posted February 3, 2012 Hello, The error is still there and as it is placed before the other scripts, this error prevents the execution of the following scripts. $(document).ready(function() { $('#slideshow').cycle({ fx: 'blindY' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); }); This section of the code uses jQuery, but jQuery is included after it, so it is not recognised and triggers the error. Link to comment Share on other sites More sharing options...
celestesaad Posted February 3, 2012 Author Share Posted February 3, 2012 I commented that part yesterday, after I read your post. Lemme double check but Im pretty sure I replaced the files. Edit: I hadn't, but I just did and again, nothing changed Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 3, 2012 Share Posted February 3, 2012 I commented that part yesterday, after I read your post. Lemme double check but Im pretty sure I replaced the files. Edit: I hadn't, but I just did and again, nothing changed Hello, There's something wrong with the javascript file, I'm looking into it right now. 1. You have an extra error: Error: $("#productscategory_list").serialScroll is not a function Source File: http://www.coolsupertest.com.ar/modules/productscategory/productscategory.js Line: 53 /js/jquery/jquery.serialScroll-1.2.2-min.js should be included before /modules/productscategory/productscategory.js 2. The html structure in the slideshow div is wrong, you're missing the <ul> tag Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 3, 2012 Share Posted February 3, 2012 Couldn't interpret product-cycle.js as it is minified, but you will not be able to use it with $(document).ready(function() { $('#slideshow').cycle({ fx: 'blindY' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); }); From where do you have the product-cycle.js ? Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 Dwnloaded it directly from the author's website, right here: http://jquery.malsup.com/cycle/ As for the /js/, I didn't select the order in which the files are loaded, i think they're loaded in the header through this: {if isset($js_files)} {foreach from=$js_files item=js_uri} <script type="text/javascript" src="{$js_uri}"></script> {/foreach} {/if} Im gonna fix that <ul> thing right now, see if that works out. Thank you so much for your help =) Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 Actually, the ul is right there Here's the code: <!-- MODULE Block new products --> <div id="new-products_block_right" class="block products_block"> <h4><a href="{$link->getPageLink('new-products.php')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></h4> <div class="block_content"> {if $new_products !== false} <ul class="product_images clearfix" id="slideshow"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 3} <li><a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a></li> {/if} {/foreach} </ul> {else} <p>{l s='No new products at this time' mod='blocknewproducts'}</p> {/if} </div> </div> <br clear="all" /> <!-- /MODULE Block new products --> Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 6, 2012 Share Posted February 6, 2012 Hello, The UL shows up now. As for the cycle script download this version : http://malsup.github.com/jquery.cycle.all.js and replace it with the existing one. Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 I didn't change anything regarding the ul Either way, I noticed that after friday, ajax is not working. Like, at all. My top menu doesn't work the way it should, and the right categories are not displayed once you enter into the view product section. what the hell? Chrome's console says: Uncaught TypeError: Object [object Object] has no method 'serialScroll' product.js:417 Uncaught TypeError: Object [object Object] has no method 'cycle' product.php:68 These are the default files from prestashop, I haven't changed any of them. The only things I have changed are the .tpls inside the theme folder, and added some .js files. I don't understand how im suddenly getting errors on files I havent touched. I've already replaced the packed version with the one you said It's still not working but i'm guessing it should be easier to debug it now, right? Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 6, 2012 Share Posted February 6, 2012 Hello, The cycle works in Firefox now and no errors are displayed. However your cart's expand/collapse is still not working....looks like the problem is with a Jquery selector, as the cart is not in the right nor left column. My top menu doesn't work the way it should, and the right categories are not displayed once you enter into the view product section Please explain. Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 Yeah, i can see that its working great on FF, Safari, and IE9 & Chrome. Thank you! EDIT: about the top menu, I just cleared my cache and it works fine, I'm guessing it was all related to that cycle thing. Thank you again. All I've got left is fixing that cart! yay! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 6, 2012 Share Posted February 6, 2012 The cycle works in Chrome and IE9 too. "comprar" which is "buy", you'll see that the product doesn't move smoothly to the cart section, but it actually reloads the whole page Have you disabled the ajax cart? It even had a nice sutil fade effect when coming in and out, but no more. As you can see on the first pic, it had rounded borders, and an arrow on the top link (category) on it's right to allow users to display it.The menu doesn't have any style added to it, which would make it round.The slide/grow effect works in FF, Chrom and IE9 Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 No, just scrap that part about the top menu and ajax, because as i edited the previous post, it was just my cache playing tricks on me lol. Thanks again, only thing left is that cart! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 6, 2012 Share Posted February 6, 2012 Try: 1. edit ajax-cart.js 2. change expand : function(){ $(['left_column', 'right_column']).each(function(id, parentId) to expand : function(){ $(['left_column', 'right_column', 'header_right']).each(function(id, parentId) Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 It WORKED! thank you SO MUCH! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 6, 2012 Share Posted February 6, 2012 Line 91. Link to comment Share on other sites More sharing options...
celestesaad Posted February 6, 2012 Author Share Posted February 6, 2012 Ooook just a small problem now that I've tried to figure out for the past 2 hours...When a product is loaded in the cart and you try to delete it, you have to refresh the whole web page to see it reflected. When you click on delete, nothing happens until you refresh it. Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 7, 2012 Share Posted February 7, 2012 Hello, Have you modified the ajax-cart.js to have the cart expand/collapse on mouseover? Can't click on remove because the cart is disappearing. Link to comment Share on other sites More sharing options...
celestesaad Posted February 7, 2012 Author Share Posted February 7, 2012 yeah, I modified it so it does that on mousehover. Dont move the mouse too soon I guess, It's working fine for me If you cant remove it, add a new one. You'll see it doesnt update that automatically either Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 8, 2012 Share Posted February 8, 2012 From browser it's hard to debug, but the problem might be that the event is not binded to the element. To find out the exact problem you could add alert() - s to the script to see which operations are not being executed. Link to comment Share on other sites More sharing options...
celestesaad Posted February 8, 2012 Author Share Posted February 8, 2012 Did that just now. I've also added 'header_right' to each: function(){ $(['left_column', 'right_column', 'header_right']).each(function(id, parentId) What happens now is that it refreshes the page everytime you add a product and it takes you directly to checkout. It also says "undefined" when its loading the new page. Link to comment Share on other sites More sharing options...
celestesaad Posted February 8, 2012 Author Share Posted February 8, 2012 Nevermind, i fixed it thanks to your lead Thank you for all your help, much appreciated! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 8, 2012 Share Posted February 8, 2012 Happy we could help. Please mark the topic as solved. 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