Jump to content

wharry

Member
  • Posts

    5
  • Joined

  • Last visited

About wharry

wharry's Achievements

Junior Member

Junior Member (1/3)

1

Reputation

  1. Wowwwwwww Thanks a lot @brian!...... yes somehow I did found the parts but forget to look after it for responsive. four thumbs up
  2. Ah yessss.. That was awesome @brian!.... One more thing, the responsive. It didn't work on responsive mode.
  3. 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!
  4. Thanks alot @brian!, it works like a charm. But here I re-phrase the original working code {php} <?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="2" selected>IDR</option><option value="4" selected>USD</option></select></form>'; if (!is_null($secondarySidebar->getChild('Choose Currency'))) $secondarySidebar->getChild('Choose Currency') ->setBodyHtml($content); }); {/php} But what is missing: "The Linking doesn't work" I was just thinking about something link ..../cart.php?gid=1&currency=1 Could someone assist me in editing this line {php} <form method="post" action="cart.php?gid='.$gid.'"> {/php}
  5. I found out interesting to find out that it is easy (very easy) to hide the "choose currency" menu from the side bar. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { $secondarySidebar->removeChild('Choose Currency'); }); But it is far challenging to hide certain currency. Is there anyway, how we can do it? Let say I have EUR, GBP and USD, and I want to hide USD.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated