Page 1 of 1
Add phone/email to the delivery address
Posted: Fri Mar 10, 2023 10:31 am
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
Re: Add phone/email to the delivery address
Posted: Fri Mar 17, 2023 12:40 pm
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
Re: Add phone/email to the delivery address
Posted: Fri Mar 17, 2023 2:53 pm
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
Re: Add phone/email to the delivery address
Posted: Mon Mar 20, 2023 9:41 pm
by Kofod95
@radhavallabh, did
this fix your issue here as well?
//Daniel
Re: Add phone/email to the delivery address
Posted: Tue Mar 21, 2023 4:04 am
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
Re: Add phone/email to the delivery address
Posted: Tue Mar 21, 2023 5:44 am
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
Re: Add phone/email to the delivery address
Posted: Sun Apr 30, 2023 11:51 am
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
Re: Add phone/email to the delivery address
Posted: Sun Apr 30, 2023 3:34 pm
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.
Re: Add phone/email to the delivery address
Posted: Sun Apr 30, 2023 3:54 pm
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.
Re: Add phone/email to the delivery address
Posted: Sun Apr 30, 2023 9:55 pm
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.