Jump to content

CC5 Customer "pending" and "processing" emails are the


duckmansweb
 Share

Recommended Posts

i guys , when a customer places and order , cubecart uses...

Subject: "Order Confirmation"
"Your order 130716-175245-6647 has been received which was placed on 16 Jul 2013, 17:52. Please keep this email for your records. It is possible to view the status of your order online."

this is marked as "pending" in admin , now , USUALLY when payment is received , you select the pulldown box as "processing" and according to the email template for "payment received" it should say ...

Subject "Thank you for your payment! "
Body: i {$DATA.first_name},

Thank you. We have received a payment of {$DATA.total} for order number {$DATA.cart_order_id}.

but in fact cubecart is sending the same order confirmation email as the payment received email , any thoughts ?

 

 

in my old CC4 store , when a customer pays with say "credit card" , i manually select "processing" and it sent an email say "payment received" . the ONLY time a customer can get a payment received email in cubecart 5.0 is when paying via paypal , i would like to have a "payment received" email when an order is MANUALY changed to "processing"

Link to comment
Share on other sites

What do the admin pages show for these two emails?

Cart: Order Confirmed

Cart: Payment Received

 

If they are different, then we can look at the code that chooses the emails to send.

 

If they are the same, then we may need to re-enter the script for the email with the wrong content.

Link to comment
Share on other sites

"Cart: Order Confirmed"

 

Thank You {$DATA.first_name}!

Your order {$DATA.cart_order_id} has been received which was placed on {$DATA.order_date}. Please keep this email for your records. It is possible to view the status of your order online.

{$DATA.link}

Billing address:
{$BILLING.first_name} {$BILLING.last_name}
{if !empty({$BILLING.company_name})}{$BILLING.company_name}
{/if} {$BILLING.line1}
{if !empty({$BILLING.line2})}{$BILLING.line2}
{/if} {$BILLING.town}
{$BILLING.state}
{$BILLING.postcode}
{$BILLING.country}
{$BILLING.phone}

Email:
{$BILLING.email} Shipping address:
{$SHIPPING.first_name} {$SHIPPING.last_name}
{if !empty({$SHIPPING.company_name})}{$SHIPPING.company_name}
{/if}{$SHIPPING.line1}
{if !empty({$SHIPPING.line2})}{$SHIPPING.line2}
{/if}{$SHIPPING.town}
{$SHIPPING.state}
{$SHIPPING.postcode}
{$SHIPPING.country} Item Quantity Cost {$product.name}
{$product.product_options} {$product.quantity} {$product.price}   Shipping: {if $DATA.ship_method}({$DATA.ship_method}){/if} {$DATA.shipping}   Discount: {$DATA.discount}   Subtotal: {$DATA.subtotal}   {$tax.tax_name}: ({$tax.tax_percent}%) {$tax.tax_amount}   Order Total: {$DATA.total}

 

 

 

 

 

 

 

Cart: Payment Received

 

 

Hi {$DATA.first_name},

We would just like to inform you that a payment of {$DATA.total}

for order number {$DATA.cart_order_id}. has cleared and your order is now being carefully packed to be ready for dispatch.

 

 

 

 we need to make the "processing" status (when set manually in order management)  send the email template above ^^ instead of sending the order confirmed email

Link to comment
Share on other sites

We can certainly reconfigure when CC sends the Order Confirmation email, but the Payment Received email is sent under different circumstances. Specifically, when the payment gateway says the transaction is successful. -- not when an admin moves an order to a different processing stage. There is no administrative capability to move an order to a specific payment status.

 

But I see your point. In the admin source file order.index.inc.php, there will be three places to edit:

Near line 136, find:

$order->orderStatus($_POST['order']['status'], $order_id);

Add after:

if($_POST['order']['status'] == $order::ORDER_PROCESS) {
  $order->paymentStatus($order::PAYMENT_SUCCESS, $order_id);
}

Also near line 142 and near line 503.

 

Even with this, when the $order_id is sent to orderStatus, the appropriate email will be sent. We do not want to disrupt the correct sequence of steps when the admin is not manually setting orders to statuses.

Link to comment
Share on other sites

Line 503 (before the other lines were added above it) is in this group:

            // If multi action variable is numeric we need to update the order status
            if (!empty($_POST['multi-status'])) {
                if ($order->orderStatus((int)$_POST['multi-status'], $order_id)) {
                    $updated = true;
                }
            }

Put the new code just above $updated=true:

Link to comment
Share on other sites

I did a line-by-line compare of the file you linked to above with a known good copy and apart from the added lines (which are correct), they are the same.

 

I also added these new lines to my installation and it worked.

 

Do you have access to a PHP error log? If not, please read:

