Hello again.
I've managed to show the prices I needed, based on Joomla groups, using this code:
$user = JFactory::getUser();
$groups = JAccess::getGroupsByUser($user->id);
$groups_list = '(' . implode(',', $groups) . ')';
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->qn('title'))
->from('#__usergroups')
->where($db->qn('id') . ' IN ' . $groups_list);
$db->setQuery($query);
$rows = $db->loadObjectList();
$grossista = false;
$gruppo ='';
$ids = array_column($rows, 'title');
foreach ($ids as $id) {
switch($id) {
case 'Grossisti':
$grossisti = true;
$gruppo = 'grossisti';
break;
case 'Privati':
$gruppo = 'privati';
break;
case 'Guest':
$gruppo = 'guest';
break;
}
}
By this way I can control all via SCSS, simply apllying a new class to the price block.
So, about that I think I'm okay. Maybe that code could be better written, but I'm a php noob...so that's my best at the moment
Moving to the second point of the ticket, these are the costs:
-> Payment on delivery: 5.00€ + VAT IT 22% = 6.10
-> Shipping: 4.78€ + VAT IT = 5.83
About the taxes: yes there are two different tax rules as the products, that are seeds, have only 10% applied, while payment and shipping have 22%.
Now, looking at what I sent you, in the first picture there's no shipping cost but there is the payment cost.
in this case we can only see the tax that is related to the products, but not those related to the payment cost. We only see 5.00€ but we should see another row with the VAT amount for the payment method.
Looking at the second screenshot should clear what I mean.
Here we have both, the shipping cost (5.83) and the payment cost. And a new row is appeard with the VAT amount for both.
Why this row doesn't appear in the first situation?
Why the shipping cost is shown as total (base cost + tax) while payment is shown without tax?
davide-strati.it/zoeshop/index.php/it/
This is the Test Site, if you want I can create an user for you or pm the access.
Thanx again!
Davide