Jump to content

Template teething problems


keat

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

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.

×
×
  • Create New...