Jump to content
Sign in to follow this  
graham_w

Include more details in Payment Received email

Recommended Posts

Hi, i'm looking to add more details into the payment received email. I've copied across the order confirmation template, however it isn't including any of these details.

I had a bit of a look around and it looks like it requires changes to /classes/order.class.php but I tried a few things and what I was doing didn't work. Can anyone point me in the direction of what needs changing to make this email content include the required data ?

Alternatively, how can I change the email that gets sent when the order status is changed to  "Processing" ?

Thanks

Graham

Edited by graham_w

Share this post


Link to post
Share on other sites

Welcome graham_w! Glad to see you made it to the forums.

Please let us know the exact version of CubeCart you are using. There are changes between versions that affect what advice I will give you.

  • Like 1

Share this post


Link to post
Share on other sites

The version cc628 will make available all the same data found in the Order Confirmation email contents to the Order Complete email contents.

So, let's review the process.

You can open the Order Confirmation email contents in the editor and switch the editor to Source mode. This makes it easier to copy to the clipboard easier.

Then, open the Order Complete email contents in the editor and switch the editor to Source mode. Delete everything but then paste the contents into the editor and Save.

Then, be sure to click the illuminated button in the upper-right corner to Clear the Cache.

Make a test order, then in admin, move that order to Completed.

Edited by bsmither

Share this post


Link to post
Share on other sites

Thanks for that. I'm trying to get more details into the email that's sent when the order is moved to Processing. 

So someone places an order which has no shipping included because it's too difficult to calculate for bulky items, payment gateway is print order form. 

The order is received, the store calculates the shipping and modifies the order with the shipping cost. 

What I'm trying to do is then when the order is moved to Processing, it sends an email with all of the order confirmation details and the now added shipping cost along with payment details to the buyer. 

When I copy the details to the order payment email which is sent when the order is set to processing, obviously the data is not made available to this email by default. How can I make it available to this email? Or change the email that is sent when I change the order to processing so these order details are included?

Thank you taking the time to assist.

Share this post


Link to post
Share on other sites

If you were to use an external database utility, and look at the database table CubeCart_order_summary, you would see most everything about the order. (In CubeCart_order_inventory, you would see most things about the items.) (There are a few other details in other tables.)

Of note, you will see 'shipping' (cost), 'ship_method' and ship_product'. Once you save the edited details about the order, the contents in the tables are updated.

Then, when an email is sent, those new/updated details are included: {$DATA.shipping}, etc.

However, payment gateways have a way of telling CubeCart that an Order Confirmation email has already been sent, and if that has happened, a second one will not be sent. With the POF gateway, in the admin settings screen, is a checkbox that will enable the sending of that order confirmation email immediately upon completing the checkout sequence.

If you uncheck that box, then the POF will not send that initial confirmation email, and will report to CubeCart that "already_sent" is false. So, when moving this order to Processing, no matter how many times you move it out of and back into processing, an email gets sent each time.

NOTE: Moving an order to Processing will have CubeCart send its standard Order Confirmation contents. I believe you are wanting to send the POF's custom email contents (which you can see in the module's folder/skin/print.tpl).

If so, that will require some thought on how to do that.

Be back soon.

  • Thanks 1

Share this post


Link to post
Share on other sites

Well, I was off the mark... The POF module does, in fact, send CubeCat's standard Order Confirmation email contents. It is the module's user-printable page that CubeCart displays after completing the checkout process that is "custom".

So, I think as mentioned above, unchecking that checkbox will allow you to send the email when moving the order to Processing.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

You are correct, that gives the expected email now.

Is there a way to turn off the payment confirmation email when moving to processing ? The way we are using it, the order has not been paid for when we move it to processing so that email is not required now.

Thank you for your help, and apologise if I haven't been very clear with my request.

Edited by graham_w

Share this post


Link to post
Share on other sites

If I understand you correctly, please make this edit:

In the POF module's gateway.class.php file, near line 46, change:

		} else {
			return false;
		}


To:

		} else {
			return true;
		}

 

Edited by bsmither
  • Thanks 1

Share this post


Link to post
Share on other sites

That seems to allow the payment received email and stop the order confirmation email. Was hoping to allow only the order confirmation email and stop the payment received email.

Thanks

On second thoughts, it's all good, I can make the two emails work. Thank you again for your help.

Edited by graham_w

Share this post


Link to post
Share on other sites

In that same file, just a few lines above the edit, is the statement that tells CubeCart that the order's payment status is Success.

Undo the previous edit, and make this edit:

From:

$order->paymentStatus(Order::PAYMENT_SUCCESS, $cart_order_id);

To:

// $order->paymentStatus(Order::PAYMENT_SUCCESS, $cart_order_id);

 

  • Like 1

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...