Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with checkout_process.php


TechieTW

Recommended Posts

I keep getting this "Parse error: parse error, unexpected '[' in /public_html/osc/catalog/checkout_process.php on line 271"

 

I need to insert a loop somewhere in checkout_process.php so I can send an email with a download link in it. (I use an external download processor) 1 email for each item purchased.

 

I inserted at line 96: $email_send = 'customers_email_address'; // to define the email address of the buyer

 

I inserted starting at line 266:

 

// -------Send the buyer an email download link for each item loop, model# = item#

//

// line 96 = $email_send = 'customers_email_address';

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++)

{

$item_send = products[$i]['model']; //<--- line 271

sleep (1);

include "http://mydomain.com/certainfolder/emailalink.php?email=$email_send&item=$item_send";

}

// -------End loop process

 

Can anyone help me figure out what I am doing wrong? :blush:

Don't give up. I see light ahead...!

Link to comment
Share on other sites

I keep getting this "Parse error: parse error, unexpected '[' in /public_html/osc/catalog/checkout_process.php on line 271"

 

I need to insert a loop somewhere in checkout_process.php so I can send an email with a download link in it. (I use an external download processor) 1 email for each item purchased.

 

I inserted at line 96: $email_send = 'customers_email_address'; // to define the email address of the buyer

 

I inserted starting at line 266:

 

// -------Send the buyer an email download link for each item loop, model# = item#

//

// line 96 = $email_send = 'customers_email_address';

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++)

{

$item_send = products[$i]['model']; //<--- line 271

sleep (1);

include "http://mydomain.com/certainfolder/emailalink.php?email=$email_send&item=$item_send";

}

// -------End loop process

 

Can anyone help me figure out what I am doing wrong? :blush:

here is a little different way to accomplish the same thing

http://www.oscommerce.com/forums/index.php?sho...234132&hl=#

see the last post

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

here is a little different way to accomplish the same thing

http://www.oscommerce.com/forums/index.php?sho...234132&hl=#

see the last post

 

I'm a bit confused. They are talking about modifying the email order confirmation. I want to keep that process intact. What I need is to define 2 variables. One is constant (the buyer's email address), the other is an array variable (dynamic) (depending on how many items were purchased). I need to send the variable values to an external processor. This external processor will generate an email to the buyer with their download link. 1 item = 1 email, 10 items = 10 emails. My problem is that I am not that good with PHP yet and I need to know where in checkout_process.php to place my loop and variable statements. --> :blink:

 

If anyone can help me with this process, I would be very grateful. I am studying the process using books and manuals and I still cannot figure it out. (or why I'm getting a parse error for that matter) AAARRRGHH!! >_<

Don't give up. I see light ahead...!

Link to comment
Share on other sites

$item_send = products[$i]['model']; //<--- line 271

 

Can anyone help me figure out what I am doing wrong? :blush:

 

you need a $ in front of the array 'products' in the line aboave

-MichaelC

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...