Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I have a client using this wonderful shopping cart that does over 1 million in transactions a year. They are using UPSXML to offer shipping rates.

 

The problem is when you do the volume they do you get a variety of people daily wanting "next day", "second day", "third day", "ground" etc. shipping.

 

What my client needs, is depending on which UPS shipping option they choose, the intial order status will be different.

 

For example:

 

Next Day Shipping -> order status initially set to "Urgent"

Ground Shipping -> order status initially set to "Pending"

 

That way the orders that need to go out right away are processed first.

 

Can ANYONE help me make this happen??

 

Thank you!

__________________________

 

David McGuffin

Web Designer

  • 1 year later...
Posted (edited)

I was having this same problem so here is what I put in checkout_process.php after all the include class files (top of page)

 

 

if ($_SESSION['shipping']['id'] == "dly_dly") {

 

$new_order_status = MODULE_SHIPPING_DLY_ORDER_STATUS; //you can hardcode a number here

$text_alert = EMAIL_TEXT_ALERT;

 

} else {

 

$new_order_status = $order->info['order_status'];

$text_alert = "";

 

}

 

 

Now, dly_dly is the shipping id for same delivery, you would need to find out what is the shipping id for the orders you want to change status to. HINT: Look into the modules/shipping directory and at the beginning of the file the $this->code is defined...that is your shipping id.

 

Now I have two variables I want to change the order status. You can hardcode the number of the order status corresponding to your Database, for instance on a stock install pending is "1" so if you put 1 here then all orders with this shipping status will automatically go to pending. If for example you have a status called SAME DAY DELIVERY and the corresponding id is 5 then that is the number you would want to put next to $new_order_status.

 

You would need to change the database insert array farther down, right after the date entry.

 

'date_purchased' => 'now()',

//bof cypher-sdg.com: same day delivery mod

'orders_status' => $new_order_status,

//eof cypher-sdg.com same day delivery mod

 

 

Then if you have configured your copies of orders to be sent to you then you can also change the send email section adding the $text_alert variable (don't forget to define the constant in your english file). This will automatically show special text for orders with this shipping type. For ex. SAME DAY ORDER - URGENT! Order #289

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $text_alert . EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

Edited by spayce_girl

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...