Prestashop – Extending the Credit Card Expiration Date


A company called in my office for a help. They have a website based on the Prestashop, the free eCommerce software. Long time ago, a web master downloaded it to build an Internet shopping mall which starts to make a problem recently.

The problem is

  • a customer has a credit card with expiration date of 2020;
  • the website provides the expiration date up to 2019;
  • and they do not have a web master anymore;

Since they wanted a hotfix, I walked straight into their web server and found

  • a Smarty template is employed in the system;
  • “authorizeaim.tpl” is the target template file which is shown below;

Source code of template


In Smarty, the “loop” variable in {section} function is designed to provide the specified value minus one as a maximum value. Therefore, in the above case, the end year would be 2019 because the “loop” variable is “20”.

Now, all we have to do in this errand is to change the “loop” value from “20” to “25” and it will extend the last expiration year to 2024.


Voila, it works!



Comments Off on Prestashop – Extending the Credit Card Expiration Date

Filed under News

Comments are closed.