Jump to content

TGK

Member
  • Posts

    39
  • Joined

  • Last visited

Everything posted by TGK

  1. Hi i created a custom page and im trying that my custom varible work in these custom page can some help me a bit. custom page info: withcrypto.php template file: withcrypto.tpl <?php # Cart Email Verification Hook # Written by brian! use Illuminate\Database\Capsule\Manager as Capsule; function client_email_status_hook($vars) { $client = Menu::context("client"); if ($client && $vars['templatefile'] == 'withcrypto') { $clientemails = Capsule::table('tblclients')->where('id',$client->id)->value('marketing_emails_opt_in'); return array("clientemails" => $clientemails); } } add_hook('ClientAreaPage', 1, 'client_emails_status_hook'); ?> also i know that exist a {$marketing_emails_opt_in} variable but i dont know how to make work in my custom page. thanks
  2. hi @WHMCS ChrisD Hello Chris. I did what you recommend me, but I wonder if the directory attachment is now secure from all public access.
  3. thank Brian! i will check it
  4. hi i have a question. i move my attachments folder to non-public directory that folder now is secure? i mean people or my site visitors cannot access on this folder ?
  5. Yeah i notice that no logged in the i Just modified de login in the final checkout page Thanks for all Brian!
  6. Im triying like this, im trying to create a new variable because i dont know about that clientstats I can use it without make any aditional step? <a href="cart.php?a=checkout" class="btn btn-success btn-lg btn-checkout{if $cartitems == "0" || $verficado == "false" && $clientsstats.grossRevenue->toNumeric() gt 100} disabled{/if}" id="checkout">
  7. Thanks brian i trying to make a if statement where if the client total incoming amount is higher to 100 checkout button become disable i just need that this code and i will be done Really i need to change id to userid? Actually im gettinf the amoun but the 1 invoicr u think if can explaime i aprenciate for tech me
  8. Hi im creating a custom variable in viewcart tpl im using a code that Brian! made variable works well but i need a little help this variable im trying to get the "amountin" field in tblaccounts table but i need this variable sum all amountin for each client ( userid) i leave the code hook <?php # Cart Email Verification Hook # Written by brian! use Illuminate\Database\Capsule\Manager as Capsule; function client_amountin_status_hook($vars) { $client = Menu::context("client"); if ($client && $vars['templatefile'] == 'viewcart') { $clientamount = Capsule::table('tblaccounts')->where('id',$client->id)->value('amountin'); return array("clientamount" => $clientamount); } } add_hook('ClientAreaPageCart', 1, 'client_amountin_status_hook'); ?> note: that hook code Brian made when he helped me to make some variable on other threat i just modified that hook code for make a new variable thanks in advance.
  9. yes you right actually i have 10 dropdown items and i need to put then in categories. thanks
  10. Hi, thereis any way to add sub menu to menu options in Primary Nav Bar. Primary option " Services " Services VPS Cheaps <-- I need add other 4 sub menu Options for this option also VPS Regulars <-- I need add other 4 sub menu options for this option also VPS FULL <-- I need add other 4 sub menu options for this option also code example: thanks in advance
  11. hi i created a custom page using WHMCS documentation works well but i want add on this custom page all client customfields. its need create a hook? or can be by add some code in mycustompage.php file? i think i wll need create a hook for allow custom field variables to new page..
  12. thanks Brian! now is solved your hook works fine still in 7.5.2 was my bad uploading wrong img to the logos directory sorry
  13. im using 7.5.2 maybe the issue is because that custom product group that im using have a template based on standard_cart and my general config in ordering tab im using boxes templates maybe thats why i dont sure but well i will check.
  14. i did defined that one gateway per template by creating a product-Group and leave only avalaible PayPal gateway i have diferents product grups and inside them i have 1 product and these product group have avalaible only 1 gateway example == Product-Group " Paypal VPS" using payment gateway "Paypal" Only Product name VPS Basic its use a custon cart template too but in ordering tab im using "Boxes" i edited viewcart.tpl but noting involved with $gateway i also leave my viewcart for brian.rar if need check how i using it thanks
  15. Nice Brian! i like so much this but im having a issue, i use you hook and woks well but the problem is that im using only one payment gateway per cart template so when i use your hook it add me all payment gateways 😕 Before after should be Paypal Only with its logo <?php # Cart Gateway Logos Hook # Written by brian! function hook_cart_gateway_logos($vars) { if ($vars['templatefile'] == 'viewcart') { $gateways = $vars['gateways']; foreach($gateways as $key => $gateway) { $logo = "assets/img/logos/".$key.".png"; if(file_exists($logo)) { $gateways[$key]['name'] = '<img src="'.$logo.'" alt="'.$gateway['sysname'].'">'; } } return array("gateways" => $gateways); } } add_hook('ClientAreaPageCart', 1, 'hook_cart_gateway_logos'); ?> i leave images
  16. works great!! thanks again Brian!
  17. hi im trying to create a variable and then use it on Viewcart.tpl but im confuse i know that im really wrong in something but maybe someone can give me a hand. i want to check " is_verified" field from " tblclients" table. and i will create some " if statement" in viewcart.tpl after it works fine i would apreciate your help. thanks <?php use Illuminate\Database\Capsule\Manager as Capsule; function hook_verified_status($vars) { $verificado = Capsule::table('tblclients') ->where('is_verified') return array("verificado" => $verificado); } add_hook('ViewCart', 1, "hook_verified_status"); ?>
  18. Works fine, great! thanks! Brian! again.
  19. i leave image panel is show fine problem is when i put the " IF " panel dissapear fa-bank works fine thanks for your help i apreciate it im using 7.5.2 atm cant update because somes modules not compatible yet
  20. maybe im doing something wrong if i put a "if " all panels didnt show the code stop work My fieldname is Banesco <?php use WHMCS\View\Menu\Item; use Illuminate\Database\Capsule\Manager as Capsule; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $client = Menu::context( "client" ); $fieldid = Capsule::table('tblcustomfields')->where('fieldname', 'Banesco')->where('type', 'client')->value('id'); $fieldvalue = Capsule::table('tblcustomfieldsvalues')->where('fieldid', $fieldid)->where('relid', $client->id)->value('value'); if ($fieldvalue) { $bodyhtml = '<p>Numero de Cuenta: '.$fieldvalue.'</p>'; $cuentabancariaPanel = $homePagePanels->addChild( 'Cuenta BancariaV', array( 'label' => 'Cuenta Bancaria&nbsp;<img src="https://www.com/notoch99/wp-content/uploads/2018/08/ven.png" width="20" height="20 ">', 'icon' => 'fa-bank', 'extras' => array( 'color' => 'green', 'btn-link' => 'https://com/clientarea.php?action=details', 'btn-text' => 'Agregar', 'btn-icon' => 'fa-plus', ), 'bodyHtml' => $bodyhtml, )); } });
  21. code works fine Brian maybe you can help me a bit i want show panel only if custom field info exists, please ill apreciate it
  22. its ok now thanks all !!
  23. thanks everyone, works fine!! but i change 'icon' => 'fa-example', to 'icon' => 'fa-money', but the icon doesnt show i dont know why
×
×
  • 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