Embedding Sculpteo content
Hi,
I'm completely new to Commerce (just set up Kickstart 2 a few days ago). Not so new to Drupal, but by no means a professional developer. Hobbyist might be a good description.
Well, I want to build a store that takes advantage of the api provided by www.sculpteo.com for their 3D printing services. Using their webAPI, it is possible to embedded their service without their branding. I'll link to their WebAPI documentation pages where you can read about it if you want.
The short version and the basics of my question.
I have various ways to embed their content,
a) Via a special div - <div class="sculpteo_thumbnail" style="width: 250px; height: 350px; position: relative"></div>
(more info here)
b) Or using an iframe - <iframe type="text/html" width="250" height="350" src="http://www.sculpteo.com/en/embed/thumbnail/22827170155872258460069652532... frameborder="0" scrolling="no"></iframe>
(more info here)
c) Or using a button which opens a popup overlay - <div class="sculpteo_button" click="order"" uuid="CWU47edB"></div>
(more info here)
Some javascript is required too, but no issue there.
My question is how, or where and which way would you get that content into Commerce? I think my problem is one of choices... I could get it happening in Drupal generally, but a little unsure about Commerce specifically.
I did notice one way which was a button to a popup overlay, which would be easy enough to add I guess. But then how best to handle the returning response to a 'add to cart' click assuming I want to handle the transaction on my site and not on Sculpteo?
I'm a little confused as to where to start. Knowing where to start, I can probably do my own work from there to move it along quite a way... but I'm a little stuck right now figuring out which way to hold it!
Thanks for all help provided,
Miles
Comments
Thanks Josh,
The idea to draw it out will help me make sure I understand the process. Good for sanity. Sculpteo appear to have built their system with all that in mind, allowing me to handle the shopping cart side of things. They throw back to me a price and order number etc. Then I have to make sure the money actually goes to the right place afterwards.
A Drupal developer friend has pointed me in the direction of a field with the Sculpteo uid number, which I can format to become part of a the special div (or iframe or whichever method I want to use) in a tpl file somewhere.
However, the issue of dynamic pricing (depending on the final configuration of the printed item - it can change a little bit) plus my mark-up might need to be solved in the way you suggest. I hadn't stopped to worry about that side of things just yet... until you mentioned it. And it is an equally important problem to solve!
Miles