Jump to content

New store order email to include customer's phone number?


Kendi

Recommended Posts

A prospective business I'm involved needs to have the customer's phone readily on hand to call them if there any problems with their order - Being a past CubeCart fan user I found it odd this is not done in V3 (I'm checking into whether V4 is doing the same)

I need to have the "new store order" email contain the customer's phone number; Could this done in orderSuccess.inc.php?

I'd also like to generally re-configure the email's info layout as well, w/o involving any real 3rd party mods.

It would also be nice to have the phone number as modifiable option in the customer's info check page during cart viewing and checkout.

I'm open to paying for the mod(s) to be done ~

Link to comment
Share on other sites

No, orderSucess.inc.php sends an email to the customer. You want /includes/content/gateway.inc.php, at around line 234. You can edit the template found at $lang['front']['gateway']['admin_email_body_1'] (in your language file) to add a %s for the phone variable, or simply append the phone variable to an existing variable.

Link to comment
Share on other sites

No, orderSucess.inc.php sends an email to the customer. You want /includes/content/gateway.inc.php, at around line 234. You can edit the template found at $lang['front']['gateway']['admin_email_body_1'] (in your language file) to add a %s for the phone variable, or simply append the phone variable to an existing variable.

Excellent - got just what I needed there -

Thanks! :)

Now, on to having customers able to SEE and thus edit their phone number in the "Delivery info" during check out ("step 2" I believe it is) - I've played with the gateway.inc.php in the seemingly applicable areas and can't get anything happening. Appreciate any help. Why the customer phone number variable was not included along with the rest of their info is a baffler to me.

BTW - is important as we do shipping and local delivery.

Link to comment
Share on other sites

You can probably add a form element to the gateway's .tpl file, then add the post-processing logic to the gateway.inc.php. I'll look closer later.

Well, I found the form's layout in /skins/my skin/styleTemplates/content/cart.tpl - about line 16. SO I have the field happening - but just the field, empty and no label.

Found customer info (Invoice Add. and Delivery Add.) variables in /includes/content/cart.inc.php - added phone line; Playing with existing lines and omitting existing variables I observed this is where the form is filled with variables - about line 214 "// stick in delivery details", but still no phone showing in the added cart.tpl field, nor the lang label (which I added "phone" in lang.inc.php). Seems like I'm hitting all around it, but phone isn't fully happening :)

I got the phone number to show on left under "Invoice Address" - not sure how, but I'll restep and see if it leads to getting it populated in at right "Delivery Address" in the added phone field.

EDIT: I just got it working - BUT the phone shows twice! and naturally causes a Sql DB error :w00t:

I'm thinking (hoping) from there, once the phone (and/ or address) is confirmed or changed by the customer it'll transfer down through to the order and then in the admin new order email - ?

B)

Link to comment
Share on other sites

OK, it's happening - for those interested in doing this:

In our case this is good for local product delivery, where as customer's billing phone number (and delivery address) may not be the Invoice info (especially a common occurrence in a college town).

I have the cart(basket) at check out displaying under "Delivery Address" (right) the optional and editable phone number field "phone_d" which must be added to the DB (I placed all instances after "postcode") - ergo for steps 2-3 and 4.

'I also added the customer phone to display under "Invoice Address" (left), by duplicating the "phone" variable in the Invoice address section(s).

Files modified:

/includes/content/gateway.inc.php

/includes/content/cart.inc.php

/includes/orderSuccess.inc.php

/language/your lang/lang.inc.php

/skins/skin name/styleTemplates/content/cart.tpl (the form)

The customer phone numbers are included in the admin.'s new order email - tested with print and PayPal payment modules

I will be testing with manual secure CC ordering later - but expect it to work fine. :)

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