-- url of the page with the problem -- :
ramblas.rocks/
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 7.0.7
-- Browser(s) name and version -- : chrome 59.0.3071.104
Ramblas is a big street festival in Antwerp. The stands are to be rented in different settings.
Two of the most important differences are: FOOD and NONFOOD.
Every standholder - who rents an stand - pays a deposit. They have to leave their place clean, otherwise they will lose their deposit.
FOOD-Standholders pay a different deposit than NONFOOD-Standholders: FOOD=100€, NONFOOD=30€. This is per order, not per product. The deposit will be the shipping cost, standard 30€.
Every standholder can rent multiple stands. So, par example, a standholder can rent 2 stands; 1 FOOD and 1 NONFOOD.
If a standholder has rented ANY FOOD-stand in the order, then he has to deposit 100€.
If the order contains no FOOD stands, then the deposit is 30€
Now comes the hard part
I can make a foreach to traverse the order, searching for a FOOD stand and break when found.
If found, then I have to change the shipping costs (=deposit) into 100€.
EXAMPLE.
Standholder rents 1 stand FOOD (type S) and 1 stand NONFOOD (type H).
In the foreach the FOOD-type S is found, so the shipping cost has to be altered in 100€.
I did that in the checkout (/templates/[the_template_name]/html/com_hikashop/checkout/cart.php.
So far so good; Hikashop shows the corect shipping cost.
But it does not change the values in the order.
Where/how can I change the shipping cost AND the total cost in the MySQL-order table?
Or is there a more intelligent way to accomplish what I'm trying to do?
Thanks!