nicolas wrote: Hi,
The best would be to use a HikaShop mini cart configured to display only the count number.
Because otherwise, it's a lot more complex. You need to add javascript to that code to be triggered upon add to cart success, you need to then do an ajax request in your javascript to call a specific URL of your website and then customize something (create a plugin for example) to catch that URL and return the number so that you can then update the display. Basically, do the same thing than the cart module we already have.
If you're not a skilled developer it will be difficult to achieve and I can't provide an easy solution to that besides using the HikaShop cart module.
That is unfortunate because I am moving to the new ajax cart and this makes it impossible for me to fully do so. Unfortunately that will not work in my situation. I have a cart module that shows the number, but when you click on the number it expands the cart and shows the "1 items for $10" or whatever the price is. I am a fairly skilled php developer. However, I do not know ajax at all which makes it impossible for me to do this. Below are the pictures attached of what I am trying to achieve. I tired just displaying the $html output twice and just using css to only display the number in 1 area however, that does not work because it causes a javascript error, likely because the ajax is loading twice in 1 page through the $html output.
Also, I have the checkout itself working pretty well in ajax and it does not really make any sense to leave the add to product button in a non ajax environment. This is a very large client and I am guessing legacy mode will either go away at some point or not be supported so I want everything in non legacy mode. It is not cost effect to have to do 2 separate upgrades either.
This seems ridiculous to do so but would it work to load 2 carts inside of each other 1 that is just displaying the quantity and 1 that displays everything else? I would basically display a module position inside the other modules layout override to achieve this or would I get this also cause some sort of conflict?
Also, I have another question and since it mostly related I figured I would just ask it here. I noticed another issue. When you are using the ajax checkout and you login if you have a login box on your site since ajax is being used the state on the login box does not change because the page is not reloading. This is an issue because it appears like you are not logged in until get further through the checkout. Also, I noticed when you login when using the ajax checkout it logs you in but does not scroll you to the top of the page content after logging in so it appears you did not actually log in how do I address this?