Fix Company mod support thread
Fix Company resolves an issue in some versions of Chrome which autofills the Company Name field with the year of birth stored in the cache of a user's browser.
If your Zen Cart address book is filled with company names which are 4 digits long, the Zen Cart Fix Company contribution can clean them out.
https://www.zen-cart.com/downloads.php?do=file&id=2255
Re: Fix Company mod support thread
I wonder whether that's the same problem that is also putting the city name in the suburb field. I've noticed when editing the company field manually that the same people with their birth year in the company name field also have the city name duplicated in the suburb field.
Re: Fix Company mod support thread
Re: Fix Company mod support thread
Live site: ZC 157b; Responsive_Classic
Dev site: ZC 157c; ZCA Bootstrap 3.1.2
Live site:
Firefox autofill issue where "City" populating the "Address 2" field was permanently corrected using this helpful mod.
Dev site:
Same Firefox "City" autofill issue. Noticed huge differences in template files in WinMerge, so I came here to ask if there's a bootstrap-compatible version available before I break something.
Re: Fix Company mod support thread
When you're in a situation like this, just compare the plugin file to the unmodified file from a fresh download.
Here's ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php (less than sign) vs unmodified file (greater than sign):
< <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
Heres' ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php vs unmodified file
< <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
2 Attachment(s)
Re: Fix Company mod support thread
Quote:
Originally Posted by
swguy
When you're in a situation like this, just compare the plugin file to the unmodified file from a fresh download.
Here's ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php (less than sign) vs unmodified file (greater than sign):
< <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
Heres' ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php vs unmodified file
< <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
Fresh downloaded files for comparison (Fix Company 1.0 vs Bootstrap v3.1.2) :
This is tpl_modules_address_book_details.php:
Attachment 19608
This is tpl_modules_create_account.php:
Attachment 19609
Re: Fix Company mod support thread
Quote:
Originally Posted by
swguy
When you're in a situation like this, just compare the plugin file to the unmodified file from a fresh download.
Here's ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php (less than sign) vs unmodified file (greater than sign):
< <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
Heres' ./includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php vs unmodified file
< <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' autocomplete="new-password" id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
---
> <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"'. (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
Are you referring to the responsive_classic template or the bootstrap template? Thanks.
Re: Fix Company mod support thread
I am referring to the files in the plugin. This shows you the changes you will have to apply to *your* template (whether that is rc, bootstrap, etc.)
Re: Fix Company mod support thread
Quote:
Originally Posted by
swguy
I am referring to the files in the plugin. This shows you the changes you will have to apply to *your* template (whether that is rc, bootstrap, etc.)
Appreciate it! I was thrown off by the filenames in the bootstrap template. I ended up modifying the following files:
Code:
includes/templates/bootstrap/templates/tpl_modules_common_address_format.php
and
Code:
includes/templates/bootstrap/templates/tpl_modules_create_account.php
Thank you for your time!