keat Posted March 7, 2016 Share Posted March 7, 2016 Staff are telling me that the email template for 'Admin:Order Received' is messy. The first thing they noticed this morning was the abscence of the part number, which I've added. But they are also telling me that it's missing the gateway method and any customer comments, which I can't seem to get to display, as well as the page formatting looking a mess. How do I add the gateway and customer comments, and how do I make the email justified left instead of justified centre ? Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 I added '{$DATA.gateway}' along side the order total entry in the email template in the hope that it might display the gateway, but still nothing there. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2016 Share Posted March 7, 2016 The table of "macros" shown below the email contents editor is simply hand-coded. That is, the table is a summary of what has been decided to show what's available. If at some time later, changes are made regarding what data the CubeCart_order_summary and CubeCart_order_inventory database records hold, or a plugin adds to or changes that data, the table won't reflect the new data. So, keep in mind that there may always be new and changed data available for your store. In the email contents template, use: {$DATA.order_date} {$DATA.ship_date} {$DATA.gateway} {$DATA.ship_method} {$DATA.ship_product} {$DATA.customer_comments} I am perplexed about the centering. I get that effect also. I think it is a flaw in the HTML engine that my email program uses. In Cubecart's admin, Email Templates, Email Templates tab, edit each template's HTML Content. Switch the editor to Source mode. You will find the HTML for a table containing a table. The outer table's <td> (holding the inner table) has a align="center" attribute. Remove that attribute. My opinion is the centering should apply to the block that is the inner table, but not cascade down to the contents of that inner table. Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 I already tried {$DATA.gateway}, both inside and outside of the table, but nothing is populated. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2016 Share Posted March 7, 2016 Please check in Store Settings, Features tab, Misc section: Order Status for Admin Email Notifications. If set to Pending, the customer will not have chosen a gateway just yet. Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 This is getting more complicated then. It is set to pending, but we use print order form, which never comes out of pending, so I'm assuming if i set Order Status Email Notifications for anything other, then we won't be notified when a customer chooses print order form ?? We have a number of customer who have credit accounts with us, hence print order form. Plus we might have customers who for what ever reason didn't complete through to payment, we would normally call these people and ask for payment. These too will sit as pending. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2016 Share Posted March 7, 2016 I understand it is best for you to keep Email Notifications at Pending. As you said, this has a complication: How do you know what the customer chose as the gateway if CubeCart does not update the Order Summary with that specific info until the order goes to Processing? Let me trace out the code. Be back shortly. In the file /modules/gateway/Print_Order_Form/gateway.class.php, near line 238: Find: $GLOBALS['cart']->clear(); On the blank line just above that, add: $order->updateSummary($order_summary['cart_order_id'], array('gateway' => "Print_Order_Form")); Please test. Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 I did think on the way home, that maybe changing 'Print Order Form', so the status went to processing instead of pending. Anyhow, I made the edit you suggested for now, I'll no doubt see what effect it will have this evening. Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 I couldnt find align=center on the admin order received template. I assumed because I've been tinkering with it, so I checked on my localhost version I have at home, and I can't find it on here either. Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 2 hours ago, bsmither said: I understand it is best for you to keep Email Notifications at Pending. As you said, this has a complication: How do you know what the customer chose as the gateway if CubeCart does not update the Order Summary with that specific info until the order goes to Processing? Let me trace out the code. Be back shortly. In the file /modules/gateway/Print_Order_Form/gateway.class.php, near line 238: Find: $GLOBALS['cart']->clear(); On the blank line just above that, add: $order->updateSummary($order_summary['cart_order_id'], array('gateway' => "Print_Order_Form")); Please test. I made the edit, but choosing Print Order Form still doesn't show the gateway method. My comments now appear after adding {$DATA.customer_comments} I just checked the database and print_order_form is displayed in the gateway column, but not on admin order notification Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2016 Share Posted March 7, 2016 Hmm... According the code trace, the Order Notice email gets sent to the admin before the customer even chooses a gateway. So, we need to rethink this. (Remove the above edit to the gateway.class.php file.) Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 It seems that 'Print Order Form' is populated in the order summary, but not on the Order Notification ? It is definately? {$DATA.gateway}, there are no obvious typos or anything ? Quote Link to comment Share on other sites More sharing options...
keat Posted March 7, 2016 Author Share Posted March 7, 2016 Actually, Now I see. I sat and watched the mailbox. The moment I hit 'Secure Checkout', the cart sent the email, and as you rightly say, I havent chosen a gateway as of yet. Quote Link to comment Share on other sites More sharing options...
keat Posted March 8, 2016 Author Share Posted March 8, 2016 I've input a dummy order on one of my V3 sites and figured that the customer gets as far as the choosing a payment option (step 5) before the order is emailed, at the same time, it's flagged as pending, whereas on V6, it's flagged as pending one step before this. This will explain why on our V3 we are notified of the intended payment method. This is a feature that the staff use to check that Payment went through OK, they will log on to the respective gateway and check. It seems the way V6 is configured at the moment this can't happen. I have considered trying to modify 'Print Order Form' so it changes the status to 'Processing', however, having watched the cart today, I'm convinced that PayPal or SecPay orders are not flagged as 'Processing' until it the cart recieves instruction form those gateways, in which case if a customer has issues with the gateway, or backs out, we would never be notified. Oh and when ever I mess with the HTML format of the Admin: Order Notify template, it stops working. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 8, 2016 Share Posted March 8, 2016 When editing that particular email content template, view the HTML source, and find the part that will display the shipping method. If the HTML source shows something like this: {$SHIPPING.name|replace:'_':' '}, with the word replace, then change that to read simply: {$SHIPPING.name}. I'm still working on finding the best spot to make a code change that will send the email to the admin when the customer is on the page and has just selected the method of payment, but before the customer is taken to that payment method.. Quote Link to comment Share on other sites More sharing options...
keat Posted March 9, 2016 Author Share Posted March 9, 2016 There are too many things being discussed in this particular thread making it difficult to follow. I'm happy to close this down Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.