close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert Summary isn't including Phone Number eCart 6.1.0

Thread begun 12/08/2014 7:10 am by troyd | Last modified 12/18/2014 10:05 am by Jason Byrnes | 4148 views | 18 replies |

troyd

Insert Summary isn't including Phone Number eCart 6.1.0

I am troubleshooting an issue where the phone number entered into the checkout form isn't being stored in the db and isn't being saved as (WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number'));

When looking at the insert summary behavior, I see that most of the columns use the function WA_coalesce(). It appears to be a ternary operator so that if Phone_Number_2 is empty, use Phone_Number. Is that correct?

(phone number binding for insert summary)
echo(WA_coalesce(array(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number_2'),WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number'))));

All of the other columns are being stored correctly using that function so I started looking elsewhere.

On the wa_receipt.php, confirm.php, confirm_cart.php & checkout_success.php pages I find for the phone number
echo(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone')); Shouldn't that be
echo(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number'));?

Lastly, this checkout uses only one address form for shipping. No billing address. They fill that out at PayPal.

Thanks,
TroyD

Sign in to reply to this post

troyd

Same subject second issue

On the same subject, it appears that the billing information at PayPal may be taking priority when inserting into the summary table.
I need to make sure that the address they fill in on the website's checkout page is the only information collected since that is the shipping address.

Can I just switch the order of the two in each WA_coalece() function in the insert behavior?

So this...
echo (WA_coalesce(array(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Address_1_2'),WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Address_1'))));

becomes this...
echo (WA_coalesce(array(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Address_1'),WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Address_1_2'))));

Will that work to keep what they entered on the site? Or can I just change it to echo(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Address_1')); and leave the billing address out of it since we don't have that form?

Thanks
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

what is the name of the phone number field on the checkout page? That is what should be used in the bindings. Same thing for the store order summary, use the bindings that correspond to the form element names on the checkout page.

Sign in to reply to this post

troyd

Sorry Jason, I thought I included that.
It's Phone_Number which was generated by the wizard.

Here is the text input field for the phone number in it's entirety

<input id="Phone_Number" name="Phone_Number" type="text" value="<?php echo(WA_coalesce(array(WA_getSavedFormValue("CheckoutWizard_NewFromBlank_Default","Phone_Number"),(isset($_GET["invalid"])?ValidatedField("confirmcart","Phone_Number"):"")))); ?>" class="formTextfield_Large" tabindex="5" pattern="\(\d{3}\) \d{3}[\-]\d{4}" title="Please enter a 10 digit phone number" required onBlur="WAValidatePN(document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,'',false,true,'x (xxx) xxx-xxxx',document.getElementById('CheckoutWizard_NewFromBlank_Default').Phone_Number,0,true);">



And the binding in the insert summary. It's the same name, right?

php:
<?php echo (WA_coalesce(array(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number_2'),WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number')))); ?>



The only place I see it different, (and I will change it there) is the pages I mentioned where it uses just "Phone".

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

you don't need to include the coalesce function, you can just echo the phone number:
<? echo(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number')); ?>

Sign in to reply to this post

troyd

Awesome. Thanks.
Then that answers my second question also.

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

Sign in to reply to this post

TroyD

Jason,

This still isn't working to insert the phone number.

I made sure that every instance of echo(WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number')); had the correct name of "Phone_Number" in it since that is the exact name used for the phone number input.

It does show up in the session $_SESSION["WASF_WA_Payments"]["Phone_Number"] though. It's just strange that everything else name, address, city, etc. works but the phone number doesn't.

Could it have something to do with any other part of the pp_confirm page? Does PayPal change this somehow before returning to the success page?
This line for example $PPVals["Phone_Number"] = WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PayerInfo->ContactPhone");
Should I be looking for something else?

The form field is called "Phone_Number".
The binding in the insert summary is

php:
<?php echo (WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','Phone_Number')); ?>



What am I missing? I'm sure it's an obvious one.

(See PM for attachment)

Thanks,
Troy

Sign in to reply to this post

Jason ByrnesWebAssist

yes, this line:

$PPVals["Phone_Number"] = WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PayerInfo->ContactPhone");

will try to capture the phone number sent back from paypal.

it sounds like this is not being sent back properly, you can try commenting that line.

Sign in to reply to this post

TroyD

Ok. Thanks. I'll report back.

TroyD

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...