Đã hoàn thành

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 />



Kỹ năng: Joomla, PHP, Virtuemart, Thiết kế trang web

Xem thêm: 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

Về Bên Thuê:
( 366 nhận xét ) Columbus, United States

Mã Dự Án: #1007282

Đã trao cho:


Please read PM

$30 USD trong 0 ngày
(11 Đánh Giá)

8 freelancer đang chào giá trung bình $76 cho công việc này


PL check PMB

$80 USD trong 1 ngày
(173 Đánh Giá)

Please check your inbox. Thanks

$80 USD trong 1 ngày
(146 Đánh Giá)

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

$70 USD trong 4 ngày
(86 Đánh Giá)

Joomla Guru here!

$70 USD trong 1 ngày
(50 Đánh Giá)

Ready to start!!

$60 USD trong 2 ngày
(27 Đánh Giá)

hi, Let me do it for you! Thanks

$100 USD trong 3 ngày
(6 Đánh Giá)

Hi, I am ready to start.

$120 USD trong 3 ngày
(1 Đánh Giá)