API needed for data feed from vendor...
First of all ...Hello everyone!
I am new to Zen-Cart and we have a new e-commerce website coming up that has a small list of automotive products that will be loaded into the cart store but we have an iFrame catalog from a vendor that they want an API fro the Zen-Cart so their products will wind up in the cart along with the other products for checkout. I don't exactly know what they want me to supply?
Thank you for your help on this....
Re: API needed for data feed from vendor...
Perhaps you could elaborate a little more.
How are the iFrame product to be added? Is it something that comes along like a free product when product x is purchased?
Is the issue getting the iFrame product to be in ZC at all? Is it something that the stock of needs to be tracked? Does a customer select the item(s)? Are they otherwise to be sold?
There's a lot of plugins that can help address many of the solutions to the above questions, but it helps you (and them) to understand what is desired at the end state.
Re: API needed for data feed from vendor...
The vendor supplying the iFrame from their product server which has all the product categories, photos, prices, descriptions, etc provided (about 300 total). These pages also have an "Add to Cart" button for each product. They want us to supply the API info so that "their" products will wind up in teh ZenCart for purchase. ALSO, we have a few dozen other products from other vendors that will be manually loaded into Zen-Cart directly that will have their own pages for viewing, which will also be able to be added to the cart. Stock is racked on the front end of the iFrame supplier, the other manually loaded items stock will manually be maintained, if at all.
Re: API needed for data feed from vendor...
The checkout process in Zen Cart v1.xx is based on having the products in the store's own database/catalog.
So, you'd need to also build a way to suck the product into your store when that iFrame is used to add products to their basket ... not just "show that 3rd-party product in the shopping-basket".
Re: API needed for data feed from vendor...
That's why they want the API parameters from Zen-Cart so it pulls, or is fed, the products into the cart for checkout. Someone will pull up the product from the iFrame pages, click Add to Cart and push it into the Zen-Cart...I have no idea how to do this....
The reason that it is an iFrame format is that their inventory system (the supplier) takes care of quantities, inventory, images, updates, changes, etc.
Re: API needed for data feed from vendor...
Quote:
Originally Posted by ntsllc
That's why they want the API parameters from Zen-Cart so it pulls, or is fed, the products into the cart for checkout.
I think that DrByte answered this as it is not how ZenCart is built to provide services
Quote:
Originally Posted by DrByte
The checkout process in Zen Cart v1.xx is based on having the products in the store's own database/catalog.
So, you'd need to also build a way to suck the product into your store when that iFrame is used to add products to their basket ... not just "show that 3rd-party product in the shopping-basket".
Re: API needed for data feed from vendor...
See, in order for their product to be available to the ZC checkout process, their product has to be added to the ZC database. Doing so on the fly (via something like an iFrame) assuming that the next time the product is displayed/purchased it is again added to the cart (not just updated) then that would introduce a slew of problems.
The easiest solution in the current arrangement of software is for their product to be provided in a format such as a csv file that can be uploaded. Any "API" that they are looking for would pretty much be from scratch or otherwise possibly commercially available.
Re: API needed for data feed from vendor...
Thats what I have been discovering...not sure that will be possible to get the csv though, my customer has purchased an iFrame feed from them at this point....looks like more investigation is needed....
I really appreciate the help on this, Thank Guys!
Re: API needed for data feed from vendor...
All this is not to say one couldn't write some code to insert the product into the DB when their system triggers an API call to your store. (I imagine the iFrame tool has been built to do that upon the item being added-to-cart within the iFrame).
You'd need to write code to:
a) listen for incoming webhooks (ie: a new file named something like listener.php or webhook.php, whatever)
b) in that file would be logic to read the incoming payload of data, parse it, validate it (both against hack attempts and for presence of all required fields of data), and if it passes validation, insert the item into the appropriate ZC database tables
c) return the product-id number that was assigned when inserting it, so the API can attempt to do something to tell your store to 'add to cart' too.
Lots involved there, but that's the general flow I envision you'd need to do.