JeroenJK Posted May 22, 2014 Share Posted May 22, 2014 Hi, In the webshop I built, there was a shopping cart on the bottom of the pages. (Leoconv theme) We wanted to have one in the top, so I did that (see http://www.tourpro.nl/ how it is now) The shopping cart on the bottom of the page refreshes automatically, but the one in the top doesn't. I have experience with HTML & PHP, but not with JavaScript and AJAX. My question is; how can I make it refresh everytime something changes? The code I use now: <!-- WINKELAGEN --> <div id="headerWinkelwagen"> <a href="/order"> <img src="{$img_dir}icon/winkelwagen.png" style="width:70px; height:52px; margin:3px;"/> {$cart_qties} {if $cart_qties == 1} product {else} producten {/if} {if $cart_qties > 0} {if $priceDisplay == 1} ({convertPrice price=$cart->getOrderTotal(false)}) {else} ({convertPrice price=$cart->getOrderTotal(true)}) {/if} <span style="font-size: 10px;">incl. BTW & verzending</span> {/if} </a> </div> <!-- WINKELWAGEN --> Thank you for any responses! Link to comment Share on other sites More sharing options...
NemoPS Posted May 23, 2014 Share Posted May 23, 2014 This will never update as there is no reference to that id in ajax-cart.js You can clone the other cart to make things easier, but then you will have duplicate ids (which is not good) and both might stop working. So, you probably have to go through all the ajax-cart.js file methods that update the cart (there are many, can't remember them all by heart) and update both your instances using either 2 different ids or classes 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