1

I am developing a module for Magento and wonder if it would be compatible with either Community or Enterprise platform versions. Is there any easier way to check that instead of doing it on each of its versions?

Thanks!!!

2 Answers 2

1

It depends on what your module uses from the Magento Core and templates I guess.

One option would be to install on the latest versions and on version CE 1.5 (and it's equivalent EE version). If it works on both you can be fairly sure everything in between works as well. If it breaks use the Magento change logs per version to see which change introduced the errors.

But at the end of the day the only way to be sure is to install it in each version as far as I know. This isn't a complete answer but hopefully will point you in the right direction

0

You could create an intermediary class that implements all the functions that you require and depending on the version of magento call parent's implementation or use your own implementation:

model/Int.php

<?php

      if (!version_compare(Mage::getVersion(), '1.7', '>=')) {
        class N_M_Model_Int extends Mage_Core_Model_Resource_Db_Collection_Abstract
        {
        }
      } else {
        class N_M_Model_Int extends Varien_Data_Collection_Db
        {
          public function getMainTable()
          {
            // my implementation
          }
        }
      }
    ?>

model/Final.php

    <?php
      class N_M_Model_Final extends N_M_Model_Int
      {
        // common code between all the versions
      }
    ?>
1
  • OP wanted to know how to check if his module was compatible with the Magento versions , not how to make them compatible between versions. It's probably better to make 2 versions of the module, one for legacy code if you need to take such drastic measures to make your code compatible. Commented Feb 10, 2015 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.