En cours

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

guest

guest

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.

Thanks

Page code:

<?php

$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 .'"' ) ?>

</div>

<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>';

}

?>

</div>

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

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

</div>

</div>

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

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é à :

RnatMigL

Please read PM

30 $ USD en 0 jours
(11 Commentaires)
4.5

8 freelance ont fait une offre moyenne de 76 $ pour ce travail

tomvnphp

PL check PMB

80 $ USD en 1 jour
(173 Commentaires)
7.4
branahr

Please check your inbox. Thanks

80 $ USD en 1 jour
(146 Commentaires)
7.1
DeamonBizz

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

70 $ USD en 4 jours
(86 Commentaires)
6.8
Emadhal

Joomla Guru here!

70 $ USD en 1 jour
(50 Commentaires)
5.8
techsp123

Ready to start!!

60 $ USD en 2 jours
(27 Commentaires)
5.2
joomskys

hi, Let me do it for you! Thanks

100 $ USD en 3 jours
(6 Commentaires)
3.9
sachin134l

Hi, I am ready to start.

120 $ USD en 3 jours
(1 Commentaire)
0.0