Author Topic: insertion script  (Read 6018 times)

sanj

  • Posts: 54
    • View Profile
insertion script
« on: February 10, 2007, 06:10:54 am »
hi,
I use a shopping cart software called ecommerce templates.
It's php based. http://www.ecommercetemplates.com.

What I would like to do is when the customer place their order, their name , email and products bought are added to lmp at the same time.

Thanks
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #1 on: February 10, 2007, 05:26:02 pm »
sanj,

You would need to edit the code of your script.  Immediately after processing the sale, add lines similar to as mentioned here:

http://listmailpro.com/forum/index.php?topic=1160.0

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
insertion script
« Reply #2 on: February 12, 2007, 08:33:19 am »
hi,

I'm confused about one thing.

the field

firstname is called name,
email is called email
title is called ordextra1
and medical condition is called ordextra2 in my shopping cart order page.

the same fields are called fname, lname, email and user1 in list mail.

I'm using the following codes in my form to post the data to lmp

$url = "http://www.example.com/responder/signup.php?list=4&email=".urlencode($_POST['email'])."&fname=".urlencode($_POST['fname'])."&seq=1&del=0&overwritedupes=1";
$ch = curl_init($url);
curl_exec($ch);
curl_close($ch);

What I'm confused about is should i be using the field names from the cart form or lmp.

ie for medical condition should i use ordextra2 or user1 in the code above.

thanks
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #3 on: February 12, 2007, 04:36:46 pm »
sanj,

You will need to put your cart variables into ListMail.  Note that these may not necessarily match up with what is displayed in the cart interface, etc.  You will need to get the names of these variables from within the PHP code for your cart.

ie:

$url = "http://www.example.com/responder/signup.php?list=4&email=".urlencode($cart_email)."&fname=".urlencode($cart_name)."&user1=".urlencode($cart_orderid)."&seq=1&del=0&overwritedupes=1";
$ch = curl_init($url);
curl_exec($ch);
curl_close($ch);

Please let me know if I can be of further assistance

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
insertion script
« Reply #4 on: February 25, 2007, 07:59:19 am »
hi Dean,

I'm using the following codi in my shopping cart just after the submit button and nothing is happening.

<?php

$url = "https://www.worldofmagnets.co.uk/responder/signup.php?list=4&email=".urlencode($_POST['ordEmail'])."&fname=".urlencode($_POST['ordExtra1'])."&lname=".urlencode($_POST['ordName'])."&user1=".urlencode($_POST['ordCheckoutExtra1'])."&seq=1&del=0&overwritedupes=1";
$ch = curl_init($url);
curl_exec($ch);
curl_close($ch);
?>

What am I doing wrong?

help
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #5 on: February 25, 2007, 04:18:02 pm »
Hi SanJ,

Try echoing the variable $url to make sure it's as expected with a line such as follows:
Code: [Select]
echo $url.'<br>';
Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #7 on: February 26, 2007, 04:43:13 pm »
Looks like you need to check your variables - they don't seem to be coming through to be able to be put into the URL.

Get this working and you should be all set:

Code: [Select]
echo $_POST['ordEmail'].'<br>';
echo $_POST['ordExtra1'].'<br>';
echo $_POST['ordName'].'<br>';
echo $_POST['ordCheckoutExtra1'].'<br>';


Are you sure your shopping cart is not sending the vars in $_GET ?

I've edited your posts for your privacy.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
insertion script
« Reply #8 on: February 27, 2007, 01:46:56 am »
hi Dean,

Thanks for you input. But i still can't get this to work!!!

can i email you the shopping cart page script so that you can take a look at it and tell me what I'm doing wrong.
I'm finding it quite hard to find the right variables

thanks again
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #9 on: February 27, 2007, 02:10:46 am »
SanJ,

I don't know the cart software off-hand... Investigating such a hands-on issue would require a token payment of at least $20, the cost of an update from http://listmailpro.com/support.  This would cover my investigation time, explanation of the problem and resolution.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
insertion script
« Reply #10 on: February 27, 2007, 05:17:25 am »
yeah ok,

how do i proceed?
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #11 on: February 27, 2007, 02:52:53 pm »
SanJ,

You can securely submit your info and description of the problem here:

http://listmailpro.com/support?t=upgrade

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
insertion script
« Reply #12 on: June 15, 2007, 01:22:23 am »
hi dean,

I posted a request for this work to be done over 24 hours ago and haven't heard anything yet. have you received it?

thanks
Sanj

P.S just paid for it now, it to do the work as discussed above in this thread
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
insertion script
« Reply #13 on: June 15, 2007, 01:54:03 am »
Hi Sanj,

I've been busy - thanks for payment!  I can help with this but it could take a little longer than normal because I need to learn your shopping cart, and it's late:).  Please view your support ticket for details.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting