Mukesh Ravi Posted May 9, 2013 Share Posted May 9, 2013 Hi, I am using prestashop 1.5.3. I have just install a fresh copy of PS v1.5.3 and just transplant block cart module to left column. Now when I add a product to cart then Cart in header section is updated but cart block in left section does not updated properly. it says "No products" but cart price is updated. Same thing is happening while I delete products from cart. Some times header section cart updated and some times left section. I think this is Prestashop. If anybody has solution for this. then please help me. Link to comment Share on other sites More sharing options...
tomerg3 Posted May 9, 2013 Share Posted May 9, 2013 Check for Javascript errors. Link to comment Share on other sites More sharing options...
Mukesh Ravi Posted May 10, 2013 Author Share Posted May 10, 2013 I have checked but not found. I think this is bug in Prestashop. Please suggest me where to change and what to change? Link to comment Share on other sites More sharing options...
yaniv14 Posted May 10, 2013 Share Posted May 10, 2013 is your site live? can you post url? Link to comment Share on other sites More sharing options...
Mukesh Ravi Posted May 10, 2013 Author Share Posted May 10, 2013 Its my testing site. Here is the url: http://magento.thesparxitsolutions.com/Presta_Google/laptops/4-macbook.html Please check Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2013 Share Posted May 10, 2013 Hello, i tried to add product and the main cart (top of the page) changed well. you're probably talking about cart in left column, Am I right? Link to comment Share on other sites More sharing options...
tomerg3 Posted May 10, 2013 Share Posted May 10, 2013 Just to confirm, you did not install anything else, or made any changes to theme / module? Does it work correctly if you leave it on the right column? Link to comment Share on other sites More sharing options...
mir69 Posted May 11, 2013 Share Posted May 11, 2013 Hello, I was as well setting the cart for hours.... Just write to you my result. The cart module should be hooked only in pages header, and top of pages. Or should be hooked only in pages header, and left / or right culumns. Than it works fine, showing no.of items , refreshing the total of products after deleting one of items from the cart as well. If the cart module is hooked in page header, top of pages and as well in left / or right culumns, there will be some errors - like I have, refreshing update only after additional page refresh, or after another "delete item" button. This is my setting on fresh instal PS 1.5.4.1, will see how it goes with new template. Miro. Link to comment Share on other sites More sharing options...
vekia Posted May 11, 2013 Share Posted May 11, 2013 if we put block cart in two positions, then our front end have got two the same blocks with the same ID of elements. So, javascript reload only first of them - in this case it's a block cart in header. If we want to have got ajax block cart in one of the column - we must remove blockcart from top. after that ajax will work properly. regards Link to comment Share on other sites More sharing options...
Mukesh Ravi Posted May 13, 2013 Author Share Posted May 13, 2013 Thanks for reply. But I want to confirm that is there no way to hook cart in both "top of pages" and "left/right column" working fine. I want use in both Locations. Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2013 Share Posted May 13, 2013 It is possible but you have to prepare modifications of the .tpl file and ajax scripts (.js) ...lot of work Link to comment Share on other sites More sharing options...
Mukesh Ravi Posted May 13, 2013 Author Share Posted May 13, 2013 Yes, I am prepare for modifications. Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2013 Share Posted May 13, 2013 you have to change ajax script located here: modules/blockcart/ajax-cart.js you've got there: $('.ajax_cart_total').text($.trim(jsonData.productTotal)); you may add new jquery, where you will change the values in right / left cart block don't forget about other fields like product list, quantities etc. Link to comment Share on other sites More sharing options...
dylanhf Posted September 19, 2013 Share Posted September 19, 2013 (edited) I also was having the same problem with the cart block updating the price only but still showing 'no products' - the products don't show until I reload the page .. mir69's fix did the trick. Edited September 19, 2013 by dylanhf (see edit history) Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 Have this problem too. Cart only shows right content if I do manual page refresh... How can I fix it? Im not a pro in programming the js-File.. but I think some lines there should fix the problem.. right? Link to comment Share on other sites More sharing options...
tomerg3 Posted October 5, 2013 Share Posted October 5, 2013 If you made any changes recently, you should try to undo them. If it was always broken, you should contact the theme creator, and ask them to check it out. Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 Well I did some changes at the theme by my own. So Im the theme creator.. but not yet that familiar with presta. Did not do big changes and already tried to undo al of them but without any better result... Is there no fix in the js File? There must be a solution.... Link to comment Share on other sites More sharing options...
tomerg3 Posted October 5, 2013 Share Posted October 5, 2013 Hard to say, as you posted no relevant information about the server / or a link to the site. Did you check for any Javascript errors? Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 No...did not so far. Sorry. How can you do this? Sorry I'm not very familiar with Javascript to... Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 ahh I see my Firebug can... let me check thanks so.. Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 (edited) jep loading the page following errors come up: But this errors are not related to my problem.. as I recognized now.. please continue to my next posting.. TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { index....product (Zeile 36) TypeError: offset is null offset.top-50) {" class="errorSourceCode ">if ($(window).scrollTop() > offset.top-50) { Edited October 5, 2013 by codefritz (see edit history) Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 (edited) Okay it looks like this is the problem, if i click on the addo cart button the following error occurs: ReferenceError: jsonData is not defined ajaxCart.updateCartInformation(jsonData, addedFromProductPage); ajax-cart.js (Zeile 273) Edited October 5, 2013 by codefritz (see edit history) Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 Oh this error is clear.. it has it's origin by an own modification from me in order to solve the problem, added the following lines of code at the end of the function "add" ajaxCart.updateCartInformation(jsonData, addedFromProductPage); ajaxCart.refresh(); alert('dsd'); Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 So no javascript errors ... any help!? I've really no Idea... Link to comment Share on other sites More sharing options...
codefritz Posted October 5, 2013 Share Posted October 5, 2013 okay .. it seems to be related with some changes I'ce done in the blockuserinfo.tpl or .css Link to comment Share on other sites More sharing options...
totallighting.sk Posted January 24, 2015 Share Posted January 24, 2015 you have to change ajax script located here: modules/blockcart/ajax-cart.js you've got there: $('.ajax_cart_total').text($.trim(jsonData.productTotal)); you may add new jquery, where you will change the values in right / left cart block don't forget about other fields like product list, quantities etc. Great, it works on PS1562! Link to comment Share on other sites More sharing options...
Recommended Posts