Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Default Credit Card Payment - Dropdown For Expiry Date Rate Topic   - - - - -

 
  • stevea
  • Member
  • Members
  • Join Date: 29-Jun 16
  • 33 posts

Posted 06 May 2018 - 07:50 AM #1

Where would it be possible to have the expiry date changed to dropdown?

In an ideal world it would have months and then year for the other one. The year part would ideally take the current year plus 6 and populate that, so at the start of 2019 it would lose the 2018 automatically.

Just finding people getting that part wrong.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10557 posts

Posted 07 May 2018 - 12:43 AM #2

Sure, you can use an override for the credit card template and change the expiry to be dropdowns.  Be sure to use an override for the cc.tpl template rather than modifying distributed files.

 

If your payment method uses a template other than cc.tpl, then you can simply override that template too.  Feel free to contact me if you need some help.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17267 posts

Posted 07 May 2018 - 05:55 AM #3

Template is located here

 

design/themes/THEME/templates/views/orders/components/payments/cc.tpl

<input type="text" id="credit_card_year_{$id_suffix}"  name="payment_info[expiry_year]" value="" size="2" maxlength="2" class="ty-credit-card__input-short ty-inputmask-bdi" />

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10557 posts

Posted 07 May 2018 - 07:49 PM #4

 

Template is located here

 

design/themes/THEME/templates/views/orders/components/payments/cc.tpl

<input type="text" id="credit_card_year_{$id_suffix}"  name="payment_info[expiry_year]" value="" size="2" maxlength="2" class="ty-credit-card__input-short ty-inputmask-bdi" />

but you should use an override so your changes are not overwritten on upgrade.  Never modify core files if you don't have to.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.