Zencart Plugin Framework – Day 1 – Installation

Today I’m gonna post the first post of a series of posts on our newly released Zencart Plugin Framework (ZePLUF) which has been built to make working with Zencart much easier.

After working for years with Zencart, we have felt that even though it’s a great shopping cart, it has many limits:

  1. Plugins: the way it is now, installing a plugin usually involves copying the plugin files into many different places in the cart, it’s complicated and error-prone. Another issue is that when you later remove the ones you don’t need, it’s very easy to leave some thing behind not noticed.
  2. Translation: Zencart is using php “defines” to allow the creation of multi language sites. The issue is that this method is tedious for developers, and very error-prone for normal users.
  3. Templating: Zencart’s current template system doesn’t allow us to easily “inject” a piece of code into it. To put it simply in plain English, if I have a plugin which will display the top 10 products on my homepage, I will have to edit the homepage framework and put some code in. Later, if I decide to remove the plugin, I obviously have to edit the files again to remove the code. This complicates things and makes working with Zencart much more difficult than it should be.


The Zencart Plugin Framework is developed to solve all those above issues and more. So now with that in mind, if you are interested in it, lets get started with the installation process which is not that complicated.

Requirement

You will need PHP 5.3 or newer to be able to use ZePLUF. The reason is that this plugin makes use of a bunch of Symfony 2.0 bundles which require PHP 5.3 or newer to work.

Installation

The plugin is put on GitHub at: https://github.com/yellow1912/ZenCartPluginFramework

There are 2 ways to install it: you can either clone the git* repo (which allows you to use the latest code) if you are familiar with Git, or you can visit the download section to grab a package.
* Note that if you go for the git option, you will have to get all the sub modules as well. You can do “php install/vendors.php” via the git bash console to pull all these modules. Make sure that you get EVERY submodule, sometimes for some reason 1 or 2 module may not be dowloaded.

Step 1

Create a folder named “plugins” in your Zencart’s root folder. This “plugins” folder should be on the SAME level with your admin and includes folders.

The whole ZePLUF folders/files should be placed inside this plugins folder.

Step 2

You will find inside the ZePLUF package you downloaded, there is a folder named install, inside this folder you should find:

  1. zencart/includes folder: all files/folders inside this folder should be moved to your Zencart’s includes folder which should be right at the root of your Zencart.
  2. zencart/your_admin_folder folder: all files/folders inside this folder should be moved to your Zencart’s admin folder.
  3. zencart/index.php file: this file should be moved (and overwrite) your current Zencart’s index.php. If you have edited your index.php file before for some other purposes, you may need merge the 2 files using a software such as BeyondCompare or WinMerge.
  4. zencart/ri.php file: this file should be moved to your current Zencart’s root.

And that’s it, the installation should be completed now. If you run into errors such as “blank page error” you may want to turn on the debug and see what’s happening.

If you want us to do it for you, we also offer commercial installation service which we will post a link here soon.

That’s it for today and on day 2 we will learn how to install plugins with this framework and how to use some of its basic features.

12 Comments

  1. Dan says:

    Thank you so much for instructions! Also, does the framework work with all zen cart versions or just some 1.3.9 or 1.5.0 for example? And can we use riSsu module with it or it just for zenmagick specifically? Thanks again! Can wait till day 2!

    Reply
    • admin says:

      It should work with all 1.3.x and newer version, haven’t tested on older version. Obviously this module needs php 5.3 and older versions do not support that.
      There is a newer, better riSsu designed just for this framework. We will cover that soon. Thank you for waiting, I will try my best, so busy these days.

      Reply
  2. [...] admin | May 24th, 2012 |  Zencart| 0 commentOn day 1, I have introduced to your our new Zencart Plugin Framework, what you will get from it and how to install it, today I will cover the configuration of the [...]

    Reply
  3. Paolo De Dionigi says:

    Hi, it seems very interesting (not already tried), thank you!
    Just a little thing: Step 2, number 3: there’s no zenmagick in the rep.

    Reply
  4. Paolo De Dionigi says:

    Thank you Raine, it was that, my fault.
    About the forum, it requires to be logged, but don’t see how to register.

    Reply
    • Raine Ng says:

      Oops, I changed to bbpress: https://rubikintegration.com/forums

      Let me know if it works now

      Reply
      • Paolo De Dionigi says:

        Tried to register few minutes ago, but the activation e-mail still not arrived (used a gmail address).

        Since I’m here, I start asking here

        It seems that the framework rely on a subset of zenmagick, mainly related to symfony, rigth?

        Well, it isn’t in the repo of the framework, so how I keep it synced?
        I saw that a couple of hours ago you pushed a lot of file in the zenmagick repo. There was something related to the subset of zenmagick in use by the framework?
        Could you add this subset in the framework repo?

        Another thing:

        zenmagick/vendor/symfony/src/Symfony/Component/Config/.git/objects/pack

        here there are 2 big files (1+7Mb)

        Must they stay there?

        Other similar files (in .git folder) in other folders, bringing the size of symfony folder to 15/19 Mb.

        Not very used to git, so here is my question: I keep my local repo in sync with yours (hoping for zenmagick subset to be included in framework master repo) and make ftp transfer on websites where I want to install the framework.

        Is there an automathed way to not transfer .git folders? (If they need to stay there)

        Thank you

        Reply
        • Raine Ng says:

          Please check your spam box, we have a few issues with our mail server now

          It seems that the framework rely on a subset of zenmagick, mainly related to symfony, rigth?
          –> correct

          Well, it isn’t in the repo of the framework, so how I keep it synced?
          –> you should run “php riPlugin/bin/vendors.php”. Or you may grab the download package, I believe in that package I do put all the 3rd party vendors there

          Another thing:

          zenmagick/vendor/symfony/src/Symfony/Component/Config/.git/objects/pack
          here there are 2 big files (1+7Mb)
          Must they stay there?
          If you have used SVN before, no you dont really need to upload those .git folders to your site, these are similar to .svn when you use svn.

          Is there an automathed way to not transfer .git folders? (If they need to stay there)
          –> I believe that many FTP clients can allow you to exclude folders/files when you upload/sync

          Reply
          • Spike00 says:

            Please check your spam box, we have a few issues with our mail server now
            –> Found it, thank you.

            Well, it isn’t in the repo of the framework, so how I keep it synced?
            –> you should run “php riPlugin/bin/vendors.php”. Or you may grab the download package, I believe in that package I do put all the 3rd party vendors there
            ––> I got it, but I was wondering if you could add the subset to the framework repo or to create its own repo, since otherwise we should periodically run “php riPlugin/bin/vendors.php” just to see if there are changes.

Leave a Reply