rh1n0 Posted March 13, 2013 Share Posted March 13, 2013 We're using the 'Blank Canvas' theme ( http://www.prestashop.com/forums/topic/175497-prestashop-theme-boilerplate-a-blank-canvas-theme-for-developers/ ) and have been adapting it for our needs and fixing issues here and there, but we're stumped on this one. On the Order History page where it lists the customer's orders, when you click one of the orders, the order details do not appear. Just installed it on another Prestashop installation and it suffers the same issue. What's strange though, is if you have the Blank Canvas theme enabled and go to the Order History page, then change the theme to the default, then click the order details, it DOES display the information (after un-hiding the div via browser developer tools). So far we've been able to solve all the issues with some searching and trial and error, but this one has us especially confused. If someone knows what javascript/other files are referenced when clicking the view details link, I'm sure that would give us a solid starting point for solving the issue. Any pointers would be much appreciated! Thanks. Link to comment Share on other sites More sharing options...
rh1n0 Posted March 13, 2013 Author Share Posted March 13, 2013 Appears the issue lies within the history.js file, where it calls this bit of code: $(this).html(data); In the default theme, it contains the exact div + contents we expect to see (div #block-order-detail). In the blank canvas theme it contains the entire page HTML, plus the div that we expect. Any advise on how to manipulate that? :\ Link to comment Share on other sites More sharing options...
rh1n0 Posted March 14, 2013 Author Share Posted March 14, 2013 Never mind, I fixed it. Sorry for the triple-post! ._. Link to comment Share on other sites More sharing options...
cowboywind Posted April 12, 2013 Share Posted April 12, 2013 Rh1nO I have the same problem. The case is I am not a expert like you in Prestashop. Could you tell us the solution you have implemented? Tks. Link to comment Share on other sites More sharing options...
rh1n0 Posted April 13, 2013 Author Share Posted April 13, 2013 Rh1nO I have the same problem. The case is I am not a expert like you in Prestashop. Could you tell us the solution you have implemented? Tks. The fix involved the following changes, from what I can remember at least... In order-detail.tpl Find: {if count($messages)} Add this after: <!--openComment--> Also add this to the very bottom of the file: <!--closeComment--> In history.js Find the following code: function sendOrderMessage() { paramString = "ajax=true"; $('form#sendOrderMessage').find('input, textarea').each(function(){ paramString += '&' + $(this).attr('name') + '=' + encodeURI($(this).val()); }); $.ajax({ type: "POST", url: $('form#sendOrderMessage').attr("action"), data: paramString, success: function (msg){ $('#block-order-detail').fadeOut('slow', function() { $(this).html(msg); //catch the submit event of sendOrderMessage form $('form#sendOrderMessage').submit(function(){ return sendOrderMessage(); }); $(this).fadeIn('slow'); }); } }); return false; } And replace it all with the following: function sendOrderMessage() { paramString = "ajax=true"; $('#sendOrderMessage').find('input, textarea').each(function(){ paramString += '&' + $(this).attr('name') + '=' + escape($(this).val()); }); $.ajax({ type: "POST", url: $('#sendOrderMessage').attr("action"), data: paramString, success: function (msg){ $('#block-order-detail').fadeOut('slow', function() { ind1 = msg.indexOf("<!--openComment-->"); if (ind1 > 1){ msg = msg.substr(ind1); ind2 = msg.indexOf("<!--closeComment-->"); msg = msg.substr(0,ind2); } $(this).html(msg); //catch the submit event of sendOrderMessage form $('#sendOrderMessage').submit(function(){ return sendOrderMessage(); }); $(this).fadeIn('slow'); }); } }); return false; } As usual, please make backups before attempting any of the above changes. Hopefully that works for you, I forget if that's all that needed to be changed as it was so long ago now, and have found and fixed so many other things since then, as well as some things still unsolved that we just decided to remove. Link to comment Share on other sites More sharing options...
lolitalapreciosa Posted April 25, 2013 Share Posted April 25, 2013 hi cowboywind , did you fixed it with the instructions of Rh1n0?? I am having the same issue, I tried everyhting and nothing works I tried to get some help at the forum but noone is helping. Please, my shop its finished and I cant find antone to fix this Link to comment Share on other sites More sharing options...
rh1n0 Posted April 25, 2013 Author Share Posted April 25, 2013 Did you try my proposed fix? Unfortunately, the support here isn't very helpful at times - as hard as they try, it's hard to get to everything. I found out the hard way you have to get your hands dirty. Things don't often fix themselves. Link to comment Share on other sites More sharing options...
lolitalapreciosa Posted April 26, 2013 Share Posted April 26, 2013 Hi rhin0Yes a tried your proposal but it did not work for me. Thank you even for writing me , I was feeling very stupid talking to the wind. Today I am going to try to download the new prestashop and change those files you changes ....I will back up first because I really dont know waht I am doing thank you, if you ever need help with a recipe like paella, cookies or brownie, contact me, with presatshop I wont be any help Link to comment Share on other sites More sharing options...
mhu100 Posted March 22, 2014 Share Posted March 22, 2014 I've had the same problem. My solution: Open header.php and add: _THEME_JS_DIR_.'history.js', $js_files = array( __PS_BASE_URI__.'js/jquery/thickbox-modified.js', __PS_BASE_URI__.'js/jquery/jquery.idTabs.modified.js', __PS_BASE_URI__.'js/jquery/jquery.scrollto.js', __PS_BASE_URI__.'js/jquery/jquery.serialScroll.js', _THEME_JS_DIR_.'tools.js', _THEME_JS_DIR_.'history.js', _THEME_JS_DIR_.'product.js' ); Link to comment Share on other sites More sharing options...
Araviel Posted June 27, 2014 Share Posted June 27, 2014 I've had the same problem. My solution: Open header.php and add: _THEME_JS_DIR_.'history.js', $js_files = array( __PS_BASE_URI__.'js/jquery/thickbox-modified.js', __PS_BASE_URI__.'js/jquery/jquery.idTabs.modified.js', __PS_BASE_URI__.'js/jquery/jquery.scrollto.js', __PS_BASE_URI__.'js/jquery/jquery.serialScroll.js', _THEME_JS_DIR_.'tools.js', _THEME_JS_DIR_.'history.js', _THEME_JS_DIR_.'product.js' ); how header.php ? what folder ? it can't be the one in root... Link to comment Share on other sites More sharing options...
mhu100 Posted June 27, 2014 Share Posted June 27, 2014 how header.php ? what folder ? it can't be the one in root... It's the one in the root Link to comment Share on other sites More sharing options...
rh1n0 Posted October 8, 2014 Author Share Posted October 8, 2014 I had this issue again after our SEO company told us to get our pages loading faster, which involved some of the cache/minifying options in Advanced Parameteres - > Performance, looks like, for me at least, Minify HTML after "smarty compile" execution causes the order details to break - have reverted to Keep HTML as original. I did also find in my searches that others experienced problems with template cache or the cache option in general, in some cases just disabling cache and testing, then re-enabling cache fixed it - for whatever reason. Prestashop is weird, as I'm sure we all know. Hope that helps someone. Link to comment Share on other sites More sharing options...
tony1dk Posted January 10, 2015 Share Posted January 10, 2015 that reply helped rh1n0 I disabled ( Move JavaScript to the end ) and now I can see order details very strange , but everything is working now thanks been looking for that a long time thanks Link to comment Share on other sites More sharing options...
Lyn&Or Bijoux Posted March 23, 2015 Share Posted March 23, 2015 Hi! After trying everything on the subject on a lot of topics, this is working: desactivate Move JavaScript to the end PS 1.6 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