I run a diamond database service for jewelers that lets them add a “Loose Diamond Search” option to their website.
I am trying to integrate it smoothly with Magento.
Here’s my question:
A surfer searches through a database tens of thousands of diamonds on our serice and finds the one they want. I want to be able to put an ADD TO CART button next to it that will put this diamond in their Cart.
Here’s the challenges:
1) Each diamond has it’s own stock number and product details (carat, clarity, color, etc) that I would like to appear in the cart.
2) Every diamond has a different price.
2) This database of diamonds updates constantly throughout the day, so it would be impractical to manually import the entire database everyday (unless it could be done automatically or periodically throughout the day).
3) The database is on a separate server from the Magento system.
4) If the customer doesn’t end up buying the diamond, I’d like it to “just go away” and not remain in the inventory.
5) I’d like the product to not appear in the search results or category listings.
Is there a way to automatically create a product dynamically?
I would like to be able to do something similar to:
<b>Method 1)</b>Have an ADD TO CART button on my site that links to an add-to-cart function on the Magento server, similar to:
<a href="http://store.com/add_to_cart.php?SKU=DIAM1234&Desc;=1.25+Carat+Round&Price;=123.45&Details;=Blahblahblah&md5;=sjf88787gf87gf8f8g78fg"> ADD DIAMOND TO CART </a>
I’d like to be able to just pass the parameters on the querystring and have it go directly into the cart and redirect to the View Cart page. (I’d like to use the md5 with a secret salt value to validate that parameters hadn’t been changed or some similar security measure to make sure they don’t change the price to $1.00 and check out). Ideally I’d like the products to be visible only to the session/account that generated it.
<b>Method 2)</b> Have my system call a function to add the diamond to Magento in the background somewhat like:
and then have the front-end send the user to something like:
Obviously the URL’s are pure fiction, but hopefully you get the idea of what I am trying to do.
Q 1: Is there any way to do this in Magento out of the box?
Q 2: Is there any Addon that would allow something like this?
Q 3: How hard would it be to make something that would do this?