Tips to upgrade and maintain X-Cart PHP shopping cart


  • Share on Pinterest

During a recent shopping cart upgrade these three tips came to mind. Mostly when I failed to follow my own advice. The tips are in regards to manually patching files that have been customized.

  1. Comment, comment, comment. If you make a change to a PHP file or template that was supplied by the vendor make a comment. Know what line the change started and where the change ends. When manually patching the file the comments will keep you from having to guess if a change is a patch from the vendor or a customization you made.
  2. When making a customization, comment out the original code block using block comments (not line comments) and make your changes to a copy of the original code block. Eventually when the original code gets patched or updated by the vendor you will still have a reference to the original code and a utility like WinMerge will be able to help match up the changes to the original code.
  3. For files that need manual patching use a utility such as WinMerge to find and resolve conflicts. If you make ample comments and left original code blocks in place WinMerge will better be able to help you get the file patches and your customizations back in place.

Good luck on patching your custom cart!