Jump to content

Guess checkout, mobile phone field required, get error phone is required?


Recommended Posts

Hey folks,

 

(Fresh install of Prestashop 1.6.0.5)

 

I tried unabling Guess Checkout on my shop, but there is a problem at the "Instant checkout" window.

There is no field for "Phone", but only a field for "Mobile Phone" (Mobile Phone field is required) in the "Instant checkout" window. If I enter a valid phone number in the "Mobile Phone" field then click on the "Proceed to checkout" button, I get an error saying that "phone is required."???

 

I also tried turning off the "Phone Number" requirement in the Backoffice Preferences/Customers settings but it doesn't fix the problem for Guess Checkout.

 

Anyone else having this problem?

How can I fix this?

 

Cheers

Dan

post-406825-0-81954800-1396998324_thumb.jpg

post-406825-0-39960700-1396998325_thumb.jpg

Link to comment
Share on other sites

I checked my test PS 1.6.0.5 and mine works. I notice in your image the little * required indicator beside your mobile phone field. That should go away when you turn off the Phone requirement in Customer settings.

 

I recommend checking the database directly. Go to table ps_configuration and look for a field called  PS_ONE_PHONE_AT_LEAST make sure the value is 0 (Zero)

 

On my machine it is located ID 6.

Edited by Bill Dalton (see edit history)
Link to comment
Share on other sites

Hi Bill,

 

I've checked my database at table ps_configuration and the field called  PS_ONE_PHONE_AT_LEAST was set with value 1.

Changing it to 0 did remove the * beside the Mobile Phone field but I still get the same error, even if I input a phone number in that field.

 

There is one thing, my fresh install of Prestashop 1.6.0.5 is pointing to a database created with Prestashop 1.5x and the prefix for the database is "pr_" and not "ps_". It is set accordingly in the config/settings.inc.php file but wonder if this may be causing problems!

 

Your thoughts...

 

Cheers

Dan

Link to comment
Share on other sites

It is possible to run multiple applications in the same database. That is the purpose of the file prefix. You set that when you installed and is not likely the problem, assuming you used the automated install.

 

If you are using Chrome could you try clearing the browser cache.

Link to comment
Share on other sites

Thanks Bill,

I do want new customers to provide one phone number when registering to my shop, this portion is working fine. When a new customer arrives to the registration page, he is presented with 2 fields to provide a phone number, the "Phone" field and the "Mobile Phone" field. (Only one of those fields is required).

 

However, the problem is with Guess Checkout, there is only one field for phone at the "INSTANT CHECKOUT" window and it is called "Mobile Phone". Most people are reluctant giving there mobile phone number and this alone could be enough to lose the sale. And on top of that, in my shop, when you do input a valid phone number in that "Mobile Phone" field and click the checkout button, you are still getting the error "phone is required"! (Clearing cache is not fixing this...)

 

I believe the instructions provided for the "order-opc-new-account.tpl" you mentioned would only affect client registering an account and not the Instant checkout (Guess checkout) feature.

 

I am pretty sure the problem is in my database, maybe with a wrong item ID or something, I will try comparing the database created with the new install with the existing Prestashop 1.5x database to see if I missed something.

 

Thanks again...

 

Dan

Edited by papagino (see edit history)
Link to comment
Share on other sites

Hi again, I know I can change the name from Mobile Phone to just Phone, but it will still give me the error that a phone number is required even if that field as a phone number entered in it...

 

On the ps_configuration table created by Prestashop 1.6.0.5 install, there is 354 items.

 

On the Prestashop 1.5x database that I am currently using, pr_configuration has 744 items and some of the id_configuration numbers do not match. Also, some of the items in that table that are on the Prestashop 1.6.0.5 created database are not in my current database (ex: all the "DASHGOALS_" items are not in it).

 

That explain why I see a blank screen when clicking on the "DASHGOAL" (below STATS) link of my backoffice.

 

I'm pretty sure that replacing the current pr_configuration table with the one created with the new install will crash my site...

 

Oh boy, I can see this is going to be a pain to fix...

Link to comment
Share on other sites

I can confirm that it is a database issue cause I changed the setting in the settings.inc.php file so it point to the originally created database of Prestashop 1.6.0.5 and the Guess Checkout feature is working... soo lots of work to find where's the problem... :o(

Link to comment
Share on other sites

  • 9 months later...
  • 2 weeks later...

Hi I have the same problem. No help in my german forum.  "Guest Checkout" shows only one filed with mobile number. Error: Phone is required. when I take the mobile phone field out, it is the same problem. I think it is a problem with order-opc-new-account.tpl :

 

{if isset($one_phone_at_least) && $one_phone_at_least}
                        <p class="inline-infos required is_customer_param">{l s='You must register at least one phone number.'}</p>
                    {/if}                    
                    <div class="form-group is_customer_param">
                        <label for="phone_invoice">{l s='Home phone'}</label>
                        <input type="text" class="form-control validate" name="phone_invoice" id="phone_invoice" data-validate="isPhoneNumber" value="{if isset($guestInformations) && isset($guestInformations.phone_invoice) && $guestInformations.phone_invoice}{$guestInformations.phone_invoice}{/if}" />
                    </div>
                    <div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
                        <label for="phone_mobile_invoice">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
                        <input type="text" class="form-control validate" name="phone_mobile_invoice" id="phone_mobile_invoice" data-validate="isPhoneNumber" value="{if isset($guestInformations) && isset($guestInformations.phone_mobile_invoice) && $guestInformations.phone_mobile_invoice}{$guestInformations.phone_mobile_invoice}{/if}" />

 

Home phone and mobile phone are the same?

Link to comment
Share on other sites

  • 11 months later...

for forced require validation... 

 

classes/address.php

 

definitions array... you can add or remove required => true

 

example:

 

            'phone' =>                array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'required' => true, 'size' => 32),
            'phone_mobile' =>        array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),
 
 
here i force home phone, but dont care about cell.  This satisfies the setting at least 1 phone number required as well.
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...