Add phone/email to the delivery address

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Add phone/email to the delivery address

Post by Kofod95 »

Sometimes, people place an order that is supposed to be delivered to someone else. Many of those who do the delivering (I don't want to try guessing the correct term to use; shipping company, courier etc), wants to be able to get in touch with the person they are delivering to.
Therefor, I've made this add-on that collects contact information for each new address. It's tested on 1.0.8.20, but an almost identical set works on 1.0.7.12 as well, so it's not a huge problem to make it backwards compatible, if someone needs to do that.

Two attachements; a regular upload and install the two new modules:
DeliveryContactInfo_1_0_0.zip
and a zipur-installer:
DeliveryContactInfo_1_0_0 (1).zip
.
Make sure to install the customer-data module Delivery Contact Info before anyone gets to checkout, or wait to upload the hook until the rest is configured.

//Daniel
You do not have the required permissions to view the files attached to this post.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Add phone/email to the delivery address

Post by radhavallabh »

Hi dear;
Thanx for this module;
But when I edit the delivery address in address book it does not pull the phone number I update from database always shows blank.

Please help fix it;
Regds./
radhavallabh
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Add phone/email to the delivery address

Post by Kofod95 »

Curious.
It works fine for me, showing either a placeholder or the data attached to that address:
Screenshot_20230317-154905.png
I'll try a few more test-sites as well as the other live site I have access to, but could anyone else try as well, that would be helpful!

//Daniel
You do not have the required permissions to view the files attached to this post.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Add phone/email to the delivery address

Post by Kofod95 »

@radhavallabh, did this fix your issue here as well?

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Add phone/email to the delivery address

Post by radhavallabh »

Kofod95 wrote: Mon Mar 20, 2023 9:41 pm @radhavallabh, did this fix your issue here as well?

//Daniel
Sorry for not checking back on this dear;
I just cross checked, yes this issue got fixed as well.

Thank you again;
Regds./
radhavallabh
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Add phone/email to the delivery address

Post by Kofod95 »

radhavallabh wrote: Tue Mar 21, 2023 4:04 am Sorry for not checking back on this dear;
I just cross checked, yes this issue got fixed as well.

Thank you again;
Regds./
radhavallabh
No worries, I'm just glad it works for you as well now!

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
tessthepup
Certified Developer
Posts: 381
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: Add phone/email to the delivery address

Post by tessthepup »

@Kofod95

Hi Daniel,

I have installed both the modules above and apart from breaking the stripe payment module I get [PHOENIX FATAL] after install and this is in the error log
[30-Apr-2023 12:47:30 Europe/London] PHP Warning: DB: [1118] Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs from <ALTER TABLE orders ADD delivery_contact_info VARCHAR(255) NULL AFTER delivery_country_id> in /home/***/public_html/includes/system/versioned/1.0.8.1/database_core.php on line 44
I have googled the warning but with no firm fix found.

Any ideas?

Thanks

Mark
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Add phone/email to the delivery address

Post by ecartz »

tessthepup wrote: Sun Apr 30, 2023 11:51 am I have googled the warning but with no firm fix found.

Any ideas?
Take some of the columns that are currently VARCHAR(255) and change them to something like VARCHAR(60). That's the simple solution. Depending on the structure of your orders table, it might also help to change some columns from VARCHAR to TEXT or TINYTEXT.

A more complicated solution would move the addresses out of the orders table and into something like an orders_addresses table.
User avatar
tessthepup
Certified Developer
Posts: 381
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: Add phone/email to the delivery address

Post by tessthepup »

ecartz wrote: Sun Apr 30, 2023 3:34 pm
tessthepup wrote: Sun Apr 30, 2023 11:51 am I have googled the warning but with no firm fix found.

Any ideas?
Take some of the columns that are currently VARCHAR(255) and change them to something like VARCHAR(60). That's the simple solution. Depending on the structure of your orders table, it might also help to change some columns from VARCHAR to TEXT or TINYTEXT.

A more complicated solution would move the addresses out of the orders table and into something like an orders_addresses table.
@ecartz

Thanks Matt, I have tried to changed some of the VARCHAR to 60 and also TEXT and TINYTEXT but phpMyAdmin wont allow it and throws this back
#1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Add phone/email to the delivery address

Post by ecartz »

MariaDB has a troubleshooting page for this: https://mariadb.com/kb/en/troubleshooti ... th-innodb/

It says to run

Code: Select all

SELECT NAME, ROW_FORMAT
FROM information_schema.INNODB_SYS_TABLES
WHERE ROW_FORMAT IN('Redundant', 'Compact')
AND NAME NOT IN('SYS_DATAFILES', 'SYS_FOREIGN', 'SYS_FOREIGN_COLS', 'SYS_TABLESPACES', 'SYS_VIRTUAL', 'SYS_ZIP_DICT', 'SYS_ZIP_DICT_COLS');
Then run (e.g.)

Code: Select all

ALTER TABLE orders ROW_FORMAT=DYNAMIC;
or

Code: Select all

ALTER TABLE orders ROW_FORMAT=COMPRESSED;
Dynamic is currently the default row type (if you made a new table without specifying the row type or copying from an existing table), so that may be a better solution.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply