dimitrifrom31 Posted October 22, 2016 Share Posted October 22, 2016 Hi, I am looking for a person/company able to fix a few small issues I got after upgrading to whmcs 7 and 7.0.1: Here is a description of the first and most urgent issue I have so if you are able to fix it please PM me with your price (please do not ask me to register on some site for a personal quote, I will do that afterwards after we agree on a price). Ive got other pieces of code of the same kind to address so if you can do that you may get more from me if interested: I am basically using a hook to get the currencies values (prefix/suffix/rate etc) and display pricing on my pages. here is the hook: ``` <?php use Illuminate\Database\Capsule\Manager as Capsule; function currencies_hook($vars) { $currencies = Capsule::table('tblcurrencies') ->get(); $encodedata = json_encode($currencies); $decodedata = json_decode($encodedata, true); return array("currencies" => $decodedata); } add_hook("ClientAreaPage", 1, "currencies_hook"); ?> ``` And here is the code contained in my tempalte pages: ``` {if isset($smarty.get.cid)} {assign cid $smarty.get.cid} {elseif isset($smarty.session.currency)} {assign cid $smarty.session.currency} {else} {assign cid '1'} {/if} {foreach $currencies as $cartcurrency} <li><a href="{$smarty.server.PHP_SELF}?cid={$cartcurrency.id}"><img src="{$BASE_PATH_IMG}/flags/{$cartcurrency.code|substr:0:2|strtolower}.png" alt="" /> {$cartcurrency.code}</a></li> {if $cartcurrency.id eq $cid} {assign conversionrate $cartcurrency.rate} {assign currencyprefix $cartcurrency.prefix} {assign currencysuffix $cartcurrency.suffix} {/if} ``` However $conversionrate , $currencyprefix and $currencysuffis do not seem to get assigned any value anymore. Note that the above code used to work just fine so it is about upgrading it for 7.0.1 compatibility. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 22, 2016 Share Posted October 22, 2016 https://forum.whmcs.com/showthread.php?119054-Converting-some-v5-custom-template-code-to-v6 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.