Now that Discount Chooser is becoming the gold standard for discounting offers in ZenCart, osCommerce, and (soon) OpenCart, I have decided to reduce the price of Better Together Admin.Better Together Admin for Zen Cart and Better Together Admin for osCommerce are now price reduced to just $30 for software only, or $90 for the software plus installation. If you have been holding off on buying the Better Together Admin Panel, now is your chance.
If your discounting needs are limited to BOGO style offers, Better Together is still a great choice, so I hope a lot of people will take advantage of this lower price.
This is the second post in my series on the development of my discounting module for OpenCart that includes an admin panel. I have called the module “Discount Chooser.”
You can see from this video how a “Buy 2, get 1 at 50% off” discount works with Discount Chooser.
I have said for some time that I’d do a discounting module for OpenCart that included an admin panel. Well, I’m finally working on it. It’s basically Free Gift Chooser, but I used a different name to signal that you could do discounts as well as free offers. So for the next little while I’ll be blogging about the progress of Discount Chooser for OpenCart.
Better Together is a BOGO discounting module I created for Zen Cart. I have ported the logic to a few other carts (osCommerce, Prestashop, and OpenCart), and this post pertains to the OpenCart port.
The first release of the Better Together for OpenCart module was for OpenCart 1.5. Then I made a handful of tweaks for compatibility with version 2.0. Now I knew I had to upgrade for 2.3 compatibility, but since the version 2 changes were pretty easy, I honestly thought upgrading for version 220.127.116.11 of OpenCart would be trivial. I was wrong! There were a few tricky things, and I’ll share them here in case other software developers are working on upgrading their pre-2.3 extensions.
- The file paths are different. All file paths now include “extension” directories. So instead of
catalog/model/total/better_together.php, the file path becomes
- The inheritance hierarchy is different. So instead of declaring your model class as ModelYourClass, it’s ModelExtensionYourClass, which extends Model.
- This is what really tripped me up. Because the 2.3 base class overrides getters and setters, you have to be sure to declare all your class variables so that magic methods won’t be used to access them(*). If you came out of PHP4, this is a bit of an adjustment, but there you are. The positive thing is that it makes your code more self-documenting.
(*) If you don’t do this, you’ll get the “Indirect modification of overloaded property has no effect” fatal error.
I have done a bit of dabbling in OpenCart, and one of the things I did was port my Better Together module to that platform. Well, after I had done that they did a major new release that changed a number of things, so I had to rework the mod for OpenCart 2.0. I just released that work, so OpenCart users can now download it. Check out Better Together for OpenCart.