Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-12-2015 12:31:29

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Creating Additional Phone Number Field

I'd like to add an additional text input for a cell phone, but I'd like it to be in the same area as the default telephone is, not in its own section. Is this possible? I imagine it would need to be in the customer account area as well as additional areas. Adding it as a custom checkout field puts it in its own section instead of with the billing info.

Offline

 

#2 05-15-2015 08:56:07

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

No solution to this problem?

Offline

 

#3 05-17-2015 05:18:25

CrownRoyal
Member
Registered: 01-10-2009
Posts: 716

Re: Creating Additional Phone Number Field

I would think you are looking at changing a couple of the db tables in order to add the additional value. A custom mod would be the solution there.

Offline

 

#4 05-17-2015 13:32:00

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

well that is unfortunate. I would have thought adding a customer field wouldn't be such an issue as to require custom modification. Thanks for the input.

Offline

 

#5 05-17-2015 13:43:30

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Creating Additional Phone Number Field

just look at the core_formfields table.
Look for the telephone number rows - there will be a few for different forms such as guest checkout, create account, update account, etc.
Clone the normal telephone number rows and change the details of your new row as required.


Rob

Offline

 

#6 05-18-2015 06:28:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Creating Additional Phone Number Field

Correct.  In the defaultvalue field, instead of using {SESSION:phone} use {SESSION:phonealt} and add a column to the core_users table with the name 'phonealt'.  This will store the new field in the session and make it available in the user account.  As zanart said, hit all the forms where you see a phone and clone it.


Nick Hendler

Offline

 

#7 09-28-2015 16:26:44

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

This isn't carrying the cell phone to the checkout page. I created a new account, entered my cell phone but it's not showing when I get to the actual checkout page (checkoutintro)

Offline

 

#8 09-29-2015 06:36:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Creating Additional Phone Number Field

Make sure any form fields you built that accept input for this core_users column are named '<formid>.phonealt'.  I assume you added this at a minimum to the accountmaint and createaccount forms.


Nick Hendler

Offline

 

#9 09-29-2015 08:00:13

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

I added it  here:
core.accountmaint
core.acctupgrade
core.contact
core.createaccount
ecom.guestco

when I test it as guest or create new account, I see a place to enter my cell phone, but when I click to checkout with my order, the cell info isn't there and it's not on the order. If I log into an account, I don't see the cell, but if I click "edit" my account, it's there. I then click to checkout and it's gone again. No cell is displayed during checkout or on the email order info. Does this have to be added to the emails that go out? I would have thought it would be part of the order, such as ordersummary but I guess not?

Offline

 

#10 09-30-2015 08:35:25

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Creating Additional Phone Number Field

It sounds like your field is working, now you need to edit a few displays to display it.  You probably want to change cobillinfo.php and all files matching ordersummary*.php in {private}/apps/ecom/ECOM/includes.  Look for 'phone' in those files for the main phone number and make edits close to there.


Nick Hendler

Offline

 

#11 09-30-2015 10:52:18

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

I made edits like this one on ordersummary.php and it did not carry over to the invoice or email notice. Adding the phonealt to the cobillinfo.php allowed it to carry over to the final checkout page where you enter your payment info,but proceeding to the invoice page it does not show. I made similar edits to ordersummary.php, ordersummaryprint.php, ordersummarytxt.php and ordersummaryxhtml.php

Code:

 if ((!(empty($order['order']['phone']))) && ($order['order']['phone'] != '0000000000')) {

          $phone = $this->xhtml_encode($order['order']['phone']);
          print '<p class="strong">Telephone Number</p><p>' . $phone . '</p>' . $eol;

     } // End of if statement.
     if ((!(empty($order['order']['phonealt']))) && ($order['order']['phonealt'] != '0000000000')) {

          $phonealt = $this->xhtml_encode($order['order']['phonealt']);
          print '<p class="strong">Cell Number</p><p>' . $phonealt . '</p>' . $eol;

     } // End of if statement.

Offline

 

#12 10-01-2015 07:38:07

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Creating Additional Phone Number Field

Did you create the column ecom_orders.phonealt?  Did you modify {private}/apps/ecom/ECOM_Checkout/ECOM_Checkout.php to save the session value for phonealt to the order in the writeorder() function?


Nick Hendler

Offline

 

#13 10-01-2015 09:45:39

sbhkma
Member
Registered: 05-17-2006
Posts: 448

Re: Creating Additional Phone Number Field

I hadn't added the ecom_checkout info. I just did that and ran a test order. The phonealt showed up on the page to enter payment details. It did not show up on the order summary page or in the emails. I have the phonealt added to all files matching ordersummary*.php in {private}/apps/ecom/ECOM/includes. I think I'm missing something.

Offline

 

#14 10-02-2015 07:25:27

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Creating Additional Phone Number Field

Did you create the column ecom_orders.phonealt?  Ie, did you add a column named phonealt to ecom_orders, and are you writing the session variable phonealt to that in the ECOM_Checkout writeorder() function?


Nick Hendler

Offline

 

Board footer