Skip to main content

Add a string IVA in one user group

10 years 1 month ago #250896 by parsifaltheking
-- HikaShop version -- : 2.6.4.
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.26
-- Browser(s) name and version -- : firefox 49

Hi, with cron every night i import in the system 9000 objects with price_with_tax field.
Thereis tre type of users:
- the user that are not registered show the price full with tax (works)
- the new registered user go in client group and after login show full price - 25% discount (works)
- the wholesalers after login show full price - 50% discount ( work) but i 've to add on every price the string + I.V.A. only for this groups. I don't wont to calulate it but only show this text.
How i can do to obtain the last request?
Thanks

Please Log in or Create an account to join the conversation.

10 years 1 month ago #250897 by nicolas
Hi,

You'll have to edit the file "listing_price" and add some custom code to check the current user's user group:
Code:
<?php $user = JFactory::getUser(); $userid = $user->get('id'); $groups = JAccess::getGroupsByUser($userid); if(in_array(XXX,$groups)){ echo '+ IVA'; } ?>
where XXX is the id of the group.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum