Hi again @brian!
So sorry for my misplace tag (suppose to be a [ p h p ]), it seems that I can't edit my post (after posting here -newbie limited).
Okey, here you go. I found this part is a little bit 'tricky'. So I played a bit with your suggestion and, here you go
<?php
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) {
global $gid;
$content = '<form method="post" action="cart.php?gid='.$gid.'"><select name="currency" onchange="submit()" class="form-control"><option value="1" selected> </option><option value="2">IDR</option><option value="3">EUR</option><option value="4">GBP</option></select></form>';
if (!is_null($secondarySidebar->getChild('Choose Currency')))
$secondarySidebar->getChild('Choose Currency')
->setBodyHtml($content);
});
As you can see, I put a 'blank' content (with value=1, which is an 'unset' or no currency). But when user switch to other than the 'blank' currency, it'll switch to one of them smoothly, as previously it didn't work for me. It might be because i use geolocation hook, that will redirect user based on his country of IP. Or any advise on what should i take a look into.....
At last it did work for me @brian!. Thanks.
- - - Updated - - -
Could you give me a shed of light, on how to change this to $pid (instead of $gid).
<form method="post" action="cart.php?gid='.$gid.'">
Everytime I do the switch, it'll return me to the group of product, not the product iteself. Thanks so much agian @Brian!