I'm managing a mid-tier retail website. It is completely custom written code from scratch based on PHP/PERL/MySQL. We want to upgrade the shopping cart portion of the site to include some new features including a more robust coupon/discount management system, gift registry, and a commission system that gives customers credit for referring new customers by giving them a credit equal to a percentage of the new customer's first purchase.

Trying to avoid reinventing the wheel as I know there are shopping carts out there with discount/coupon and gift registry features. I'm guessing though we'll probably have to custom code the referral commission system though.

Here are the main requirements:

- Cart has to be in PHP and open source (we can modify it to our heart's content).
- Cost for code must be under $1000.
- Must use MySQL for data storage
- Code must be mature (have been in existence for at least a couple years with a sizeable user community of developers that use it.)
- Must at least have a coupon/discount management module and some sort of Gift Registry/Wish List function.
- Must have a well thought-out streamlined Checkout process similar to Amazon.com or better.

We did some research a year ago and ended up going with X-Cart. However we got sidetracked on other projects and sort of abandoned trying to mod X-cart for several reasons.

1) They kept putting out security updates which were getting more and more cumbersome the more we modified the code. This would be a problem with any system we modify though. The problem really is that X-cart is one of the most popular PHP Shopping Carts so it is a BIG target for hackers. If someone identifies your cart as an X-cart system then you are vulnerable to any well-published exploit that has not been patched. We'd ideally prefer a lesser known product that is close to being as robust/solid as X-cart but less prone to exploits.

2) Their coding was not very straight-forward and there was absolutely no source code documentation for all the modules, subroutines, include files, templates. What a mess to have to figure out. But we did spend the time to do it and learn how to program SMARTY templates which we have mixed feeling about.

3) Their checkout process was not well thought-out. This was very shocking for such a popular shopping cart. We spent many hours greatly improving the flow and layout of the checkout process based on many hours of A/B testing with our previous custom cart. Many of the modifications were simple common-sense things. Very disappointing that they didn't put more brain power into designing a better checkout process.

It seems the only other alternative that had a good chance of meeting our requirements was CubeCart. But here I am a year later, about to take the plunge and either dive back into X-cart or try something else. Really hate to have to spend the time to build something from scratch, but if there isn't a PHP Open Source product out there with it's act together, then maybe I have no choice?