Community Add-Ons
| Maintainers: | comclusive |
Home or Business Customer
for osCommerce Online Merchant v2.2
This is my first full mod. I hope you like it.
This mod adds a business or home user function when creating an account. Once created, the customer cannot change the type of account themselves, it has to be requested and done through the admin panel.
I have also included an optional section in this contrib, which will allow different maximum addresses for home and business customers. This is set through the admin panel, so a home user could be given 2 addresses and a business user could be given 5, for example.
The requirement for entering home or business user can be turned on and off via the admin panel, and if the extra addresses part has been installed and the requirement turned off, the max addresses defaults to the home user setting.
Screenshots Included
If you have any issues or updates, please use the forum
The forum for this contrib is
http://forums.oscommerce.com/index.php?showtopic=233891
Legend:
Download
Report
You can activate/desactivate the field COMPANY when choosing between HOME or BUSINESS usertype.
In file /catalog/create_account.php:
Replace this line:
------------------
<td class="main"><?php echo tep_draw_radio_field('usertype', 'h') . ' ' . HOME . ' ' . tep_draw_radio_field('usertype', 'b') . ' ' . BUSINESS . ' ' . (tep_not_null(ENTRY_USERTYPE_TEXT) ? '<span class="inputRequirement">' . ENTRY_USERTYPE_TEXT . '</span>': ''); ?></td>
With:
-----
<td class="main"><?php echo tep_draw_radio_field('usertype', 'h', '', 'onclick=company.disabled=true') . ' ' . HOME . ' ' . tep_draw_radio_field('usertype', 'b', '', 'onclick=company.disabled=false') . ' ' . BUSINESS . ' ' . (tep_not_null(ENTRY_USERTYPE_TEXT) ? '<span class="inputRequirement">' . ENTRY_USERTYPE_TEXT . '</span>': ''); ?></td>
Replace this line:
------------------
<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
With:
-----
<td class="main"><?php echo tep_draw_input_field('company', '', 'disabled') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
-------------------------------------------
DuFF1!
