Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Location
    Girona (Spain)
    Posts
    31
    Plugin Contributions
    0

    help question Two create account forms: companies and individuals

    Hello!

    I'm configuring a shop for a friend and I'm stuck investigating how can I have two create account forms, one for companies and one for individuals.

    because of the companies form have many compulsory fields I can't use the admin option to enable the company field of the form, so I think the ideal would be to have this two separate forms.

    I'm using 1.3.6 zencart version.

    Any clues on which way I should go?

    thank you very much!

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,462
    Plugin Contributions
    11

    Default Re: Tow create account forms: companies and individuals

    First, leave 1.3.6 for 1.3.8a with ALL security updates. A friend wouldn't let a friend use an older version.

    Secondly, you might find Dual Pricing helpful. Of course, it is designed for 1.3.8a.

  3. #3
    Join Date
    Nov 2007
    Location
    Girona (Spain)
    Posts
    31
    Plugin Contributions
    0

    Default Re: Tow create account forms: companies and individuals

    Thanks for your reply, dbltoe

    Unfortunately, I can't upgrade because of my hosting only supports 1.3.6 version (there aren't many spanish zencart hosting)

    I was thinking to work on the files involved on create_account to duplicate them and renaming them as xxxx_individuals, for instance, and redirect my individuals login box link to a index.php?main_page=login_individuals.

    To do that, I think I need to know which are the flow of index.php?main_page=login, I mean which are the files that call it. But I'm not sure of what are these files.

    Do you think is a good idea to work like this?

    Another possibility I've been thinking of is creating the fields I need for the two types of customers in the default form, and hide the fields for one or other type of customers depending on what link (company login or singular login) is selected.

    But I'm not sure what can be better.

    thanks in advance!
    regards

  4. #4
    Join Date
    Nov 2007
    Location
    Girona (Spain)
    Posts
    31
    Plugin Contributions
    0

    Default Re: Tow create account forms: companies and individuals

    Hello again,

    I created some custom forms on the create account page in order to differentiate wholesale from individuals.
    I create a radio button that allows select if the customer is wholesale or individuals.
    The fact is that I need to hide the wholesale custom fields in the create account form if the option "individuals" is cheked.

    I add an onChange method that fires a javascript function in an option button input with a class="hide" in css. It seems that all is right but doesn't work. The problem is that zencart is unable to find the function. I have tried putting it in includes/modules/pages/create_account/jscript_addr_pulldowns.php and in includes/modules/pages/create_account/jscript_form_check without success, the mozilla firebug still says that the funtion is not defined.

    The function is:

    Code:
    function update_screen(valor) {
      var conjunto = document.getElementById('datos_empresa');
    
    	alert("pp");
    	
    	if (valor == 'Tienda' {
    	conjunto.className='hide';
    	} else {
    	conjunto.className='';
    	}
    }
    This is the radio button code:
    Code:
    <fieldset>
    <legend><?php echo TABLE_HEADING_TIPO_DETAILS; ?></legend>
    <?php
      if (TIPO_CLIENTE == 'true') {
    ?>
    <?php echo zen_draw_radio_field('tipologia_cliente', 'Tienda', '', 'onChange="return update_screen(this.value);" id="tipologia_tienda"') . '<label class="radioButtonLabel" for="tipologia_tienda">' . TIENDA . '</label>' . zen_draw_radio_field('tipologia_cliente', 'Particular', '', 'onChange="return update_screen(this.value);" id="tipologia_particular"') . '<label class="radioButtonLabel" for="tipologia_particular">' . PARTICULAR . '</label>' . (zen_not_null(ENTRY_TIPO_TEXT) ? '<span class="alert">' . ENTRY_TIPO_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    Any clues of where do I have to put the function to make it work??

    Thank you very much in advance!
    Regards
    Last edited by Llama de Anor; 9 Sep 2009 at 10:35 PM. Reason: adding come code to clarify

  5. #5
    Join Date
    Nov 2007
    Location
    Girona (Spain)
    Posts
    31
    Plugin Contributions
    0

    Default Re: Tow create account forms: companies and individuals

    no mather

    finally I have solved the problem putting the code directly in the tpl_modules_create_account.php



    bye!

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,462
    Plugin Contributions
    11

    Default Re: Tow create account forms: companies and individuals

    Now please spend your time looking for a host that allows 1.3.8a. Otherwise, you WILL be hacked eventually without the fixes in 1.3.8.

  7. #7
    Join Date
    Nov 2008
    Location
    London
    Posts
    94
    Plugin Contributions
    0

    Default Re: Tow create account forms: companies and individuals

    Quote Originally Posted by Llama de Anor View Post
    no mather

    finally I have solved the problem putting the code directly in the tpl_modules_create_account.php



    bye!
    Hi Llama de Anor,
    Where abouts in the file did you put the code? I'm looking for the same effect.

 

 

Similar Threads

  1. v139h Create account and contact forms not working
    By mcpisik in forum General Questions
    Replies: 12
    Last Post: 15 Feb 2012, 07:13 AM
  2. login, create account and contact us forms border color
    By blue-grape in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Apr 2010, 10:23 AM
  3. Duplicate forms on Account Create / Log In page
    By MtnVision in forum Managing Customers and Orders
    Replies: 1
    Last Post: 28 Jan 2008, 02:16 AM
  4. Bypass create account success page and go to My Account instead?
    By dealbyethan.com in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2007, 01:50 PM
  5. Multiple 'Create Account' Forms
    By point4design in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Mar 2007, 09:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR