Forums / All Other Contributions/Addons / eBay Integration for Zen Cart Plugin

eBay Integration for Zen Cart Plugin

Views: 5,792

Results 1 to 13 of 13
23 Oct 2022, 4:31 PM
#1
jadebox avatar

jadebox

New Zenner

Join Date:
Jul 2009
Posts:
18
Plugin Contributions:
1

eBay Integration for Zen Cart Plugin

I've uploaded a plugin I wrote and use on our site that integrates our eBay store with eBay.

https://www.zen-cart.com/downloads.php?do=file&id=2357

One of the first things I did after creating our online Zen Cart store more than ten years ago was to write code to integrate it with our Ebay store. I looked at some commercial offerings but based on the initial cost and per-transaction or monthly fees, they didn't seem practical or suitable for a smaller store like ours. So, I wrote my own code for calling the eBay API from our Zen Cart 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 on either site and restocked in your Zen Cart store.

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. So, I rewrote it as a plug-in.

To make it easier for everyone I designed this plug-in to not overwrite or change any core or template Zen Cart files. It also doesn't modify any of the existing databases. It installs using the new Plugin Manager.

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, the plug-in is mostly meant to satisfy our specific needs and not compete with the more complete solutions offered by others.

The plug-in currently only works with the US version of eBay and requires that you have an eBay store. Variations (size, color, etc.) are not handled. (It’s not really the right way to do things, but we create separate products for each variation in Zen Cart and eBay.)

Also, since the plug-in directly calls the eBay from your server, it requires you to get your own Developer Tokens for accessing eBay’s Application Program Interface (API). There is no charge for joining or using eBay's Developer Program.

Instructions for installing and using the plug-in are included in the archive that you download as well as online at https://jonrocket.com/ebayintegration/documentation-setup.html

The plug-in is free to use, but donations to support its development are appreciated.

This is my first publicly released plug-in for Zen Cart and is one of the first plug-ins to use the new Zen Cart Plugin Manager. So, there may be some hiccups at first. Please reach out if you have any issues installing or using it and I will try to help.

23 Oct 2022, 5:02 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: eBay Integration for Zen Cart Plugin

Thanks for sharing your work with the community. I have updated the plugin page to have a link to this support thread.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Oct 2022, 5:42 PM
#3
jadebox avatar

jadebox

New Zenner

Join Date:
Jul 2009
Posts:
18
Plugin Contributions:
1

Re: eBay Integration for Zen Cart Plugin

Thanks. I was going to ask about that. Also, I need to know the ID number to use in the manifest.

23 Oct 2022, 7:12 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: eBay Integration for Zen Cart Plugin

The id is just the id parameter from the link to the plugin. So for yours it would be 2357.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

24 Oct 2022, 1:25 PM
#5
jadebox avatar

jadebox

New Zenner

Join Date:
Jul 2009
Posts:
18
Plugin Contributions:
1

Re: eBay Integration for Zen Cart Plugin

I uploaded a new version already. It's available at:

https://www.zen-cart.com/downloads.php?do=file&id=2357

I fixed a few minor bugs that were introduced as I cleaned up the code for release.

The main issue that this update fixes is that the "Commit" option of the Batch Update Tool wasn't working. That's fixed now.

To upgrade just extract the archived files and copy them into your store's folder so that they overwrite the existing files.

27 Oct 2022, 4:58 PM
#6
jadebox avatar

jadebox

New Zenner

Join Date:
Jul 2009
Posts:
18
Plugin Contributions:
1

Re: eBay Integration for Zen Cart Plugin

Apologies for another quick update ...

https://www.zen-cart.com/downloads.php?do=file&id=2357

I've uploaded version 1.0.0b of the plug-in. The main change is that it adds an observer so that the quantities of eBay items are updated immediately after a Zen Cart order is placed.

I also updated the setup instructions in install.txt to describe how to set up a handler for eBay Account Deletion Notifications which is somethign required by eBay for sites using their API.

If you have already installed the plug-in, extract and copy the files from the new zip file so that they overwrite the existing files in your store's folder. Then follow the instructions for handling eBay Account Deletion Notifications.

