How to check Prestashop version inside custom module


In prestashop, if you are making single module which is compatible for both PS 1.6 and PS 1.7 then sometimes you need to write different code for both of the version.

With below code you can easily check your prestashop version and modify your logic accordingly.

if (version_compare(_PS_VERSION_, '1.7.0.0', '>=')) {

// PS version 1.7

} else {

// PS version 1.6

}

Post a Comment

0 Comments