Joomla/Virtuemart get shopper group id and write if then

My site is running Joomla/Virtuemart and is using shopping groups to apply a %20 discount to users that are part of a certain group. I want to display a line below the price that reads "your 20% member discount has been applied"

I've been able to locate the file and write the line but I'm unable to get the value of the current shoppers group. The line should only appear if they are members of the "Members" group.

You can see the page here: [url removed, login to view]

log in using



Below is the code I'd like you to modify. You will need to replace the line $shoppergroup = 'Members'; with somethign that will actually get the value of the current shopper group from the database. There will probably also be some other minor changes. I would like to keep all of the new code located on this page only.

Please let me know if there are more questions. I can give more details about the project once it has been accepted.


Page code:


$user =& JFactory::getUser();

$userId = $user->get( 'id' );

$shoppergroup = 'Members';


<div class="browse-page-block">

<div class="browse-page-block-inner">

<div class="home-featured-blockImageContainer">

<?php echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"' ) ?>


<a href="<?php echo $product_flypage ?>" class="browse-product-title"><?php echo $product_name ?></a>

<div class="home-featured-productPrice">

<?php echo $product_price ?> <?php echo $shopper_id; ?>

<?php if ($shoppergroup == 'Members') {

echo '<div style="font-size:10px; color:#F00;">your 20% member discount has been applied</div>';




<?php echo $product_s_desc ?> <a href="<?php echo $product_flypage ?>"> <?php echo $product_details ?></a>

<?php echo $form_addtocart ?><br />



Compétences : Joomla, PHP, Virtuemart, Design de site internet

en voir plus : virtuemart shopper group, current user group joomla, virtuemart user group, virtuemart user shopper group, group write, shopper group virtuemart, shopper group, virtuemart shoppergroup, shoppergroup virtuemart, virtuemart group, virtuemart current shopper group, shopper groups virtuemart, shoppers group virtuemart, virtuemart current shopper group current user, virtuemart current user group, joomla group, virtuemart shopper group user group, virtuemart users shopper group, php virtuemart user shopping group, virtuemart user shopper group code, current shoppergroup virtuemart, virtuemart shoppergroup current user, virtuemart group user, jfactory user group, virtuemart current user group php

Concernant l'employeur :
( 366 commentaires ) Columbus, United States

Nº du projet : #1007282

Décerné à:


Please read PM

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 0 jours
(11 Commentaires)

8 freelance font une offre moyenne de $76 pour ce travail


PL check PMB

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(173 Commentaires)

Please check your inbox. Thanks

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(146 Commentaires)

Please visit our website [url removed, login to view] and pmb.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 4 jours
(86 Commentaires)

Joomla Guru here!

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(50 Commentaires)

Ready to start!!

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(27 Commentaires)

hi, Let me do it for you! Thanks

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(6 Commentaires)

Hi, I am ready to start.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(1 Évaluation)