Jump to content

Resolved - Addition of CURRENT Customer Email Address to Old Order Sum


Dirty Butter

Recommended Posts

With respect to 'existing' orders... Yes, you can change most things. Everything in the order summary is as it was when the order was placed. I see no compelling need to automatically update existing orders when an immaterial fact changes.

 

However, this view is my own. I have a need to keep order details exactly as they were when the order was placed. For example, changing a delivery address will invalidate my prior claims of tax collection and reporting.

 

Currently, I am working with Digital Download issues, and incorporating addresses (physical and email) currently on file with the customer record, as opposed to the order_summary record, when dealing with existing digital orders (and elsewhere, no doubt), would be appropriate.

Link to comment
Share on other sites

I could envision a need to email a person who previously bought from us to advise them of finding another toy, in case they'd like a backup. IF the customer had updated their email address or ordered subsequent to the one I was writing about using a new email address - my email concerning an old order item would possibly bounce or go unread. Of course most people wouldn't take the time to update, but repeat customers would likely assume we had automatic access to their current email address.

 

I can't imagine a reason to change any other details for an old order and certainly see your point about tax implications.

Link to comment
Share on other sites

In the admin sources file orders.index.inc.php, find near line 296:

$GLOBALS['smarty']->assign('OVERVIEW_SUMMARY',$overview_summary);

Add above:

$customer_current_record = $GLOBALS['db']->select('CubeCart_customer', false, array('customer_id' => $overview_summary['customer_id']));
$customer_current = $customer_current_record[0];
$customer_current['link'] = $GLOBALS['storeURL'] ."/". $GLOBALS['config']->get('config','adminFile') . "?_g=customers&action=edit&customer_id=".$overview_summary['customer_id'];
$GLOBALS['smarty']->assign('CUSTOMER_CURRENT',$customer_current);

 

In the admin skin template orders.index.php, find near line 168:

<fieldset class="other"><legend>{$LANG.orders.title_shipping}</legend>

After the closing </fieldset> near line 173, add:

<fieldset class="other"><legend><em>Current</em> {$LANG.account.contact_details} for <a href="{$CUSTOMER_CURRENT.link}">Customer ID: {$OVERVIEW_SUMMARY.customer_id}</a></legend>
<div><label>{$LANG.common.email}</label><span><a href="mailto:{$CUSTOMER_CURRENT.email}">{$CUSTOMER_CURRENT.email}</a></span></div>
<div><label>{$LANG.address.phone}</label><span>{$CUSTOMER_CURRENT.phone}</span></div>
{if !empty($CUSTOMER_CURRENT.mobile)}
<div><label>{$LANG.address.mobile}</label><span>{$CUSTOMER_CURRENT.mobile}</span></div>
{/if}
</fieldset>

 

 

 

 

 

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