- Priority: 0
- Status: Closed
- Theme: Venedor
-
Assigned To:
Marek
- Private: No
- Open Date: 26.08.18, 16:55
- Opened by: Ruslan Polukarov
- Closed by: Marek
- Closed on: 16.11.18, 18:26
- Reason: Closed
- Comment: Glad to help!
Ticket #12791 - Content of the cart does not appear on mouse over
After adding product to the cart, contents of the cart does
not appear on mouse over, it’s appear only after updating page
or entering another page.
The same issue like in the Ticket #12451
but cart is working on mouse over in previouse Venedor http://venedor.promokit.eu/en/
Comments
Hi, Ruslan.
Sorry for the delay, I was on vacation these days.
As for your question, yes, there is such “problem” but it comes not from the theme. Prestashop doesn’t use ajax to generate cart “on fly”, that’s why the page require to be reloaded to show updated cart.
Hi, Marek!
And what about previous theme on PS 1.6 it’s perfectly working http://venedor.promokit.eu/en/ in that theme used Ajax for refreshing?
Yes, right, that is the difference between 1.6 and .17
Hi, Marek!
I changed a bit some files and now Cart is working on mouse over. You can check it om my domain.
1. I removed {if isset($pkts.mini_cart)} {if file_exists($pkts.mini_cart)} from ps_shoppingcart.tpl after that product miniature appeared in the mini-cart
2. Changed data-link-action=”delete-from-cart” in mini-product.tpl it was remove-from-cart, and now it does not redirect on checkout page when we click remove product button in mini-cart.
3. I am not really good with js but took your code, change selectors and put it in ps_shoppingcart.js, please have a look and correct in a better way…
Hi, Ruslan.
First of all I would like to thank you for your suggestions.
1 and 2 has been implemented into the theme
3. What exactly did you change in .js file and what was a goal?
Hi Marek. I’ve noticed that after click on Add-to-Cart button disappeared “event”- listener from dd_el element (<div class=”header dd_el relative h-100”>),
so I just put event listener to anorher element #desktop_cart (<div id=”desktop_cart” class=”h-100”>) and revrite selectors in js. Maybe you can
correct your script that event does not dissapear after “add to cart” click.
I addet to ps_shoppingcart.js
this function:
$(document).ready(function () {
});
Yes, your solution is correct. I’ll implement it too