jeffharrell / minicart

The minicart is a great way to improve your PayPal shopping cart integration.
MIT License
501 stars 209 forks source link

E-mail minicart form data #41

Closed tron78 closed 12 years ago

tron78 commented 12 years ago

Hi Jeff,

nice work ! I stumbled upon this and played around with it a bit in a test environment (and did a bit of of customizing as far as my html and css knowledge allows). Looks good, so now I am seriously considering implementing this on my website, as a quick and simple way to sell some items, without installing a huge/additional/overcomplicated eCommerce store.

But ... I really would like an option to e-mail the form data / shopping cart contents to me when the client hits the checkout button, so I have a backup of the order and or an alternative payment method to offer.

Few reasons: -when client leaves after seeing the Paypal page, there's no trace of the order.

-when client leaves because of not seeing the Paypal page at all ( sometimes it's seriously slow to process the request - in this perspective I am also really looking forward to the change of the checkout button into processing when hit- a suggestion I saw you make over here EDIT: FIXED THAT MYSELF )

-(Indirect) possibility to offer a bank transfer as payment option ( not everybody wants to pay by creditcard )

Anyway....Looking forward to a short term fix/hack if you have any suggestions or long term solution as a feature...unfortunately I understand only basic html and css and I am not all that at home in JS / PHP so maybe it's stupid easy, if so my apologies in advance...

jeffharrell commented 12 years ago

Sending an email isn't functionality that will make it into the Mini Cart since it's very web site specific and requires a server portion to send the message.

If you're looking to either use the Mini Cart to always send emails you should be able to do this on your own though with your favorite server side programming language. If you have the latest minicart.js you should be able to setup a custom event for onCheckout which returns false. This will prevent the redirect to paypal.com and should allow you to run other code which collects the form data and sends it to a script to generate the email.

Good luck!

tron78 commented 12 years ago

Hi Jeff,

thank you for the answer. I understand you don't want to integrate the mail option as a standard to prevent bloating ( even though I feel it woudl be added value), that's you choice as ' the creator' of minicart.

So that leaves me to build a custom version, which is ok. For example I figured the ' processing' thing out by looking on google and just testing a lot of different options... Cost me 2-3 days to do so, but I learned a lot. But as I don't have the knowledge of php/js to do stuff from the ground up, and can't afford to outsource this to a paid programmer a starting point is needed. I am willing to invest time in the mailfunctionality, I already looked into some php mailforms, and I understand they use the post command to post the form data to the php code which then processe it and sends it to a specified mailaddress. So in basic I would need to get a mailform, and change the paypal url to that, and it would submit the form data by mail ?

But I am more looking for an or/or senario, which means:

two buttons one 'creditcard' and one 'banktransfer' 'creditcard' will lead to the usual paypal scenario, which ends with the redirect 'banktransfer' will send the cart contents by e-mail, and redirect to a differnet page. ( or one button and two radiobuttons as options which will make the submit button behave different depending on radiobutton selected )

I think it should be possible to do this, as it would mostly involve duplicating some parts ?

Anyway if you feel generous ;-) a hint of code/a small basic example to get me started would be greatly appreciated, so I have a starting point instead of no clue where to start.. Will of course feedback to the minicart community when it's working !

Kind regards,

Sander Mulder

Date: Sat, 14 Jan 2012 18:54:13 -0800 From: reply@reply.github.com To: sander_mulder@hotmail.com Subject: Re: [MiniCart] E-mail minicart form data (#41)

Sending an email isn't functionality that will make it into the Mini Cart since it's very web site specific and requires a server portion to send the message.

If you're looking to either use the Mini Cart to always send emails you should be able to do this on your own though with your favorite server side programming language. If you have the latest minicart.js you should be able to setup a custom event for onCheckout which returns false. This will prevent the redirect to paypal.com and should allow you to run other code which collects the form data and sends it to a script to generate the email.

Good luck!


Reply to this email directly or view it on GitHub: https://github.com/jeffharrell/MiniCart/issues/41#issuecomment-3496711