Jump to content
Sign in to follow this  
Lincon

Company name in addressbook

Recommended Posts

Posted (edited)

Hello everyone,,

Weeks ago when I embarked on a V6 upgrade, I found that the addressbook table had no entries for company_name.

I assumed, this was because the same field in my V3 cart was called 'company'

Today, I did a dummy run showbox.bio/ tutuapp.uno/ vidmate.vet/ of upgrading the live site, just for timings etc. However, before I did, i renamed this field 'company_name', hoping that after the upgrade to V6, this field in 'addressbook' would be populated.

However, it's still empty.

Am i correct in assuming that it should be populated, it is so in the 'customer' table, but not in the 'addressbook'

Alternatively could anyone suggest an SQL script which goes along the lines, copy company_name from customer_table to addressbook_table where customer_id = customer_id

Edited by Lincon

Share this post


Link to post
Share on other sites

Posted (edited)

Welcome Lincon! Glad to see you made it to the forums.

Upgrading from CC3 to CC6 will have you pass through the database schema for CC4 and CC5. This is normal - and probably irrelevant, but FYI anyway. The following is the SQL command that copies data from CC4 CubeCart_customer to CC5/6 CubeCart_addressbook.

Be aware, however, that CC3 did not have a Company Name column. (Probably you added that as a modification.) That column was added to CubeCart_customer in CC4 and named companyName. During the upgrade phases, the CC4.0.0 schema will add companyName.

INSERT INTO `CubeCart_addressbook` (
  `customer_id`
, `title`
, `first_name`
, `last_name`
, `company_name`
, `line1`
, `line2`
, `town`
, `state`
, `postcode`
, `country`)
(SELECT
  `customer_id`
, `title`
, `firstName`
, `lastName`
, `companyName`
, `add_1`
, `add_2`
, `town`
, `county`
, `postcode`
, `country`
FROM `CubeCart_customer`
WHERE `add_1` <> '');

So, try renaming the CC3 column company to companyName. (Hopefully, at CC4.0.0, ALTERing a table by trying to add a column that already exists won't cause too much trouble.) Then, at CC5.0.0b1, the CubeCart_addressbook gets populated with CC4 companyName.

Then, double-check the results and Bob's your uncle!

 

Edited by bsmither

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/11/2019 at 12:07 PM, Lincon said:

Hello everyone,,

Weeks ago when I embarked on a V6 upgrade, I found that the addressbook table had no entries for company_name.

I assumed, this was because the same field in my V3 cart was called 'company'

Today, I did a dummy run  of upgrading the live site, just for timings etc. However, before I did, i renamed this field 'company_name', hoping that after the upgrade to V6, this field in 'addressbook' would be populated.

However, it's still empty.

9Apps Cartoon HD Vidmate APK

Am i correct in assuming that it should be populated, it is so in the 'customer' table, but not in the 'addressbook'

Alternatively could anyone suggest an SQL script which goes along the lines, copy company_name from customer_table to addressbook_table where customer_id = customer_id

Even I am having the similar issue and after researching a lot did not found any solution or help yet, please can anyone here help me out with this issue?

 

TIA

 

Regards

Edited by lovelash

Share this post


Link to post
Share on other sites

Welcome lovelash! Glad to see you made it to the forums.

In this conversation, we were discussing upgrading from CC3 to CC6. Is this your situation?

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.

Sign in to follow this  

×
×
  • Create New...