If this is your first visit, check our documentation. To post, register or login.

Fix Company mod support thread

Started by swguy on 2 Jul 2019, 1:11 AM · Views: 2,632

Results 1 to 9 of 9
2 Jul 2019, 1:11 AM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

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

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Dec 2019, 3:57 PM
#2
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

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.

15 Dec 2019, 11:07 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Fix Company mod support thread

Most likely yes.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Jun 2021, 5:15 PM
#4
rosestar avatar

rosestar

New Zenner

Join Date:
Oct 2019
Posts:
24
Plugin Contributions:
0

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.

5 Jun 2021, 6:28 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

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' : '')); ?>

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

6 Jun 2021, 5:36 PM
#6
rosestar avatar

rosestar

New Zenner

Join Date:
Oct 2019
Posts:
24
Plugin Contributions:
0

Re: Fix Company mod support thread

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

14 Jun 2021, 4:59 PM
#7
rosestar avatar

rosestar

New Zenner

Join Date:
Oct 2019
Posts:
24
Plugin Contributions:
0

Re: Fix Company mod support thread

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.

14 Jun 2021, 5:58 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

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.)

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 Jun 2021, 1:48 AM
#9
rosestar avatar

rosestar

New Zenner

Join Date:
Oct 2019
Posts:
24
Plugin Contributions:
0

Re: Fix Company mod support thread

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:

includes/templates/bootstrap/templates/tpl_modules_common_address_format.php

and

includes/templates/bootstrap/templates/tpl_modules_create_account.php

Thank you for your time!