close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Double First Name Stored In orders.OrderShipName

Thread began 3/03/2012 2:42 am by rehuntjr435750 | Last modified 3/06/2012 12:31 pm by rehuntjr435750 | 1088 views | 5 replies


Patched It

Okay, I fixed this bug on my site. Jason, you may want to dig into this a little deeper to see if it's systemic or perhaps something I did to myself and had to fix.

As I suspected, it was either a case of the OrderShipName column being filled with either ...

(First Name + First Name) + LastName or ...
FirstName + (FirstName + LastName)

It was the *second* one, that is, the last name field had already been pre-formed as a concatenation of firstname + ' ' + lastname somewhere else.

What tipped me off was your suggestion to rebind the eCartCheckoutForm_shipping_firstname session variable to the OrderShipName field in the eCart Store Summary In Database server behavior on the pp_confirm.php page.

Well, that session variable ... eCartCheckoutForm_shipping_firstname ... does *NOT* exist on my pp_confirm.php page. I looked everywhere for it in the behaviors panel and in the code itself and it's not there. There is a session variable called ... eCartCheckoutForm_firstname however. (Note the lack of the word "shipping".)

There is a session variable called ... eCartCheckoutForm_shipping_lastname ... but that variable is not copied from eCartCheckoutForm_lastname. Instead it gets turned over to a function call in PP_ECO_PHP.php using a token called "Name". I looked all thru the PP_ECO_PHP file and couldn't find anywhere where that "Name" token performed a concatenation of first and last name but I had a hunch that was where it was happening.

So now back to the pp_confirm.php page. The binding for the OrderShipName column in Store Summary in Database behavior originally looked like this ...

<?php echo (isset($_SESSION['eCartCheckoutForm_shipping_firstname'])?$_SESSION['eCartCheckoutForm_shipping_firstname']:$_SESSION['eCartCheckoutForm_firstname']); ?> <?php echo (isset($_SESSION['eCartCheckoutForm_shipping_lastname'])?$_SESSION['eCartCheckoutForm_shipping_lastname']:$_SESSION['eCartCheckoutForm_lastname']); ?>

Remember I said I don't have '_shipping_firstname' session variable but I do have a '_firstname' session variable so that means the first half of that code defaults to the '_firstname' variable, i.e, 'Joe'.

The second half of that code tacks on the '_shipping_lastname' session variable which I *do* have but remember I suspected it had been "magically" concatenated already into 'Joe Jones'. If my hunch was correct, this was where I was getting "Joe Joe Jones" written into the database.

So not knowing where the magic concatenation was happening, I decided to remove the first half of the block altogether leaving just this ...

<?php echo (isset($_SESSION['eCartCheckoutForm_shipping_lastname'])?$_SESSION['eCartCheckoutForm_shipping_lastname']:$_SESSION['eCartCheckoutForm_lastname']); ?>

Notice that now I'm just processing the magic "lastname" session variable given that I suspect it has already been pre-processed into "Joe Jones".

And so I ran a test with the OrderShipName bound to just the "magic" last name and sure enough that was it. I processed a test order and "Joe Jones" was written nicely into the database. Yippee !!!!!! Golf claps all around.

So now I'm happy but I'm still wondering if somehow I did this to myself or if this is a bug in the eCart code. I don't like tinkering with other people's code (especially code that I've purchased and could risk support warranty loss) so I didn't change anything of yours. All I did was put a workaround in place, that is, use the magic lastname only because it already was first + last name. That I did on *my* pp_confirm page.

But the mystery still remains ... Where did the magic concatenation happen?

Hope this makes sense and can help someone else.

Bob Hunt

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





Ease of use


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