Categories
eBay Integration

T-10 Seconds and Counting …

The eBay Integration for Zen Cart Plug-in is ready for its initial release. I’ve cleaned up the code and updated the online documentation.

Categories
eBay Integration

eBay Integration – Polishing

The eBay Integration project for Zen Cart is working well on our web site. But, before I make it available to others, I decided to make it work a little better.

The process for adding Zen Cart products to the eBay store was a little too cumbersome. I had a tab where you could list and search for products then select a product to edit. The editor allowed you to manage additional product information needed to list the items on eBay. Then, to actually add the products to eBay, you would select a menu option on the Tools tab. If any products failed to add, you would have to go back to the Products tab to edit the product before trying again.

I took some time to rewrite the code so that listing, searching, browsing, and editing products is much easier (and the code will be much easier to maintain). To add a product to eBay, you just click a button when the product is displayed. Any errors are reported on the same page so you can easily edit the product to fix them and try again.

For now, at least, once the product is listed on eBay the eBay Integration system keeps the inventory in sync between the Zen Cart store and eBay. But, if you modify a product attribute – such as the description – in Zen Cart, the corresponding eBay listing will not automatically be updated. I think that will work okay and be less confusing. Currently, I review each eBay listing after it is completed and tweak it as necessary. Even with this extra step, listing products using this plug in for Zen Cart is much easier and quicker than entering then through eBay’s web site.

Categories
eBay Integration

eBay Integration – Creating the Plug-In

The latest version of Zen Cart includes a new method of defining plug-ins. Even though it is still being developed, subject to change, and not well documented, I’m using it for my eBay Integration plug-in because it has a big advantage over the older method of defining a plug-in.

In the past, a plug-in’s files were stored in multiple places in the Zen Cart directory structure and some plug-in files actually overwrote existing “core” files. This made updating and maintaining both the plug-in and Zen Cart difficult. The new method puts the plug-in files in one area and offers a cleaner way to upgrade.

Unfortunately, due to some limitations of the plug-in manager, I have had to put some of the eBay Integration files in other locations. But, I have developed the plug-in so that it does not require modifying any of the Zen Cart core files or any of the existing database tables. This will make maintenance and upgrading easier and less risky.

The plug-in is “installed” in the Zen Cart zc_plugins folder in a folder called ebayintegration which contains a folder called v1.0.0 which, obviously, is the version of the plug-in . In that folder is a file called manifest.php which describes the plugin.

<?php

return [
    'pluginVersion' => 'v1.0.0',
    'pluginName' => 'eBay Integration',
    'pluginDescription' => 'eBay Integration for Zen Cart.',
    'pluginAuthor' => 'Roger Smith (sales@jonrocket.com)',
    'pluginId' => 1818, // ID from Zen Cart forum
    'zcVersions' => ['v157'],
    'changelog' => '', // online URL (eg github release tag page, or changelog file there) or local filename only, ie: changelog.txt (in same dir as this manifest file)
    'github_repo' => '', // url
    'pluginGroups' => [],
];
Code language: HTML, XML (xml)

Zen Cart uses the manifest to install and enable the plug-in through the Zen Cart admin Plug-in Manager. As you can see, it defines things like the name of the plug-in, developer, and version number.

Also in the v1.0.0 folder are two subfolders – installer and admin.

The installer folder contains a PHP file called ScriptedInstaller.php. As the name implies, this is code that installs the plug-in. It calls a method to register the eBay Integration administration page and add it to the Zen Cart Tools menu.

The admin folder contains subfolders that mirror the structure under the main Zen Cart admin folder (which you should have renamed). In the admin folder is the code for the eBay Integration administration page, ebayintegration.php.

Under the admin folder is an include folder. As mentioned earlier, this folder mirrors the admin/includes folder in the Zen Cart root folder. So, the includes folder contains folders that define the classes, CSS, images, language, and other stuff used by the plug-in.

I’m not sharing the code, yet, because it is still under construction.

Categories
eBay Integration

eBay Integration – Integrating eBay and Zen Cart is a Challenge

You have a choice of many commercial plug-ins for Zen Cart which offer integration with eBay (and other marketplaces like Amazon and Wal-Mart). These tend to be expensive and many charge a fee per listing or sale. This is understandable because eBay integration is hard!

Making Zen Cart and eBay work together can be a challenge. This is mainly due to the number of options offered by eBay.

To reduce the challenge, my version of eBay Integration is mostly meant to satisfy our specific needs and not compete with the more complete solutions offered by others.

The initial version of my eBay Integration support for Zen Cart plug-in only works with the US version of eBay. Adding support for other countries shouldn’t be too difficult, but we only have an eBay store on the US site, so it is most important that we get that working first.

The other big limitation, at least for now, is that variations (size, color, etc.) won’t be handled. It’s not really the right way to do things, but we create separate products for each variation in Zen Cart and eBay.

A minor limitation will be that adding of products to eBay won’t be fully automated. The tool will create eBay listings from your Zen Cart products, but you will have to edit them (once!) in eBay before activating them in the tool. This is so that the tool doesn’t have to support all of the shipping options and business policies offered by eBay.

Finally, I am going to require you to get your own Developer Tokens for accessing eBay’s Application Program Interface (API). This saves me from having to get the plug-in approved by eBay while allowing you to update or modify it to support your specific needs.

Categories
eBay Integration

eBay Integration – Integrating Your Zen Cart Store and eBay Store

One of the first things I did after creating our online Zen Cart store was to write code to integrate it with our Ebay store. The code adds new listings to eBay when we add new products to our Zen Cart store. Then it keeps the eBay and Zen Cart inventories in sync as products are sold and restocked.

The original code was written quickly for Zen Cart 1.3.9a and served us well for many years. But when we finally upgraded to version 1.5.7a/b I decided to take a bit more time to make the code more maintainable and presentable.

This post is a first in a series describing the eBay Integration for Zen Cart project. The code is not quite ready to share yet, but when it is, I will offer it as a free download.