crispy24
Retired Forum Member-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by crispy24
-
Hi, On our platform we have the pricing in a certain currency, but on the checkout page, if the client is not registered yet in our system, we want to force the currency to be changed to another one in which we normally invoice products and we did that in older versions of WHMCS by only letting the client select the invoicing currency from the dropdown on the registration form by hiding the other currency. In the earlier versions of WHMCS I used a similar code like the one below from a post from the WHMCS community on the register and the checkout page (if the client would register on that page) to hide a currency and only let the clients choose a certain currency for invoicing, but in the 21 version in the child theme I can't seem to get it to work (I also tried in the parent theme and it didn't show up there either), but only in the checkout.tpl. In the normal register.tpl page it works with the first code below, which I used in the earlier versions of WHMCS. I tried putting the code where the custom fields show up on the page, at the top of the page, outside "if's" etc. but to no avail... The field won't show up whatever I try. I also cleared the template cache multiple times, but I don't know what I'm doing wrong. For example I'd want EUR as the only available option on the checkout registration page and these are two versions of the code that I used: {if $currencies} <div class="col-sm-6"> <label for="inputCurrency">Choose currency</label> <div class="form-group prepend-icon"> <label for="inputCurrency" class="field-icon"> <i class="far fa-money-bill-alt"></i> </label> <select id="inputCurrency" name="currency" class="field form-control"> {foreach $currencies as $curr} {if $curr.code eq 'EUR'} <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option> {/if} {/foreach} </select> </div> </div> {/if} {if !$loggedin && $currencies} // I also tried without !@loggedin <div class="pull-right form-inline float-right"> <label for="inputCurrency" class="field-icon"> <i class="far fa-money-bill-alt"></i> </label> <select name="currency" id="inputCurrency" class="field form-control"> <option value="">{$LANG.choosecurrency}</option> {foreach from=$currencies item=listcurr} {if $listcurr.code eq 'EUR'} <option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option> {/if} {/foreach} </select> </div> {/if} Any ideas what I'm doing wrong/why it isn't working? Thank you
-
How to hide Register Currency
crispy24 replied to Nyan's topic in Installation, Upgrade, and Import Support
Hi, In the earlier versions of WHMCS I used a similar code from a post from the WHMCS community on the register and the checkout page (if the client would register on that page) to hide a currency and only let the clients choose a certain currency for invoicing, but in the 21 version in the child theme I can't seem to get it to work (I also tried in the parent theme and it didn't show up there either), but only in the checkout.tpl. In the normal register.tpl page it works with the first code below, which I used in the earlier versions of WHMCS. I tried putting the code where the custom fields show up on the page, at the top of the page, outside "if's" etc. but to no avail... The field won't show up whatever I try. I also cleared the template cache multiple times, but I don't know what I'm doing wrong. For example I'd want EUR as the only available option on the checkout registration page and these are two versions of the code that I used: {if $currencies} <div class="col-sm-6"> <label for="inputCurrency">Choose currency</label> <div class="form-group prepend-icon"> <label for="inputCurrency" class="field-icon"> <i class="far fa-money-bill-alt"></i> </label> <select id="inputCurrency" name="currency" class="field form-control"> {foreach $currencies as $curr} {if $curr.code eq 'EUR'} <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option> {/if} {/foreach} </select> </div> </div> {/if} {if !$loggedin && $currencies} // I also tried without !@loggedin <div class="pull-right form-inline float-right"> <label for="inputCurrency" class="field-icon"> <i class="far fa-money-bill-alt"></i> </label> <select name="currency" id="inputCurrency" class="field form-control"> <option value="">{$LANG.choosecurrency}</option> {foreach from=$currencies item=listcurr} {if $listcurr.code eq 'EUR'} <option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option> {/if} {/foreach} </select> </div> {/if} Any ideas what I'm doing wrong/why it isn't working? Thank you -
Hello, If a client has the "quarterly" billing cycle and we disabled the pricing for that cycle, what happens when the time comes to generate an invoice for that client if he still has "quarterly" selected on his product/service? Will he get an invoice for 3 months again and again and WHMCS will calculate the quarterly price based on the monthly price we setup or will he get a 0 EUR invoice because Quarterly is disabled, so it doesn't have a price? Thank you
-
Redirect customers to Order complete/Thank you page
crispy24 replied to crispy24's topic in Developer Corner
Any ideas? -
Hello, I have two payment gateways: bank transfer and online payment. How can I redirect users to a custom Order complete/Thank you page regardless of the payment gateway they choose? I tried changing stuff in the forwardpage.tpl/complete.tpl files, but to no avail. I always got redirected to the viewinvoice page when I chose "bank transfer". So what I want is to show a custom page with a link to the invoice and other information and not redirect the clients automatically to the invoice when they choose "bank transfer", but without changing the other payment gateway's ("online payment") behaviour. Thank you
-
Hello, Does anybody know a way I can disable the proforma invoice only for some clients? Most of them should have it enabled, but some can't pay the invoices if they are proformas. Thank you
-
Hello, I use a hook found in the WHMCS community for changing the custom invoice number to include some letters, the year, the user id and the invoice number, but when downloading the PDF invoice, the filename is including only the invoice number, not the custom one. I can't seem to find where I can change the number in the filename. Any ideas? Thanks
-
Hello, I'm trying to set up a PLESK server in WHMCS and I keep getting the following error when testing the connection: FAILED: Error code: 0. Error message: Unable to find appropriate manager for this version of Panel. The PLESK version that I use is 11.0.9, so I chose PLESK from the dropdown list, because there were only four options: Plesk, Plesk 8, Plesk 9 and Plesk 10. Do you guys have any ideas on how to solve this issue? Thank you! - - - Updated - - - PS: It also says this: Plesk should be at least 8.0 version. but as I said, I have Plesk 11.0.9.
