Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    10
    Member #
    31244
    Hello!

    I have run into some troubles.

    I am creating a website that sells custom cabinets. The buyer puts in their dimensions and a price is calculated using Javascript. They can then pay for the cabinets via FatFreeCart (www.fatfreecart.com), and then they will be redirected to another page from Paypal after payment is complete.

    I am wondering if there is a way to send the form data from the purchase page (the buyers dimensions of the cabinets), and send it to my email address when they arrive at the landing page after payment.

    Here is what I have so far: http://tinyurl.com/asj88cu

    Is this possible?

    Thanks.

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Couple questions ?

    1. Why use JavaScript for the calculation ? What happens if the user has JavaScript turned off ?

    2. If you're using PayPal for payment processor, why the 3rd party cart you mentioned above...

    PayPal is a payment processor, they don't care what you are selling or for how much, you basically send them 2 things, a $ value and a description of the product they are paying for... Once they process the payment based on the users choices... You specify where to send them back to your site at...

    That bein said, it should be easy enough to do your calculations server side ( PHP or asp ), present the visitor with a purchase now button... Or pay now button.... When the user clicks on it... You can send the email with whatever info you want, then redirect them to pay pal...

    Of course, it would be better to put the infor into a DB, then wait until pay pal sends them to the confirmation page, to verify they actually did pay... Before sending the email... But that's just the way I would do it...

  4. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    10
    Member #
    31244
    I was using the third party cart for the ability to purchase multiple cabinets in the same visit, but I have switched to buy now buttons.

    That being said, PayPal only allows a maximum of three options to be sent with their form. I have 66.

    Right now I have a simple PHP form that sends the 66 options to an email, and the PayPal buy now form action. I don't know much PHP or any ASP, but am looking for a way to send both forms at the same time, or to save the input data when they click the buy now button, and then send it when they reach the confirmation page.

    Either way, I'm lost in terms of what to do.

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    I have to ask

    What is the maximum number of options that have ever been purchased ? 66 ?

    I guess as alluded to before, you could use a DB to collect all the data ( say someone selects every possible option ), each transaction will have a UNIQUE ID number associated with it, and a price based on the options selected ... All you would send to pay pal would be the ID and a description and price... Once the user does the pay pal thing... They would be sent back to a confirmation page using that ID number, at that time, you could send emails based on what's in the DB associated with that ID.

    Or you could build the contents of the cart using session variables, when the user clicks on the buy it now button, you could call a script to write all the data to a text file on the server, again, with a uniques ID, then send the to pay pal...

    The whole thing revolves around saving the cart data somewhere on your server or in a DB, before sending them to pay pal, because pay pal will allow you to customize the return path, but very minimally.

    The sending of emails is just another function that can happen whenever you want it to, but because you're talking about a transaction that you don't / can't control the outcome of, you should only send emails once you're certain the transaction has been successful , which is basically after pay pal sends them back to your server. Since there's still a possibility that transaction will fail, I have setup for clients to send emails from the site, once they receive a payment confirmation email from pay pal.

    Basically, when the transaction is done, and pay pal sends the visitor back to the site, I send an email to the site owner informing them of the transaction, and a link to call a custom script. Once they receive a payment confirmation email from pay pal , the client opens that email, clicks he link, the script is called and a confirmation email is sent to the buyer, cc the site owner.

    This way, only emails are sent to the buyer if and only if their transaction has been completed with pay pal.

    I've had and heard of others that automated stuff, not realizing that for one reason or another the pay pal transaction never completed, they do all the work for the order, then go looking for the confirmation or worse yet, ship to the client, not realizing they were never paid.

    Either way, you're looking at some custom scripting to accomplish any of this... And probably won't be something you could accomplish without some knowledge of server side scripts.

    I might suggest you look army hiring a programmer ... If you're not that familiar ... Just a suggestion .

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Here's the thing...no matter what you do and no matter how you customize it, people will not always go back to the payment page after they go to PayPal. Some just won't. And if they do, they may take so much time that any session information may be gone by the time they get back.

    So here's what I'd do...I'd gather up all the custom cabinet information into a database, and have some sort of unique cart ID generated that would associate any of the things the customer picked with it. What you pass to PayPal would be the unique cart ID, which PayPal can then pass back to the thank you page. You'd then get the cart ID from the thank you page, retrieve all of the specs, and then send out the email.

    Mind you, it's been four years since I've used PayPal for something like this (most of my clients tend to use other payment processors) so I don't really have any current code samples, but that's the idea.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Junior Member
    Join Date
    Mar 2012
    Posts
    10
    Member #
    31244
    I think that I may have a solution, or at least a basic idea for one...

    PayPal allows a text input or text area to be included with the buy now button.

    Would it be possible to have the value of the text input/area end up as something like this?

    Width: 1
    Height: 2
    Depth: 3
    etc

    width, height depth, etc are constant. The 1, 2, and 3 are the values of other text inputs that the user has already filled in.

    I would have this text input as hidden and non-editable. Then, when the user pays for the product, it sends all of the information via the single text input.

    If this was possible, I wouldn't have to rely on the customer reaching the landing page, or not paying for the product and still having the order information sent.

  8. #7
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    <input type="hidden" would accomplish the same purpose and save you a whole lot of code.

    Having said that, you're going to need to format it in a way that someone else can understand, and with a hidden field that's going to be next to impossible. An order ID, with a backend order lookup, will be much simpler.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  9. #8
    Junior Member
    Join Date
    Mar 2012
    Posts
    10
    Member #
    31244
    To my understanding, an order ID would require there to be a fixed amount of variables that each product could have.

    Unfortunately, users are able to put in custom dimensions, meaning that there would be 1000s of different possible combinations.

  10. #9
    Junior Member
    Join Date
    Mar 2012
    Posts
    10
    Member #
    31244
    Here is what I have right now, seems to be working.

    The Javascript:
    Code:
    var textB1 = "width " ;
    var textB2 = "height ";
    var space = "\n";
    
    function xferText() {
        document.getElementById("textB").value=textB1 + document.getElementById("text").value +space +textB2 +document.getElementById("textA").value;
    }
    
    window.onload = function() {
      document.getElementById("textB").value=textB1 + textB2;
    }
    The HTML:
    HTML Code:
    <div>
        <input type="text" id="text" />
    </div>
    
    <div>
    <input type="text" id="textA" />
    
    <div>
        <textarea id="textB" rows="10" cols="50"></textarea>
    </div>
    
    </div>
        <button onclick="xferText();">Update Order</button>
    </div>

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Quote Originally Posted by NateWeller, post: 247344
    To my understanding, an order ID would require there to be a fixed amount of variables that each product could have.

    Unfortunately, users are able to put in custom dimensions, meaning that there would be 1000s of different possible combinations.
    Not necessarily. The order ID would be tied to the database and would list all of the products/combinations associated with that order, assuming you created the correct database relationships and structured it properly.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:13 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com