We have had a 3rd party developer create a custom eCommerce payment gateway package. (based on one of the existing payment gateway packages) The developer successfully installed it in a fresh install of squiz matrix.
What is the recommended procedure to implement a such a custom package in the production version, to allow future updates via the automatic update script.
Hi,
[quote]
We have had a 3rd party developer create a custom eCommerce payment gateway package. (based on one of the existing payment gateway packages) The developer successfully installed it in a fresh install of squiz matrix.
What is the recommended procedure to implement a such a custom package in the production version, to allow future updates via the automatic update script.
[/quote]
Is it a new custom package installed in matrix or modifications to the existing ecomm package?
If it's a new custom package, you can do an update via cvs right now without an issue. You'll need to modify the auto-upgrade conf/main.conf file and add your custom package name to the 'cvs_skip_packages' list (see http://manuals.matrix.squizsuite.net/server-administrator/chapters/automatic-updates#Configuring-the-main.conf-File). If you're doing a pre-uploaded upgrade at the moment it will cause issues, though we added a fix for that for the next release of the upgrade scripts.
If it's a modification to the existing ecomm package, that's a little trickier. You'll need to back up your custom package, then when you upgrade it will use the package from cvs (ie you'll lose all of your changes). After the upgrade finishes, you'll have to merge your changes in to the matrix package and run the install/step_02.php and install/step_03.php scripts.
If it isn't a custom package, I'd get in touch with your developer to turn it into one. A package with a single ecom payment method in it will work fine, and make upgrading a lot easier.
Thank you Chris, Thank you Greg,
[quote]Is it a new custom package installed in matrix or modifications to the existing ecomm package?[/quote]
It is a complete copy of an existing package (payment_gateway_datacash) modified with appropriate name changes to classes and functions.
So If I understand you correctly, the process is to upload the custom package, into the matrix codebase, and then run the install/step_02.php and install/step_03.php scripts.
Then for subsequent auto-upgrades we need to add the custom package name to the 'cvs_skip_packages' list.
The datacash payment gateway is not a complete package - it is just an asset type located in the ecommerce package (/packages/ecommerce/payment_gateway_types) so if you just have another type sitting in there, you don't have a custom package; you only have a custom asset. This means you now have a custom ecommerce package in your system and it is hard to upgrade this. You can't use that cvs_skip_packages option in this case.
The way we do custom development is to create a new package and include the custom assets (or cron jobs, or scripts etc) in there. This allows the other packages (such as ecommerce) to remain core and be upgraded independently of the custom code. If this has been done for you, then you will see a directory in /packages that looks like a custom name (maybe your organisation name). If not, the development hasn't been done in a way that allows for upgrading.
If you don't have a custom package, you can get your developer (or Squiz) to move the custom code into a custom package. This will require some DB changes as well, so you're going to want to make sure the developer knows what they are doing. But this will remove your custom code from the Matrix core and allow you to upgrade things yourself.