I am running Virtuemart 2.0.18. I need for what you want to achieve , is to display the total number of products in the cart with a number such as " 10 " simply . If you have an image to the cart , I want to place next to the image .
I found a similar question , but the answer is applied - did not work in my situation nor .
I have found this thread on stackoverflow: to display the number of items in the cart in virtuemart joomal 2.5?
It did not solve my problem the solution :
Code : [Select]
< ? PHP
$ Array = unserialize (['vmcart'] $ _SESSION [' a __ vm']);
Total $ = 0;
{ - ( as > product $ product $ array ) of foreach
$ Total + = $ product - > amount ;
}
" Total product : " echo . Total $ ;
? >
I just works if you go to ( like running on the cookie cart ) cart . If you want to add some products to count the number is off , PHP will not work me. Whole code does not work at all basically .
The same way as what is to do this in PHP or there , Do you have any JavaScript to access the cookies , we will continue to get the amount of product in the cart ?
Thank you in advance for your help , I really appreciate it !
Please look at the code of virtuemart cart MODUL, you will find what you need there
In addition , you can create an override to use this MOD
No comments:
Post a Comment