Is Cs-Cart Saves Fields' Values Of Shipping Section In Customer Information Section?

Hi all,

Every day I discover odd behaviors in CS-Cart!!

Why CS-Cart saves the data of Shipping/Billing section in Customer Information section when those fields are not shown? I mean, when, say phone, field is not shown in Customer Information section, CS-Cart imports the value of phone field in Shipping Address section.

Is there an easy way to disable this behavior?

Thank you for your contribution.

Regards,

You could do it conditionally by property. But if something like phone isn't need for the shipping, I would probably look more into the shipping carrier code to see why it's pulling it. Or is your concern that the info is becoming part of the order?

Thank you tbirnseth for your reply.

Can you elaborate on this:

You could do it conditionally by property.

My concern is that the phone field in shipping address is being saved in Contact Information section when it is hidden.

Can this be disabled easily?

Now I'm slightly confused as to the issue you're trying to solve.

Are you wanting to NOT update the profile with a phone if the phone is entered in the profile on the checkout page and the billing/shipping addresses are the same radio is 'yes'? Is it only the phone number or do you not want to update the user's profile from checkout info at all?

I don't think (but not sure because I haven't looked) that a profile field will only be updated if it's empty in the profile and set in checkout.

My concern is that the phone field in shipping address is being saved in Contact Information section when it is hidden.

Can this be disabled easily?

app/functions/fn.users.php

replace

    if (!isset($data['phone'])) {
        if (!empty($data[$main_address_zone . '_phone'])) {
            $data['phone'] = $data[$main_address_zone . '_phone'];
        } elseif (!empty($data[$alt_address_zone . '_phone'])) {
            $data['phone'] = $data[$alt_address_zone . '_phone'];
        }
    }

with

/* 
   if (!isset($data['phone'])) {
        if (!empty($data[$main_address_zone . '_phone'])) {
            $data['phone'] = $data[$main_address_zone . '_phone'];
        } elseif (!empty($data[$alt_address_zone . '_phone'])) {
            $data['phone'] = $data[$alt_address_zone . '_phone'];
        }
    }
*/

Unfortunately function does not contain hooks

Yes, this is exactly what I am looking for. Simply, I don't want the data of phone field that I enter in Shipping address to be used by the Contact Information phone field (in the background and while the latter field is not active).

Thank you very much, eCom Labs. And thank you indeed, tbirnseth for your interest to solve my issue.

Since there is no hook in the function. This raises a question for me. Are there any added features/preferences to use the default CS-Cart phone field (s_phone) instead of creating a custom field in the CMS?

I see some advantages when exporting customer data to excel sheet. Also, In abandoned carts, the custom fields are not available. Are there any other features which could be missed in custom fields?

Regards,

It will be also required Bill to and Ship to code snippets in the document editor