WordPress.org

Ready to get started?Download WordPress

Forums

WP e-Commerce
Dreadful code base. Developers beware. (2 posts)

1 star
  1. Matt van Andel
    Member
    Posted 1 year ago #

    I've been using WP e-Commerce for a couple of years... at first, because it was the only solution that integrated with WordPress in any meaningful and easy-to-use way.

    Unfortunately, this plugin id a developer's worst nightmare. Unbelievable amounts of presentational code that should have been made customizable via template files is instead hard-coded into the core. That's right... if you want to modify basic features like "Customers Also Purchased" templates... you have modify WP eCommerce's CORE. Have fun upgrading that in the future. Unfortunately, that's a common theme here - almost every part of this plugin is programmed in the most haphazard, poorly considered way imaginable.

    The way this package handles of digital downloads is a disaster. Let me explain...

    Adding digital products is pretty straightforward initially... you add files by uploading them to a specific folder on the server, then, when you attach the files to a particular product, a new post is created in a hidden custom post type.

    By itself, that's no issue... but this is where things start to really suck... every time you add a file to a product, even the same file over multiple products, a new post is created with a reference to the file on the server, leaving you with multiple file reference entries in the database. And more bizzarely, the post title is used for the file path while post content is not used - so you can't give files meaningful names nor can you manage your files in any reasonable manner other than by hand using a MySQL editor. So... you now have multiple posts referencing the same file... and those file-posts are linked to products using post_parent. Got it? Ok, brace yourself, this is where it gets messy...

    If a customer buys a product that contains attached files, a guid is generated for each download link and a database record saved with a reference to the aforementioned non-public file-post in the database to obfuscate the files... BUT... if you ever remove a file from a product (i.e. you click the red X in the Edit Product screen), even accidentally, it permanently breaks every link for every existing purchase (of that file) in the database. If you add a new file to the product, WP eCommerce will not generate new links for existing customers... nor does it even provide an option for it... because in the database, download links and purchases/carts are entirely independent. Oh, and WP e-Commerce doesn't allow you create manual orders from the back-end if something gets screwed up (which is all too likely considering the mess that is the code base). Sure, there's a $50 add-on you can buy, but it's broken too, and requires substantial developer hacking to get working.

    Do yourself a favor and avoid this disastrous software at all costs. Check out WooCommerce instead. While it's not perfect either (trust me, no ecommerce software is - and I have developed for all of them), it is much more admin-friendly, developer-friendly and FAR more well thought-out.

  2. There are some major problems with the plugin, absolutely, but (as an unaffiliated developer) do keep in mind that this is the oldest WP ecommerce plugin out there. It is the original and for that, it has had (in the past) to do things in some very, very unconventional manners in order to make things work.

    The code base is huge and it is being completely rewritten, but it takes a really, really long time.

    Aside from legacy code, there are a lot of areas that were originally done really poorly, I'll never deny that.

    While I'm not affiliated officially, I have personally volunteered quite a few hours to help rewrite large portions of the plugins (just finished redoing the coupons UI) to bring them up to par and back in line with development standards.

    Am I condoning the bad code in the plugin? No, not at all. I'm simply saying that things are rapidly turning around. If you'd like proof of how quickly development is happening, checkout the github logs: https://github.com/wp-e-commerce/WP-e-Commerce

    I simply think that as developers (which you labeled yourself as) it is better for us to help contribute to projects and make them better than simply rating them poorly without at least raising the issues with the development team.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.