-
AuthorPosts
-
September 11, 2017 at 11:57 am #850437
Hi.
Currently I’m trying to change the Woocommerce functionality to meet a different need. So far everything is fine, but there is one thing (or say two) that won’t work. So please take a look at the provided link.
If you click an item on the top row below the slider it will be put into the cart. So far everything is fine. But my problem is that the cart doesn’t get refreshed instantly. You have to refresh the page to see both the floating cart widget on the right edge of the screen and more importantly the “woocommerce_cart”-item in the right column. Is it somehow possible to make the cart in the right column show up as soon as someone puts the first(!) item into the cart?
It is important that the customer see both as soon as he puts something into his cart (especially if it is the first item).
My idea would be to show an empty cart instead of the “your cart is currently empty”-placeholder but to be honest, I have no idea how to do that.
Help is very much appreciated.
Thanks!
- This topic was modified 7 years, 3 months ago by Pixel_Production.
September 12, 2017 at 8:10 pm #851221Hey Pixel_Production,
First – let me tell you that the web site is amazing, really good work with the results you did.
What you need to do is a bit outside from our support policy although, so I would suggest if you really need it to consider hire a freelancer to help you out.But again – amazing work! :D
Best regards,
BasilisSeptember 13, 2017 at 9:07 am #851447Thanks Basilis, glad to hear that you like the site! But it’s a great theme too!
I don’t know when you checked the page, but I think at this time we already had included a workaround.
So far I managed to figure out that the woocommerce_cart-Element in the Avia Builder shows different content depending on the status of the shopping cart (either empty or not) and this is a WooCommerce functionality. These are the cart.php or the cart-empty.php. The cart-empty.php that is shown when the cart is empty simply has not the functionality to show the added products in real time. Of course the cart.php does.
The most simple but yet rough solution is to simply copy the content of the cart.php into the cart-empty.php – we tried this and it works, you can then customize the new cart-empty.php to some extend that it didn’t show the tables as long as the cart is empty. When you do this the added product will show up in real time as soon as you put in into the cart.
But note that this is not a good solution, since you have to change some of the core files of WooCommerce. As far as I can tell this change doesn’t cause any problems at the moment but a) can cause problems in future updates or b) will be overwritten in future updates. So I don’t recommend doing it like this.
For our need it is alright since this is just a demo for a customer who would get a custom solution in the end if he likes the functionality. And I’m pretty sure that a skilled developer can find the function that loads either the cart.php or cart-empty.php file and modify it to the extend that it only shows the cart.php (probably a simple if-function?). Anyway… for now it does what we need and that is fine.
- This reply was modified 7 years, 3 months ago by Pixel_Production.
September 14, 2017 at 8:22 pm #852293Hi,
Actually yes, cart functions ( the once you call ) can be over-writted really easy as they are already from Enfold also.
The point is that you will be able to make it easy, so you have not to worry for that at all!Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.