-
Add Shipping Telephone Support Thread
This is the support thread for the Adding_Shipping_Telephone modification. It was Uploaded on 04-25-2010.
This modification adds the telephone number to the Shipping Address of the Customer's Order.
You can add an address during checkout or from their account page.
This mod was tested on a New 1.39a install and a 1.39a with Super_Orders 2.0 installed.
The phone number will show up in the Shipping Address section on the Order Confirmation Screen, the Printed Invoice and Admin Orders Screen.
The purpose is to have a telephone number to call at the Ship To Address if it becomes necessary.
-
Re: Add Shipping Telephone Support Thread
We have Numinix AJAX checkout, Jeff added the ship to phone number for us.
Zen Cart Help
http://www.zencartcodeanddesign.com
-
Re: Add Shipping Telephone Support Thread
I try this mod the email did work but the shipping telephone number does not show in the admin using the last version of zen :(
-
3 Attachment(s)
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
|Dexter|
I try this mod the email did work but the shipping telephone number does not show in the admin using the last version of zen :(
I have just installed it on a 1.3.9d installation and it works as it should. I did find one small error on line 100 of the file:
includes/modules/pages/address_book_process/header_php.php. It was missing a closing bracket }. A new file has been uploaded to Zen Cart or you can get it from MY Mods Site.
If the Default Address is used, you will not see any change in the Admin Orders Screen. If the shipping address is NOT the default address, then it will show the different phone number. If it is the Default Address or not, it DOES show up on the Invoice and the Packing List. I am attaching screen shots of those 3 pages, but not sure if it will show up well enough to see. (Magnifying glass may be necessary) :D
-
Re: Add Shipping Telephone Support Thread
Hallo,
Thank you for this great module. The receiver's telephone number is a tiny but very very essential detail!!!
I have installed it to zen-cart-1.3.9e with edit orders and super orders and seems to be working all right!
I would like to ask the following:
There is a difference in the last line of the file
includes/classes/order.php
In the original znen-cart file, the last line reads:
Code:
$this->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL', array($zf_insert_id, $email_order, $extra_info, $html_msg));
In the module's file the last line is shorter:
Code:
$this->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL');
Is it safe to ignore this difference?
Kind regards,
orange_juice
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
orange_juice
Hallo,
Thank you for this great module. The receiver's telephone number is a tiny but very very essential detail!!!
I have installed it to zen-cart-1.3.9e with edit orders and super orders and seems to be working all right!
I would like to ask the following:
There is a difference in the last line of the file
includes/classes/order.php
In the original znen-cart file, the last line reads:
Code:
$this->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL', array($zf_insert_id, $email_order, $extra_info, $html_msg));
In the module's file the last line is shorter:
Code:
$this->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL');
Is it safe to ignore this difference?
Kind regards,
orange_juice
Go with the longer line. This mod was done under 1.3.9a and the longer line was added in 1.3.9d.
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
JTheed
Go with the longer line. This mod was done under 1.3.9a and the longer line was added in 1.3.9d.
All right!
Since I have a few modules installed, it was easier for me to install the Add Shipping Telephone Module according to the template override system.
Therefore, I modified the structure of the directory tree in my installation and I have adjusted it in a way that it changes only 5 core files:
Code:
./admin/includes/classes/order.php
./admin/includes/functions/functions_customers.php
./admin/customers.php
./includes/classes/order.php
./includes/functions/functions_customers.php
The other ones are inserted as override files in the template system so it is easier to control them if they need changing or so:
Code:
./includes/languages/YOUR_TEMPLATE/english.php
./includes/modules/YOUR_TEMPLATE/create_account.php
./includes/modules/YOUR_TEMPLATE/pages/address_book/header_php.php
./includes/modules/YOUR_TEMPLATE/pages/address_book_process/header_php.php
./includes/modules/YOUR_TEMPLATE/checkout_new_address.php
./includes/modules/YOUR_TEMPLATE/checkout_address_book.php
./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php
./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_checkout_new_address.php
Thank you again for this contribution. :clap:
Kind regards,
orange_juice
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
orange_juice
All right!
Since I have a few modules installed, it was easier for me to install the Add Shipping Telephone Module according to the template override system.
Therefore, I modified the structure of the directory tree in my installation and I have adjusted it in a way that it changes only 5 core files:
Code:
./admin/includes/classes/order.php
./admin/includes/functions/functions_customers.php
./admin/customers.php
./includes/classes/order.php
./includes/functions/functions_customers.php
The other ones are inserted as override files in the template system so it is easier to control them if they need changing or so:
Code:
./includes/languages/YOUR_TEMPLATE/english.php
./includes/modules/YOUR_TEMPLATE/create_account.php
./includes/modules/YOUR_TEMPLATE/pages/address_book/header_php.php
./includes/modules/YOUR_TEMPLATE/pages/address_book_process/header_php.php
./includes/modules/YOUR_TEMPLATE/checkout_new_address.php
./includes/modules/YOUR_TEMPLATE/checkout_address_book.php
./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php
./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_checkout_new_address.php
Thank you again for this contribution. :clap:
Kind regards,
orange_juice
:oops: :lamo:
I faced a problem ...
The address book telephone number was erased just after I inserted it ...
I reinstalled the module replacing all the core files, as per default, and now everything works OK.
Sorry for rushing! :blush:
Kind regards,
orange_juice
-
Re: Add Shipping Telephone Support Thread
A quick question I hope someone might know, Will this work with version 1.38a? Hope so. If not, can anyone help or recommend?
Many thanks, Im almost ready to cut the ribbon on our store!:clap:
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
beco1979
A quick question I hope someone might know, Will this work with version 1.38a? Hope so. If not, can anyone help or recommend?
Many thanks, Im almost ready to cut the ribbon on our store!:clap:
Yes, It should work fine in 1.38a
-
Re: Add Shipping Telephone Support Thread
When I try to install the SQL on 1.3.9g i receive the following error:
Quote:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL CHANGES ALTER TABLE zen_address_book ADD entry_telephone VARCHAR( 32 ) NULL ' at line 1
in:
[SQL CHANGES ALTER TABLE zen_address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTER entry_lastname ;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Not very savvy with any of the SQL. Anyone have any ideas?:frusty:
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
mdmoose
When I try to install the SQL on 1.3.9g i receive the following error:
Not very savvy with any of the SQL. Anyone have any ideas?:frusty:
Try it without the zen_ at zen_address_book so it should be:
ALTER TABLE address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTER entry_lastname
JT
-
Re: Add Shipping Telephone Support Thread
Oddly enough in the sql I was using it was formatted as you said. But the error message still says it has zen_address_book.
SQL as follows:
Quote:
SQL CHANGES
ALTER TABLE address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTER `entry_lastname` ;
ALTER TABLE orders ADD delivery_telephone VARCHAR( 32 ) NULL AFTER `delivery_country` ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =1 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =2 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =3 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =4 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =5 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =6 LIMIT 1 ;
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
mdmoose
Oddly enough in the sql I was using it was formatted as you said. But the error message still says it has zen_address_book.
SQL as follows:
Did you use the prefix zen when you created your store? Possibly you need to add zen_ to the beginning of all of them then.
ALTER TABLE zen_address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTER `entry_lastname` ;
ALTER TABLE zen_orders ADD delivery_telephone VARCHAR( 32 ) NULL AFTER `delivery_country` ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =1 LIMIT 1 ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =2 LIMIT 1 ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =3 LIMIT 1 ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =4 LIMIT 1 ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =5 LIMIT 1 ;
UPDATE `zen_address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE `address_format`.`address_format_id` =6 LIMIT 1 ;
-
Re: Add Shipping Telephone Support Thread
Thanks for all your help. It seems I am getting even different error messages now. I though the sql installed correctly but I was not recieving phone numbers in my invoices. Now when trying the sql i get
Quote:
1054 Unknown column 'address_format.address_format_id' in 'where clause'
in:
[UPDATE zen_address_format SET address_format = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE address_format.address_format_id =1 LIMIT 1 ;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
mdmoose
Thanks for all your help. It seems I am getting even different error messages now. I though the sql installed correctly but I was not recieving phone numbers in my invoices. Now when trying the sql i get
I was having this same problem with my website. I am using the new Zencart 1.3.9h and just for quick background I have installed a few modules including the TY Package tracker 3.1.1, edit orders 3.03, image handler, and slimbox.
After playing around for a few hours I noticed that when you plug in the .sql code you need to remove the first line that says
SQL CHANGES
and only paste the code below that line into the zencart sql paches section.
Try that and see if that helps. It seemed to do the trick on my site however now I have to figure out a whole new problem with the telephone number field not showing up. Although I still get the error stating a phone number is required :/
Also you may wish to change the setting for both telephone database options (Uncheck the "Allow Null" option) to make the telephone field a mandatory field. For example I ship via FedEx which requires a delivery telephone number.
-
Re: Add Shipping Telephone Support Thread
OK so after about 4 hours of tinkering around with everything I believe I have found the issue with the Telephone field not showing up.
What I did was go back and reformat all instances of the "shipping/delivery address information". So what I mean by this is that all the PHP code I added to my zencart code where it shows the "firstname, lastname, street, etc) I changed everything to the same format. For my example I moved all the telephone code between the "lastname" and the "street" line.
I also redid the sql setting a little bit to the same format and removed a space between the firstname and lastname attribute and magically my site now shows the telephone field as it should!
*NOTE: I am not a scripter or programmer. I also am not fluent in SQL. Please only use my comments at your own risk. I do not specifically understand what my changes did.
Any elaboration or more details to explain would be greatly appreciated. I am assuming since I am using v1.3.9h maybe it needed to match the order in which the items were listed (ie. firstname, lastname, telephone, street, city, state, zip, country)???
-
Re: Add Shipping Telephone Support Thread
Hello,
We are running Fast And Easy Checkout (FEC) and that is the problem made. Can you please help us regarding the matter?
Thanks in advance.
-
Re: Add Shipping Telephone Support Thread
You could always just use the fax number option for a telephone shipping number ( assuming you're not already using it ).
Enable the fax number under " Configuration " -> " Customer Details ".
Edit the language file and rename the fax number entry to " Shipping Telephone " or whatever you want.
You can then ( if you want to ) edit the : "tpl_modules_create_account.php " and "tpl_modules_no_account.php" and move the fax number up into the shipping address.
I've done this and it works fine with FEC
-
Re: Add Shipping Telephone Support Thread
Hi,
Just wondering if I could get some help on this module.
I am using Zen Cart 1.3.9b, and because I also had other modules previously installed, I chose to manually enter the changes to all the files. I followed very carefully with all the instructions and compared my changes with the codes from the module, just to make sure I'm adding the changes at the correct places.
However, after everything is done, I noticed another addition of phone number in the customer invoice below "SOLD TO" (before I added the module, I had only one telephone number displayed, but now I have two).
I would like to have the shipping phone number to be displayed below "SHIP TO" on customer's invoice. What should I do?
I don't have Super_Orders 2.0 installed in my zen cart, could this be the cause of the problem??
Please help me, anyone...I am so lost and desperate.....
Thank you!!
-
Re: Add Shipping Telephone Support Thread
When I try to install the SQL on 1.3.9h I receive the following error:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL CHANGES ALTER TABLE address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTE' at line 1
in:
[SQL CHANGES ALTER TABLE address_book ADD entry_telephone VARCHAR( 32 ) NULL AFTER entry_lastname ;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
PLEASE HELP. THANKS!
-
Re: Add Shipping Telephone Support Thread
Hello,
I have 1.3.9h and the super order also installed when i went to install this mod and inserted the sql into the database i get this.
1054 Unknown column 'address_format.address_format_id' in 'where clause'
in:
[UPDATE zen_address_format SET address_format = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE address_format.address_format_id =1 LIMIT 1 ;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Now i checked and rechecked all looks good as i can see but i keep getting this error.
Is something wrong or am i doing something wrong?
Thanks
-
Re: Add Shipping Telephone Support Thread
I got this mode working in 1.5.0. Let me know if someone needs any assistance. I only changed the sql a bit. Otherwise I merged the changes to the 1.5.0 files and it works perfect now.
-
Re: Add Shipping Telephone Support Thread
Quote:
Originally Posted by
bindaaz
I got this mode working in 1.5.0. Let me know if someone needs any assistance. I only changed the sql a bit. Otherwise I merged the changes to the 1.5.0 files and it works perfect now.
Hello :)
This sounds perfect for what I am looking to do, any chance of an idiots guide to installing it with version 1.5?
Thanks in advance
-
Re: Add Shipping Telephone Support Thread
Verifying, works good on 1.3.9h outside of the small (but critical) typo mentioned on post #4 of this thread.
They offer installation if modifying all those files is not your thang.
Thanks! Good mod.
-
Re: Add Shipping Telephone Support Thread
Anybody tested it on ZC1.9h with COWOA?
I installed but got black page while checking out. I am not sure why. It seems a big problem for me.:(
Hope somebody could offer advice.
Thanks
-
Re: Add Shipping Telephone Support Thread
i need help some error to my telephoe i dont know help version 1.5
-
Re: Add Shipping Telephone Support Thread
I installed this on ZC 1.5.1 with Fast and Easy Checkout and COWOA, the SQL file worked good without touching it, just don't include the first line of text "SQL CHANGES",
IMPORTANT! In the readme file, there is one error that needs fixed!, a missing }
Make sure to use this code below:
*****************************************************************
* 4) includes/modules/pages/address_book_process/header_php.php *
*****************************************************************
Add line 60
$telephone = zen_db_prepare_input(zen_sanitize_string($_POST['telephone']));
Add line 97
if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
$error = true;
$messageStack->add('addressbook', ENTRY_TELEPHONE_ERROR);
}
Add line 175
array('fieldName'=>'entry_telephone', 'value'=>$telephone, 'type'=>'string'),
Add to end of line 256 what is in the [ ]'s but DO NOT INCLUDE [ ]
$entry_query = "SELECT entry_gender, entry_company, entry_firstname, entry_lastname, [entry_telephone,]
-
Re: Add Shipping Telephone Support Thread
I also added code to 2 of the FEC files so the customers phone number will show under the addresses on the checkout page, I think this is important so the customer can confirm their address AND phone number before submitting the order, especially when using the one page checkout.
After installing the mod (carefully read the readme file first and manually merge code into your files), use this code below for FEC:
*****************************************************************************
FEC files mods. This will add the phone number to the bottom of the addresses shown on the checkout page
*****************************************************************************
*****************************************************************************
* 1) FEC file /includes/modules/quick_checkout.php
*****************************************************************************
Find around line 440:
'entry_country_id' => $country);
Replace with:
'entry_country_id' => $country,
'entry_telephone' => $telephone);
Find around line 489:
array('fieldName'=>'entry_country_id', 'value'=>$country_shipping, 'type'=>'integer')
replace with:
array('fieldName'=>'entry_country_id', 'value'=>$country_shipping, 'type'=>'integer'),
array('fieldName'=>'entry_telephone', 'value'=>$telephone, 'type'=>'string')
******************************************
* 2) FEC file includes/modules/fec_create_account.php *
******************************************
Add to the end of line 489
'entry_telephone' => $telephone,
******************************************
-
Re: Add Shipping Telephone Support Thread
I copied this to also have a different billing phone number show up in the customers order confirmation email and order history page, and in my Admin. It was easy after already doing this add shipping phone number add on.
Only have to edit the files where you added the delivery_telephone code, do the same thing but make it billing_telephone where the other billing_address code is.
Add Billing telephone number:
*********************************
* 5) includes/classes/order.php *
*********************************
near line add 48 with the other billing_* code
billing_telephone,
near line 147 add with the other billing code
'telephone' => $order->fields['billing_telephone'],
Add near line 603...
'billing_telephone' => $this->billing['telephone'],
***************************************
* 2) admin/includes/classes/order.php *
***************************************
Add to end of line 31 what is in the [ ]'s but DO NOT INCLUDE [ ]
[ billing_telephone,]
Add line near line 113 below the billing_country code
'telephone' => $order->fields['billing_telephone'],
At line 113 make it say billing_telephone instead of customers_telephone (you already put that there based on the directions above for the shipping telephone add on)
'telephone' => $order->fields['billing_telephone'],
First run the below sql:
ALTER TABLE orders ADD billing_telephone VARCHAR( 32 ) NULL AFTER `billing_country` ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =1 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =2 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =3 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =4 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =5 LIMIT 1 ;
UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$telephone' WHERE
`address_format`.`address_format_id` =6 LIMIT 1 ;
-
Re: Add Shipping Telephone Support Thread
Hi
Using 1.5.4 and trying to install the 1.5.5 version of this module (perhaps that's the problem), however if anyone can shed some light.
When I Change the Delivery Address and click continue I get the following error on screen -
var-type undefined: stringIgnoreNull(XYZ)
- where XYZ is whatever I have entered in the First Name field.
Fairly certain the error is in includes/modules/YOUR_TEMPLATE/checkout_new_address.php however this file is copied in from the zip file without any modifications so at a bit of a loss.
-
Re: Add Shipping Telephone Support Thread
You need to use the 1.5.5 copy of includes/classes/db/mysql/query_factory.php or use the old sanitizer 'type'=>'string'.