Hi,
after a few years we've decided to give this another go trying to display also characteristics in our product listing, as we noticed the variant_ids are already being loaded in the product array.
We have no problem getting the variants names, quantities, etc. and we are able to get the price with the usual
$currencyClass->getPrices($product, $ids_of_variants, hikashop_getCurrency(), $config->get('main_currency'), hikashop_getZone(), $config->get('discount_before_tax'));
However, this is where we get stuck because the taxes are not being loaded along with the price.
Would you know a solution to get the taxes for the variants as well?
We did notice that in the
hikashop_product table the
product_tax_id field remains 0 for variants. Manually setting this field to the same tax_id as the main product does give us the correct variant prices with taxes, but this is not really a viable solution to do by hand for many products and variants. We were wondering why variants are not automatically given the same
product_tax_id as the main product (since it isn't possible to set a different tax rate anyway for a variant in the back-end).
Any help would be very much appreciated!
Kind regards,