Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hundebol 167 posts 314 karma points
    May 21, 2010 @ 11:20
    Hundebol
    0

    Simple cart with email checkout

    Hi,

    I am trying to use the Simple Cart JS (http://simplecartjs.com/) in umbraco, as Bob Baty-Barr mentioned it in another post on the forum.

    It works pretty well, as what goes for adding items to the cart - but checkout is the real problem!

    I need to checkout, by having the system sending a mail. (SimpleCart by default uses Paypal or Google Chekcout)
    Has anyone tried this with simple cart?

    I found a email checout solution on their Github - but it send the cart to a PHP-page (http://github.com/thewojogroup/simplecart-js/tree/email)

    I must say, I'm not too much of a hardcore developer, but maybe it's easy to change.
    Hope some is able to steer me in the right direction.

    best regards
    hundebol

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 21, 2010 @ 12:56
    Dirk De Grave
    0

    Hi,

    Should be failry straightforward to implement the email checkout. Find this piece of code in the js

     

    me.emailCheckout = function() { return; };

    in this function, you'll have to build some similar code to what's been there for both Paypal and GoogleCheckout, but need to change the url to post to. I'd create a page in umbraco (use that url for form posting) and put a simple user control on the page that'll handle getting the cart items from the form that's posted and sending a mail to a specified email account with all relevant information regarding the shopping cart items and other interesting info

     

    Hope this helps.

    Regards,

    /Dirk

     

  • Hundebol 167 posts 314 karma points
    May 21, 2010 @ 14:09
    Hundebol
    0

    Hi Dirk,

    appreciate the help :)

    the code in the js looks like this

        me.emailCheckout = function() {
            var div = me.updateCartView( document.createElement("div") );
            div = "<div class='simpleCart_items'>" + div.innerHTML + "</div>";
            $.post("email.php" , {div:div} , function(data) {
                alert( data );
            });
        };

    So it's just like you said - and it sends to a .php-page.

    I have tried putting in a normal html page, put then nothing happens when clicking "checkout".

    Does it look like any of the code could be reused - javascript is not my best.
    I know how to make the user control to send the mail - så it's really just how to get the js to post the cart to my user control.

    best regards
    Hundebol

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 21, 2010 @ 15:18
    Dirk De Grave
    0

    Hundebol, 

    A normal html page won't do anything but displaying html, you'd need an aspx page (or any other page that supports server side scripting) to get the form details that are posted through the jquery post() method.

    Did you try using an aspx page?

    me.emailCheckout = function() {
           
    var div = me.updateCartView( document.createElement("div") );
            div
    = "<div class='simpleCart_items'>" + div.innerHTML + "</div>";
            $
    .post("a-page-on-my-webserver.aspx" , {div:div} , function(data) {
                alert
    ( data );
           
    });
       
    };

    Cheers,

    /Dirk

  • JAKE 1 post 21 karma points
    May 27, 2010 @ 22:45
    JAKE
    0

    Hey there,

    i am trying to let customers checkout via filling out a from that will then email me the info, but do not know how to get simplecart to include what is in the shopping cart.

    i am using wordpress and a theme called viroshop,

    any ideas??? 

  • NikiGee 1 post 21 karma points
    Sep 27, 2010 @ 21:04
    NikiGee
    0

    Hello!

    I am using a weebly website and am only mildly knowledgeable in html. I need a shopping cart with just email checkout too. However, weebly does not support any server-side scripting. The pro-account will not accomodate email checkout either, so Weebly management said I am welcome to use an embeddable cart. So I found simplecart js -- however it is asking for either a googlepay or paypal account to set up. I don't have either and am unable to set up unless I go back to north america (not!). Any ideas on how i can accomplish this without php or asp? I am just thinking that if simple cart can send the info to paypal, surely it can send it to me instead, no? Appreciate any and all input! Thanks, Niki

  • aaeda 117 posts 150 karma points
    May 05, 2011 @ 10:54
    aaeda
    0

    Hi Dirk

    I am using simplecart js and  have been using an aspx page, same thing as you mentioned in your post. But the problem is the page is not doing/returning anything.

    Do you have any idea why this could be happening? Can it be the jquery file I am using?

     

    thanks

    Aaeda

     

Please Sign in or register to post replies

Write your reply to:

Draft