Jump to content

Need some help organizing the view of Payment Methods on WHMCS


Recommended Posts

I need some help organizing the view of Payment methods on Standard Cart template. If you take a look at this screenshot https://prnt.sc/fqpgm0 you will notice my payments methods are showing very weird. I would like to have each payment method to be shown one per line.

 

Also, I would like to translate "MM/YY" referring to month and year to Spanish. I must say something like this "MM/AA".

 

Thank you guys for your help.

Link to comment
Share on other sites

I need some help organizing the view of Payment methods on Standard Cart template. If you take a look at this screenshot https://prnt.sc/fqpgm0 you will notice my payments methods are showing very weird. I would like to have each payment method to be shown one per line.

in templates/orderforms/standard_cart/checkout.tpl change...

                    <div class="text-center">
                       {foreach key=num item=gateway from=$gateways}
                           <label class="radio-inline">
                               <input type="radio" name="paymentmethod" value="{$gateway.sysname}" class="payment-methods{if $gateway.type eq "CC"} is-credit-card{/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} />
                               {$gateway.name}
                           </label>
                       {/foreach}
                   </div>

to..

                    <div class="text-center">
                       {foreach key=num item=gateway from=$gateways}
                           <label class="radio">
                               <input type="radio" name="paymentmethod" value="{$gateway.sysname}" class="payment-methods{if $gateway.type eq "CC"} is-credit-card{/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} />
                               {$gateway.name}
                           </label>
                       {/foreach}
                   </div>

or to put it simpler, change the "radio-inline" label class to "radio". :idea:

 

Also, I would like to translate "MM/YY" referring to month and year to Spanish. I must say something like this "MM/AA".

then it's going to be this block of code in complete.tpl...

                        <div class="col-sm-6">
                           <div class="form-group prepend-icon">
                               <label for="inputCardExpiry" class="field-icon">
                                   <i class="fa fa-calendar"></i>
                               </label>
                               <input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="MM / YY{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">
                           </div>
                       </div>

and then it's just a case of changing it for your needs... so if you want everyone to see MM/AA, then just change the 'YY' to 'AA' above... if it's for Spanish only, use the following...

 

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="MM / {if $language eq "spanish"}AA{else}YY{/if}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

or you could replace the MM/YY with a Language Override and add correct override entries for each language.

Link to comment
Share on other sites

Thank you so much. It worked fine.

 

Could you tell me what I need to put on Language Override file? I already have it created but I am not sure what to put to make "MM/YY" to show always in Spanish language, regarding the language of the browser.

 

I appreciate it.

Link to comment
Share on other sites

if you were going to replace MM/YY for all languages, you would modify the template to use the language string...

 

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="{$LANG.ccdate}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

and then in lang/overrides/english.php..

$_LANG['ccdate'] = "MM / YY";

and in lang/overrides/spanish.php...

$_LANG['ccdate'] = "MM / AA";

and then remember to do the same for any other languages used in the client area.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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