Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

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

 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 69 posts

Posted 16 September 2018 - 01:50 PM #1

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, 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10945 posts

Posted 16 September 2018 - 09:47 PM #2

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?


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 69 posts

Posted 17 September 2018 - 06:08 AM #3

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? 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10945 posts

Posted 17 September 2018 - 07:28 PM #4

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18335 posts

Posted 18 September 2018 - 05:37 AM #5

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 69 posts

Posted 18 September 2018 - 05:58 AM #6

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, 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18335 posts

Posted 18 September 2018 - 02:04 PM #7

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.