can I put a "buy now" button on my website

Discussion in 'General Discussion' started by LincolnK, Sep 6, 2011.

  1. LincolnK
    LincolnK Member
    Is there a way to put a "buy now" button on my website?

    That way people can buy it directly from my site with a preset material?

    I have put together a site here:

    www.peculiarproducts.com

    I currently just link to normal SW page for it.

    Lincoln

     
  2. bitstoatoms
    bitstoatoms Member
    Hey Lincoln,

    It is very close to doable, we just need a way to make it easily apply-able for those with no code skills..
     
  3. LincolnK
    LincolnK Member
    Hi Duann,

    Yeah, I am not coder.

    I think this is something a lot of people would want, and the page where they pay could always show links to the main SW site.

    I just know that the more information people have to read, or buttons they have to press, the less likely they are to actually buy the product.

    Since I don't want people to have any options on the materials for some of my designs, if I could just have html code that I could copy and paste that would do the same thing as the "add to cart" button on the normal SW page, that would be perfect.

    Do you think you will work on that?

    Lincoln

     
  4. bitstoatoms
    bitstoatoms Member
    That is pretty much how it would work, but it would need to add it to the Shapeways cart/shop to exit through our payment system
     
  5. LincolnK
    LincolnK Member
    Do I need to do anything to convince SW to make that happen?

    I'd love to have it as an option.

    Thanks,

    Lincoln

     
  6. duann
    duann Member
    This is a good way to let Shapeways know it is a need.

    The more people that make the request the further up the road map it goes.

    Keep em coming...
     
  7. mctrivia
    mctrivia Well-Known Member
    please put it high on the list. This would let people make there own sites that are easier for customers to find and get what they want. The shop stores are seriously lacking.

    All you need is to make a php file that will do background calls to your site build the shopping cart then transfer the customer over to your site with a special get code.

    Web site makers need only upload 1 php file to there site, and 1 javascript file if you wish to use ajax for adding stuff to cart. and then make simple commands like linking to

    phpfile.php?addtocart=123456

    or put the ajax call in the link(best to give both options)
     
  8. LincolnK
    LincolnK Member
    I agree with what mctrivia said. (although I didn't understand a word of it).

    :)

    Lincoln
     
  9. stannum
    stannum Well-Known Member
    So like the widget, but with "buy now" buttons?
     
  10. mctrivia
    mctrivia Well-Known Member
    with the widget nothing is on your site. it is just a crude window into shapeways sight.

    AJAX calls(which is what shapeways uses way to much) can not be executed across different domains. As a fix a simple proxy php script needs to be writen.

    Unlike the widget which will work with absolutely any provider the buy now option would require a hosting provider that allows PHP(most pay some free). Shapeways could auto generate the code by defining commands like this:

    Code:
    
    <? DrawThumb( MODEL NUMBER HERE );?>
    <? MakeLink( MODEL NUMBER HERE );?>
    
    
    in this way you could make a page listing products 1,2, and 3 in the same thumb nail shape as the widget by writing the following code


    Code:
    <? include_once "shapeways_buynowapp.php"; ?>
    
    
    <? DrawThumb(1);?>
    <? DrawThumb(2);?>
    <? DrawThumb(3);?>
    
    

    The first line opens shapeways buy now app. Place on the first line of your page(make sure your page as extension .php instead of .html and the remaining lines open each thumbnail.

    Of course they would need to spend a few hours and write the API first but would be easy to do. And you would have to upload the file they give you to your site.
     
  11. TomZ
    TomZ Member
    It is actually possible to do this already. For instance, the following link will add one of my products to your cart:

    https://www.shapeways.com/shop/cart?uri=/udesign/shop/addtoca rt&model=283647&material_id=22

    There are two important things in the URL, the model ID and the material ID:
    shapeways.com/shop/cart?uri=/udesign/shop/addtocart&mode l=283647&material_id=22

    You can get the model ID from the product URL, for instance:
    shapeways.com/model/283647/offset_skewb_2x2x2.html

    And these are the material ID's:
    Code:
    Grey Robust: 1
    
    White S&F: 6
    Polished: 62
    Black: 25
    Red: 45
    Indigo: 58
    Grey: 59
    
    FD: 60
    FUD: 61
    
    White Detail: 5
    Black Detail: 6
    Transparent Detail: 4
    
    Full color sandstone: 26
    Regular sandstone: 27
    
    Stainless steel: 23
    Gold plated matte: 31
    Gold plated glossy: 39
    Antique bronze matte: 37
    Antique bronze Glossy: 38
     
  12. mctrivia
    mctrivia Well-Known Member
    great. now all we need is a way to add multiple items to the cart. because as soon as i send a customer to that link I can't do anything more.
     
  13. TomZ
    TomZ Member
    No, you could do that but it would be a little more involved. I've put together a demo webpage at http://tomvanderzanden.nl/scripts/multicart.html (NOTE: this adds 6 models to your cart)

    I have set a rather long timeout for the redirect but this is not necessary, in this case I have set it so long just so you guys can click view source before you're sent away.
     
    Last edited: Sep 7, 2011
  14. mctrivia
    mctrivia Well-Known Member
    cool. Looks like I will be doing some programming this weekend.
     
  15. virtox
    virtox Active Member Moderator
    Very cool!