button with number of products.

More
12 years 4 weeks ago #5507 by paul
hello
is it possible to add to a menu button the number of item on the cart?
I'm using joomla 2.5 and virtuemart 2.0

for example if I have the following menu bar, what I need is to have the number of products between brackets on the button "shoppingbag"


home contactus shoppingbag(1)

what I know is that <div class="total_products"><?php echo $data->totalProductTxt ?></div> will give me the number of product in the cart. There is a way to have it inside a button?

Thank you for any help

Please Log in or Create an account to join the conversation.

More
12 years 4 weeks ago #5508 by ced1870
Hi
this code gives you the number of product, but only in the VM module
if you want to do so you would need to do it in Javascript because it must update on any cart add/remove action.
This needs a specific development
Ced

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
12 years 4 weeks ago #5509 by paul
thank you for the quick reply,
so if I understood correctly , if I find a javascript code I can insert the javascript on a button in the maximenu ck? are there instructions for doing so?
also
when you say "This needs a specific development" do you mean to insert the VMmodule on the maximenu ck?

thank you

Please Log in or Create an account to join the conversation.

More
12 years 4 weeks ago #5511 by ced1870

do you mean to insert the VMmodule on the maximenu ck?

hum, no
but I'm not sure to really understand what you want to do. You can insert the cart module in the menu if you want
Ced

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.510 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 596 guests and no members online