Jump to content

Nyan

Member
  • Posts

    32
  • Joined

  • Last visited

About Nyan

Nyan's Achievements

Member

Member (2/3)

1

Reputation

  1. I will send Send SSL addon by Private Message.
  2. I want to limit redirect of cart.php?a=checkout. Is this hook wrong? <?php function hook_change_cart_currency($vars) { $currentcurrency = $vars['currency']; if ($currentcurrency['code'] != "JPY" OR $_GET["currency"] != "4") { if (App::getCurrentFilename() == 'cart' && $a=='checkout') { header('Location: cart.php?a=checkout&currency=4'); exit; } } } add_hook("ClientAreaPageCart", 1, "hook_change_cart_currency"); ?>
  3. Thank you brian! greatly appreciated!! This hook did not work. Correctly: from:/cart.php?a=confproduct&i=1&currency=1 to: /cart.php?a=confproduct&i=1&currency=4 But Actually: from:/cart.php?a=confproduct&i=1&currency=1 to: /cart.php?currency=4 https://www.bestssl.net/members2/cart.php?a=confproduct&i=1&currency=1 https://www.bestssl.net/members2/cart.php?a=confproduct&i=1&currency=4 https://www.bestssl.net/members2/cart.php?currency=4
  4. Thank you brian! greatly appreciated!! It is correct. I can resolve my ploblem by adding &currency=4. Redirecting as follows: Is it correct? from:https://www.bestssl.net/members2/cart.php?a=confproduct&i=1 to:https://www.bestssl.net/members2/cart.php?a=confproduct&i=1&currency=4 from:https://www.bestssl.net/members2/cart.php?a=view to:https://www.bestssl.net/members2/cart.php?a=view&currency=4 from:https://www.bestssl.net/members2/cart.php?a=checkout to:https://www.bestssl.net/members2/cart.php?a=checkout&currency=4 I wrote hook. Is this wrong? <?php add_hook("ClientAreaPageCart",1,function($vars){ $currencies = Capsule::table('tblcurrencies') ->where('code', '!=', 'JPY') ->get(); header("Location: cart.php&currency=4"); exit; });
  5. Thank you. No. I register as new user from the following URL. https://www.bestssl.net/members2/cart.php?a=checkout I cleared my template cache. I Deleted Suffix of USD. Please look at Currencies_2.png. Please look at cart.png. This is USD price that I Deleted Suffix. Please look at Client_Profile.png. USD is registered as currency. Any help would be greatly appreciated!!
  6. Yes. Thank you. Greatly appreciated! https://www.bestssl.net/ When I register from the following URL, USD is registered as currency. https://www.bestssl.net/members2/cart.php?a=checkout
  7. I am sorry. I was wrong. the hooks did not work. Yes. Thank you. Greatly appreciated! Yes. Automatically SSL Pligin sets USD as default currency. Automatically USD price are set. And I set JPY price and change USD price. But customers watch USD by default in my web. I need to show the USD price display to the customer in JPY price display. And I am setting Currencies. Please look at Currencies.png. I understand this point. When I register from the following URL, USD is registered as currency. /members/cart.php?a=checkout
  8. I deleted the language files other than Japanese file. But hooks do not worked. USD is registered as currency.
  9. I must set JPY and USD in Currencies for SSL Pligin for WHMCS. Please look at Currencies.png. And I must set USD as default currency. But I am dealing only JPY. And I hided USD. When at first my customer register his account, there is no problem. /members/register.php JPY is registered as currency. But when he register from the following URL, there is problem. /members/cart.php?a=checkout USD is registered as currency. I add the following hooks : /members/includes/hooks/currency.php <?php use WHMCS\View\Menu\Item as MenuItem; use Illuminate\Database\Capsule\Manager as Capsule; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { $currencies = Capsule::table('tblcurrencies') ->where('code', '!=', 'USD') ->get(); $content = '<form method="post" action="cart.php?'.$_SERVER["QUERY_STRING"].'"> <select name="currency" onchange="submit()" class="form-control">'; $mycurrency=$_POST['currency']; foreach ($currencies as $currency) { $content .= '<option value="'.$currency->id.'"'; if ($mycurrency==$currency->id) { $content .= ' selected'; } $content .= '>'.$currency->code.'</option>'; } $content .= '</select></form>'; if (!is_null($secondarySidebar->getChild('Choose Currency'))) $secondarySidebar->getChild('Choose Currency') ->setBodyHtml($content); }); I change code as the following : /members/templates/orderforms/standard_cart/sidebar-categories-collapsed.tpl <select name="currency" onchange="submit()" class="form-control"> <option value="">{$LANG.choosecurrency}</option> {foreach from=$currencies item=listcurr} <option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option> {/foreach} </select> <select name="currency" onchange="submit()" class="form-control"> {foreach from=$currencies item=listcurr} {if $listcurr.code eq 'JPY'} <option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option> {/if} {/foreach} </select> Please tell me how to resolve. Any help would be greatly appreciated!!
  10. Thank you brian! I want to use hooks. Based on your advice, I set the following code in /includes/hooks/. I am not confident, because I am a beginner. Is this a problem? Please tell me correct method. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPageAddFunds', 1, function($vars) { $amount = $vars['amount']; return array( "amount" => floor($amount) ); } ); add_hook('ClientAreaPageViewInvoice', 1, function($vars) { $creditamount = $vars['creditamount']; return array( "creditamount" => floor($creditamount) ); } );
  11. I set 1,234 as Currencies Format. Please look at ad_amount.png and apply_credit.png. Amount to Add is 0.00. Apply Credit is 500.00. I wish the display of 0 and 500. If there is a method using hooks, please tell me how to resolve using hooks.
  12. I change addSidebar.php as the following. But if I check Private in Knowledgebase, I meet the following error. <?php use WHMCS\View\Menu\Item as MenuItem; if (App::getCurrentFilename() == 'supporttickets') { add_hook('ClientAreaSecondarySidebar', 2, function(MenuItem $secondarySidebar) { $secondarySidebar->getChild('Support') ->removeChild('Network Status'); }); } if (App::getCurrentFilename() == 'announcements') { add_hook('ClientAreaSecondarySidebar', 2, function(MenuItem $secondarySidebar) { $secondarySidebar->getChild('Support') ->removeChild('Network Status'); }); } if (App::getCurrentFilename() == 'knowledgebase') { add_hook('ClientAreaSecondarySidebar', 2, function(MenuItem $secondarySidebar) { $secondarySidebar->getChild('Support') ->removeChild('Network Status'); }); }
  13. I set the following code in /includes/hooks/. addSidebar.php <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 2, function(MenuItem $secondarySidebar) { $secondarySidebar->getChild('Support') ->removeChild('Network Status'); }); And if I check Private in Knowledgebase, I meet the following error. Fatal error: Call to a member function removeChild() on null in /WHMCS/includes/hooks/addSidebar.php on line 6 Please tell me how to resolve.
×
×
  • 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