Closed

Fix my simplecartjs email in php

This project was awarded to froiden07 for $30 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Project Budget
$30 - $250 USD
Total Bids
4
Project Description

Hello everybody,

My name is Jonas Pijnenburg. I have a website kheuning.nl. My problem is, my shopping cart system isn't working properly.

When a customer places an order, i only recieve the first item in the cart. This is a problem when a person wants to order multiple sunglasses. I get a email like this:

product name 1x €10
total: €50

Instead of:

product name 1x €10
product name 3x €10
product name 1x €10
total: €50.

I have to email every time to ask what the complete order was.

I know that the problem is somewhere in my PHP or in my simplecart JS javascript.
Here is my php:

<?php
$to = '';
$subject = 'Bestelling';
$jcitems = $_POST['jcitems'] .

" \n Totaal: " . $_POST['jctotal'] .
" \n Email: " . $_POST['email'] .
" \n\n Naam: " . $_POST['naam'] .
" \n Straatnaam: " . $_POST['straatnaam'] .
" \n Postcode: " . $_POST['postcode'] .
" \n Woonplaats: " . $_POST['woonplaats'] .
" \n Land: " . $_POST['land'] .



" \n\n IP: " . $_SERVER['REMOTE_ADDR'] .
" \n Datum: " . date("Y-m-d") .
" \n Tijd: " . date("H:i:s") ;

$headers = 'From: Bestallning@Mobil' . "\r\n" .
'Reply-To: Bestallning@Mobil' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $jcitems, $headers);
Header('Location: [url removed, login to view]');

?>

And here is the piece of my javascript that should make this form:

[url removed, login to view] = function bestellen() {

itemsString = "";
for( var current in [url removed, login to view] ){
var item = [url removed, login to view][current];
itemsString += [url removed, login to view] + " " + [url removed, login to view] + " " + [url removed, login to view] + "\n";
}

naam = [url removed, login to view];
email = [url removed, login to view];
straatnaam = [url removed, login to view];
woonplaats = [url removed, login to view];
postcode = [url removed, login to view];
land = [url removed, login to view];





[url removed, login to view] += "" + " euro"

var form = [url removed, login to view]("form");
[url removed, login to view] = "none";
[url removed, login to view] = "POST";
[url removed, login to view] = "[url removed, login to view]";
[url removed, login to view] = "ISO-8859-1";
[url removed, login to view]([url removed, login to view]("jcitems", itemsString));
[url removed, login to view]([url removed, login to view]("jctotal", [url removed, login to view]));
[url removed, login to view]([url removed, login to view]("naam", naam));
[url removed, login to view]([url removed, login to view]("email", email));
[url removed, login to view]([url removed, login to view]("straatnaam", straatnaam));
[url removed, login to view]([url removed, login to view]("woonplaats", woonplaats));
[url removed, login to view]([url removed, login to view]("postcode", postcode));
[url removed, login to view]([url removed, login to view]("land", land));


[url removed, login to view](form);
[url removed, login to view]();
[url removed, login to view]();
[url removed, login to view](form);
}

};

Thank you all in advance. I think this should be a very quick fix but i don't mind to pay some dollars.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online