http://forums.cubecart.com/topic/47435-resolved-moving-cc-v5-site-blank-site/#entry194187

Link to comment
Share on other sites

Yes , here is the error in my log...

 

 

[19-Jul-2013 22:38:46] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[19-Jul-2013 22:39:43] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[19-Jul-2013 22:39:51] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[19-Jul-2013 22:40:05] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[19-Jul-2013 22:40:33] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[19-Jul-2013 22:40:49] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 14:18:36] PHP Fatal error:  Call to a member function delete() on a non-object in /home/wwwava4/public_html/classes/seo.class.php on line 294
[20-Jul-2013 20:53:59] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 20:54:05] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 20:58:22] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 20:58:37] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 20:58:45] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[20-Jul-2013 21:09:50] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[20-Jul-2013 21:24:22] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:04:28] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:18:25] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[20-Jul-2013 22:28:18] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:33:12] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 05:42:36] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 09:10:35] PHP Fatal error:  Call to a member function delete() on a non-object in /home/wwwava4/public_html/classes/seo.class.php on line 294
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:58:05] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 13:59:46] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:06:13] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;task" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;cid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:14:37] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:17:13] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 14:37:24] PHP Warning:  Security Warning: Illegal array key "amp;Itemid" was detected and was removed. in /home/wwwava4/public_html/classes/sanitize.class.php on line 88
[21-Jul-2013 18:12:28] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 18:12:36] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 18:14:06] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 18:16:08] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 18:17:27] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 18:17:45] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 20:02:21] PHP Notice:  Cleaning cached files... in /home/wwwava4/public_html/classes/cache/cache.class.php on line 134
[21-Jul-2013 20:27:43] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[21-Jul-2013 22:47:01] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:47:01] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:47:01] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:47:01] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:48:46] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:48:46] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:48:47] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:48:47] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:49:02] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:49:02] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:50:18] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 22:50:35] PHP Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:50:35] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwava4/public_html/ini-custom.inc.php on line 4
[21-Jul-2013 22:55:35] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 22:55:58] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137
[21-Jul-2013 23:43:39] PHP Parse error:  syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/wwwava4/public_html/admin/sources/orders.index.inc.php on line 137

 

 

 

 

 

i tried the orders.index.inc.php file again , and still a no go , here is a copy of the orders.index.inc.php file

 

and also , all of a sudden no emails are being sent from the store , with this in the error log..

 

[22-Jul-2013 01:06:46] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013
[22-Jul-2013 01:06:56] PHP Fatal error:  Call to a member function update() on a non-object in /home/wwwava4/public_html/classes/cart.class.php on line 1013

 

 

arr this CC5 is a pain , CC4 was so much better

orders.index.inc.php

Link to comment
Share on other sites

The last two mentioned, Call to a member function update(), is a known issue. In the file /classes/cart.class.php, near lines 1012 and 1014, change $GLOBALS['db'] to Database::getInstance()

 

As for the relevant messages to our issue, it seems the 'double-colon', or 'scope resolution operator', is not understood here. I do not know why. (What version of PHP are you using?)

 

So, where you see:

$order::ORDER_PROCESS

Change it to:

$order->ORDER_PROCESS

 

$order::PAYMENT_SUCCESS

to:

$order->PAYMENT_SUCCESS

 

Three places, remember. Hopefully this will work.

 

In the ini-custom.inc.php, line 4, I made a mistake (argh!).

 

Where I have this:

ini_set('error_log",

make it this:

ini_set('error_log',

Note the use of quotes.

Link to comment
Share on other sites

PHP 5.2.11

 

ok, ive made changes to cart.class.php

and orders.index.inc.php

 

The admin order page is working again with the modified version , but the store is still not sending any kind of email as per before(order, request pass etc) after i applied the above bug fix

 

this only started this morning out of the blue , sorry for being a man of drama lol , and i thank you in advance for your help , if its easier , i can PM you my FTP log in and Admin log in , i dare say its something simple */*

 

this is the info from the php_errors

 

[22-Jul-2013 02:35:48] PHP Warning:  implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/wwwava4/public_html/classes/order.class.php on line 314
 

Link to comment
Share on other sites

I've learned that doing this:

$order::PAYMENT_SUCCESS

will only work on PHP 5.3.0 or later.

 

Which means that other significant parts of CC5 (specifically, many of the payment gateways) should not be working for you either. Hmmm....

 

I haven't verified if:

$order->PAYMENT_SUCCESS

works in PHP 5.2.x

Link to comment
Share on other sites

ok , i have got the email not sending problem saughted , seems @bigpond.com was on a back list or something , thats fine now , now back to the processing email , i still cant get the processing email to say "payment received " even with the above tweaks to the code

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.

 Share

×
×
  • Create New...