I altered the PI Price module to show a bit of text under the products price explaining to customers that our prices included 20% VAT. The problem now is that a customer from outside the UK has complained that VAT has been charged on his order. When he logged in the price changed as it should but the bit of text under the price stayed the same, so I need a way to change the text that shows depending on the customers country.
The module code is very simple as I am not a coder and only contains the following which is mainly the standard price module
Code: Select all
<div class="col-sm-<?= $content_width ?> pi-price mt-0">
<h2 class="list-group-item d-flex justify-content-between align-items-center">
<?=$GLOBALS['product']->get('is_special')
? sprintf(PI_PRICE_DISPLAY_SPECIAL, $GLOBALS['product']->format(), $GLOBALS['product']->format('price'))
: sprintf(PI_PRICE_DISPLAY, $GLOBALS['product']->format())
?></h2>
<?php echo PI_PRICE_VAT_NOTICE_TEXT_UK; ?>
</div>I don't understand how to use IF ELSE statements so need a bit of help with that and also how best to find the customers country.