Note: The observer that is called after a Zen Cart order is processed might cause issues if your eBay configuration for the plug-in isn't working yet. If so, you can temporarily disable it by renaming auto.ebay_integration.php in the includes/classes/observers folder to disable.ebay_integration.php. Rename it to auto.ebay_integration.php once your eBay integration is working in Admin.

23 Jul 2023, 2:36 AM
#7
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

Thank you for writing and submitting this plugin. I have a client who wants to use this so I installed it on a 1.5.8a test store.

I'm getting this error when trying to install it. I can provide the full log, if you need the additional details.

--> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''ebay_cache' (
'ebay_cache_id' int(20) NOT NULL,
'cache_key' varchar(256) NO' at line 1 :: CREATE TABLE IF NOT EXISTS 'ebay_cache' (
'ebay_cache_id' int(20) NOT NULL,
'cache_key' varchar(256) NOT NULL,
'cache_value' mediumtext NOT NULL,
'cache_date' date NOT NULL DEFAULT '2000-01-01',
'keep' tinyint(1) NOT NULL DEFAULT 0
PRIMARY KEY ('ebay_cache_id'),
UNIQUE KEY 'cache_key' ('cache_key'),
KEY 'keep' ('keep'),

Jim
Wheaton Website Services

9 Mar 2024, 2:02 PM
#8
wyrdgifts avatar

wyrdgifts

New Zenner

Join Date:
Mar 2024
Location:
Montana
Posts:
7
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

Hello,

I tried to use the integration, but it won't install. I get this message when I try to install it on zc:

WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.

I don't know if I did something wrong when I added the 3 files to my folders or if it's something else. Do you have directions for dummies or do you help non-tech people?

Thank you

9 Mar 2024, 2:29 PM
#9
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

WyrdGifts:

Hello,

I tried to use the integration, but it won't install. I get this message when I try to install it on zc:

WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.

I don't know if I did something wrong when I added the 3 files to my folders or if it's something else. Do you have directions for dummies or do you help non-tech people?

Thank you

https://docs.zen-cart.com/user/troubleshooting/error_occurred/

This should help you. The first place to look for such a WARNING is a myDEBUG-xxxxxx.log in your logs folder.

Simon

17 Jun 2024, 1:54 PM
#10
dreadscott avatar

dreadscott

New Zenner

Join Date:
Jul 2011
Location:
Hainesport, NJ
Posts:
13
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

I'm running v1.5.8a and get the same exact "WARNING: An Error occurred, please let us know!" output. Applying the SQL patch also locked me out of my back end access (with a 500 HTML error result). The debug log demonstrates the same sort of PHP response, too:

--> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(ebay_cache_id),
UNIQUE KEY cache_key (cache_key),
KEY keep (keep)' at line 7 :: CREATE TABLE IF NOT EXISTS ebay_cache (
ebay_cache_id int(20) NOT NULL,
cache_key varchar(256) NOT NULL,
cache_value mediumtext NOT NULL,
cache_date date NOT NULL DEFAULT '2000-01-01',
keep tinyint(1) NOT NULL DEFAULT 0
PRIMARY KEY (ebay_cache_id),
UNIQUE KEY cache_key (cache_key),
KEY keep (keep),
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ==> (as called by) /zc_plugins/ebayintegration/v1.0.0/Installer/ScriptedInstaller.php on line 30 <== in /includes/classes/db/mysql/query_factory.php on line 667.

Is there a fix to this?

17 Jun 2024, 2:01 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: eBay Integration for Zen Cart Plugin

I *think *that'll be corrected by removing the trailing comma (highlighted) from this portion of the SQL query

KEY `keep` (`keep`)[B],[/B]
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
10 Nov 2025, 5:03 AM
#12
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

Has it been tested with zen cart 210? Or do you think it might work? Thanks.

24 Sep 2026, 9:27 PM
#13
capfka2 avatar

capfka2

New Zenner

Join Date:
Sep 2018
Location:
United Kingdom
Posts:
1
Plugin Contributions:
0

Re: eBay Integration for Zen Cart Plugin

I have ZC v1.5.8. Since my host will have the latest versions of PHP etc., which version of this plug-in would work. If any?

Thanks