Hi!
How can I add a picture (text or slideshow) on the top of the pages with the products list, in the VM frontend, but to be visible only to a shoppers group?
I found a way to add these, so that everyone can see it. But how can it be be visible only to a shoppers group?
Thank you!
I have special shopper groups that I want to display a special message to once they log in
I use Advanced Module Mananager....http://www.nonumber.nl/extensions/advancedmodulemanager
to control what modules and when they should be displayed.
Then within the Custom PHP option I entered a check for my special shopper groups:
$db = JFactory::getDbo();
$user = JFactory::getUser();
$user1 = ($user->get(id));
$query = 'SELECT virtuemart_shoppergroup_id FROM #__virtuemart_vmuser_shoppergroups WHERE virtuemart_user_id ='. $user1 ;
$db->setQuery($query, 0, 10);
$Logged_in_shopper_grp_id = $db->loadResult();
if ( $Logged_in_shopper_grp_id == 4 ) { /* Contractor 1 */ return true;}
elseif ( $Logged_in_shopper_grp_id == 5 ) { /* Contractor 2 */ return true;}
elseif ( $Logged_in_shopper_grp_id == 7 ) { /* Contractor 3 */ return true;}
else return false; /* Do NOT display this module */
For the way I have it coded, you will need to know the shopper group id from the table. You can log into Cpanel and use myPHPAdmin to view and look at virtuemart_shoppergroups table
Thank you so much for this information!!!
I also would like to have a "message" that stays on top of the page of each product category.
Because in each category it would be different.
category description?
GJC you mean that the category description can be visible if I want to a specific shoppers group?
surround the cat desc in the category template in the same if code as mowlman supplied (although there must be a shoppers group model somewhere to use)
if the shopper group is correct -> display
thank you GJC!