Any nice BUY NOW Shapeways button I can use on my website?

Discussion in 'Shapeways Shops' started by TOM_TOM_TOM, Nov 22, 2011.

  1. TOM_TOM_TOM
    TOM_TOM_TOM Well-Known Member
    Is there a BUY NOW button I can use to add a link on my own website to the shapeways model page, similar to Paypal's BUY buttons?
     
  2. virtox
    virtox Active Member Moderator
  3. TOM_TOM_TOM
    TOM_TOM_TOM Well-Known Member
    Thanks for the tutorial.

    But the example page doesn't actually work.
    https://www.shapeways.com/topics/udesign/tutorials/shoppingca rt/shopexample.html

    It doesn't add the items to the cart, just shows an empty cart. Is there something wrong with the code?

    Here is the code I have for one of my products, it doesn't add to the cart either.

    <form name="Nomad Panohead +5" action="https://www.shapeways.com/addToCart" method="GET">
    <input type="hidden" name="model_id[]" value="387585"/>

    <select name="material_id[]" >
    <option value='25'> black $145 </option>
    <option value='59'> gray $145 </option>
    <option value='58'> indigo $145 </option>
    <option value='45'> red $145 </option>
    <option value='6'> white $130 </option>
    </select>
    <br/>
    <p style="float:right">Shapeways</p>
    <input type="image" name="submit" id="add-to-cart" src="../../images/buy-button.jpg" alt="add to cart" value="Checkout"/>
    </form>
     
  4. TOM_TOM_TOM
    TOM_TOM_TOM Well-Known Member
    I tried playing with the link and this looks like it works if pasting directly into the browser, but it doesn't work when I try to modify the link and names in the form menu. Is there something I am missing in the form syntax?:
    www.shapeways.com/cart/add?itemId=302496&materialId=23

    The link format from the tutorial was this:
    https://www.shapeways.com/addToCart?model_id[]=302496&material_id[]=23

    Strangely, after adding an item to the cart and 30 minutes, all the items from the several attempts showed up in the cart. But when I try repeating the process the items haven't showed up again.
     
  5. baltimore
    baltimore Member
    I've been working recently on building www.custom3dstuff.com/shop using the shapeways cart. check it out and let me know what you think! who else is building a site like this?
     
  6. LincolnK
    LincolnK Member
    baltimore,

    I checked it out. I even clicked on the buy it button and it worked.

    It would be great if SW made an easy way for us to do this.

    Lincoln
     
  7. baltimore
    baltimore Member
    it wasn't so hard to set up. i used the sample code, and modified it some, copied the css 'definitions' to the css section on my site and then everything just kinda worked. the hardest thing is going to be updating when materials change or prices change.

    it'd be sweet to have a generate javascript button in some advanced panel that made the code for you for whatever materials and markup you had selected, but i think maybe that feature would be tailored to too tight an audience