Jump to content
sailing123

Issue with manual phone orders for customers with no email address

Recommended Posts

Hi,

Just hoping that someone will have a brilliant idea to resolve my current issue. In the past, ie with V4, with phone orders of customers who did not have an email address or refuse to give their email address, we would still manage to process the order and I would just add "noemail" in the email address box.

Now with V6, the system stops me from entering any customer data with no proper email address. Al tells me there is no way around this but it is becoming a problem:

1. V6 forces me to enter a new email address every time. If I use the same one, it recognises it and stops me from entering the customer data thinking it belongs to another customer. So I started creating false email address like "[email protected]" John Smith being the customer for instance.

2. the 2nd problem is that my email system keeps trying to send the order status update messages to this address but keeps bouncing of course so I am getting a little annoyed to get reminders after reminders until it actually stops after 48 hours.

3. I personally do not think it is a good practice to have to create "false customer data" to work around the ecommerce platform limitations especially with the forthcoming EU's General Data Protection Regulation (GDPR) coming into from 25 May 2018.

Anyway, if someone has a grand solution for me to go around this issue, please let me know.

Many thanks

S.

Share this post


Link to post
Share on other sites

This is strictly a work around for now, but I would suggest you create a gmail account for this purpose. It will be "real" so you won't get all the bounce messages. I have a gmail account I use fro time to time to reply to people whose email company ban us for behavior of some other domain on our server.

Share this post


Link to post
Share on other sites

Please try this edit. It seems to work for me.

In the file /admin/skins/default/templates/orders.index.php:

Near line 271, find:

<div><label for="ajax_email">{$LANG.common.email}</label><span><input type="text" id="ajax_email" name="customer[email]" value="{$SUMMARY.email}" class="textbox billing required"></span></div>

Change to:

<div><label for="ajax_email">{$LANG.common.email}</label><span><input type="text" id="ajax_email" name="customer[email]" value="{$SUMMARY.email}" class="textbox billing"></span></div>

You should now be able to submit the form at admin, Orders, Create Order with a blank email address.

No emails will be sent that would otherwise be sent because there is no email address.

Share this post


Link to post
Share on other sites

Hello Bsmither,

Looking at the file and the removal of "required" like for the mobile number, I thought, yes, you cracked it but it did not work for me :-(

I cleared the cache, refreshed the page, even opened my admin in a new browser, tried registered and unregistered customer, tried status ticked & unticked, and sadly nothing worked with me.  I left the email address box blank.

I keep getting the following usual message:

  • Please enter a valid email address.
  • Failed to add customer. Please make sure first name, last name and email address are not empty and that the email address is not already in use.

I do not understand how it can work for you and not for me. Would it be that I am still on V6.1.10 and not on the latest upgrade you reckon ?

S.

Share this post


Link to post
Share on other sites

Ok, my bad.

You said "with phone orders of customers", I inferred you are creating an order, as in admin, Orders Create Order. This edit is for that action.

In my experiments, I assumed the customer already existed. I see now that that was a bad assumption.

You are also wanting to create a customer.

I will experiment some more with a new Create Order and manually filling in the Customer data.

For a phone order, if you need to actually Create a New Customer and enter in an address in their Addressbook, I will see what can be done about that. That may need more complicated edits.

Share this post


Link to post
Share on other sites

Yes that's right, I have no issues to create a manual order for an existing customer.

It is indeed for new customers only where I have to first create a new customer entry manually to then be allowed to create an order.

Share this post


Link to post
Share on other sites

What are your results (if you tried) to Create Order and just manually entering in customer details -- not first creating the customer?

Share this post


Link to post
Share on other sites

I managed to place a manual order without first creating a customer but then the customer is not listed among the customer list..... I also searched and it was not coming up.

Share this post


Link to post
Share on other sites

That stands to reason.

Is searching for a customer by their name important to your business?

Share this post


Link to post
Share on other sites

I search by email address or surname, those are the only 2 that work and if the customer has no email, I have no choice than to search by surname.

Postcode or address never work

Share this post


Link to post
Share on other sites

Even so, searching for a customer that only exists on the Order Summary list - not in the Customer list - might only be accomplished through the admin, Orders, Search Orders tab. There you can search by customer name (although this seems to be broken at the moment - does not actually filter for the name).

Anyway, I'll be working on creating a customer with no email.

Share this post


Link to post
Share on other sites

Please create this code snippet in admin, Manage Hooks, Code Snippets tab, Add Snippet:

Enabled: checked
Unique ID: [email protected]+
Description: Admin Create Customer with no email - bypass validation
Trigger: admin.customer.add
Version: 1.0
Author: https://forums.cubecart.com/topic/53118-issue-with-manual-phone-orders-for-customers-with-no-email-address/
PHP Code:
<?php
/***************************
 * Unsets the error when the
 * admin tries to add a customer
 * without supplying an email
 * address.
 *
 * The insertion to the database
 * happens unhindered. Note that
 * there will be an error banner
 * which must be ignored. There
 * is no easy way to suppress
 * that.
 *
 * However, you must make a
 * change to the database.
 * The stock index is UNIQUE. It
 * needs to be a plain INDEX so
 * that there can be more than
 * one record with an empty
 * string value for the email.
 *
 * ALTER TABLE `CubeCart_customer`
 * DROP INDEX `email`,
 * ADD INDEX `email` (`email` ASC);
 *
 * See:
 * https://github.com/cubecart/v6/issues/897
 * https://forums.cubecart.com/topic/50500-error-310-when-customer-has-no-email-address/
 **************************/
  unset($error);

Save.

Make the change to the database.

Test extensively.

As noted, expect squirrelly results if trying to administratively log in as that customer. That won't work without an email address. You must go to Orders, Create Order manually.

I would think the next obstacle is to somehow get the order paid for.

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.


×
×
  • Create New...