...
Once this is in place, you can call $this->backward
in your module in order to pinpoint 1.5- or 1.4-specific code:
Code Block |
---|
public function install()
{
if (!$this->backward && _PS_VERSION_ < 1.5)
{
echo '<div class="error">'.Tools::safeOutput($this->l('In order to work properly in PrestaShop v1.4, the Test module requires the Backward Compatibility module 0.3+.')).'</div>';
return false;
}
... |
...or if you want to use more of the 1.5 API's goodness, such as the Context. You can also prevent code from being used under PrestaShop 1.4 as long as the Backward Compatibility module is not available:
...