News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Cart Items Counter

Started by Engholm, March 15, 2013, 03:18:52 AM

Previous topic - Next topic

Engholm

Hi,

I need to show the quantity of items of the cart (0 - xx) next to a cart Icon (as shown on the attached image). My PHP-knowledge unfortunately very limited  :-\ .

Has anybody a clue, for the relevant PHP parts, what exactly to include into the template?

Cheers,
Engholm

edit: Joomla 2.5.9/ VM 2.0.18a

[attachment cleanup by admin]

PRO

you need to modify the

mod_virtuemart_cart


tmpl/default.php

this is my complete file

<?php 
//no direct access
defined('_JEXEC') or die('Restricted access');
?>
<div class="vmCartModule" id="vmCartModule"><div id="carticon" class="inline"></div><div class="total_products width59 inline"><?php echo  $data->totalProductTxt ?></div><div class="show_cart floatRight width40 bold"><?php if ($data->totalProduct) echo '<div class="floatRight">'. $data->cart_show .'</div>';?></div><div class="wrap"></div></div>


YOu can modify it with your css
http://forum.virtuemart.net/index.php?topic=90935.0

My code ONLY shows
1 icon
Total Products
The checkout link

PRO

<?php echo  $data->totalProductTxt ?>

is the # of products

Engholm

Thanks a lot! I'll try that next week.