Jump to content

PHP Shopping Cart, Sent mail instead of Paypal


juandamz

Recommended Posts

Hi, I followed the steps to make a Shopping Cart, and it work great.. but unfortunately my client doesnt want his clients to pay for the products once their done choosing them, instead he wants to receive an email, with a list of the products.. so what im trying to do is to send the form to his mail and not to paypal, but im finding it really hard.. Can someone help me in this one please.

 

PS. im going to attach the what i've come up with so you guys can see. Btw I just know the basic stuff of PHP,

Thanks

Juan Mora

addToCart.php

Link to comment
Share on other sites

thanks.. but all i need is like a way to put all of the chosen products, separated with their, name, price and a total.

I've already done contact pages where you could type all your info like name, phone, email on boxes, and then just click submit.

the problem now is that they're not in boxes and its more than one product. :/ I rly need this to work .. if someone could help me with the code, plz, ill rly appreciated

Link to comment
Share on other sites

I really don't have the time to write the code for you. If you want to hire me for the time involved, that may be different (PM me.)

 

That said, these are the basic steps you'd need to follow:

 

-- Rather than using the PayPal "Buy Now" button at the bottom of your cart, replace it with your own "Buy Now" link/image (or whatever you want to call it) that links to a new page

-- That new page probably needs various form fields so the visitor can fill out their personal information. Once they finish that, they click on a "Place Order" link/image that takes them to the final page in the process.

-- On the final page, you would use PHP to generate a string that contains the message that you want PHP to send via email, containing the person's contact information (using standard $_POST like you have probably worked with before) and the contents of the shopping cart (which would basically be a modified version of the render_paypal_checkout($shopping_cart) function.) Then you can use PHP's mail() function (http://php.net/manual/en/function.mail.php) to email the form.

-- once the email has been sent, you can redirect to a success page using the header() function

Link to comment
Share on other sites

you are right I did work with the $_POST before, thanks for your help.

The problem I still have is that after I click "Submit" ill receive the mail, but with out the product info, like "product name: "blank" , amount: "blank" etc " what I dont understand is how to make that repeat to the same amount product that were chosen.

Thanks for your help

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...