Announcement

Collapse
No announcement yet.

extra text entry fields for products

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    extra text entry fields for products

    Hi there,

    I've a colleague who is trying to create a system whereby when a product is ordered, the customer is requested to give 3 email addresses in 3 separate text boxes.

    The Extra Info prompt gives 1 text box however there does not appear to be a way to increase this.

    Does anyone know a way around this?

    Cheers

    Jos
    Thanks

    Jos Medinger

    Tel : 01978 843 962
    www.internetology.co.uk
    Actinic / E-Commerce Hosting, Design & SEO
    ______________________________________

    #2
    Norman has a patch for this. It's on the forum somewhere
    Owner of a broken heart

    Comment


      #3
      The fix is at http://www.rouxel.cwc.net/actinicstuff.html, search for extra information. I've tried it and it is simple to install and works really well.

      Regards
      Jan Strassen, Mole End

      Comment


        #4
        Here's a quick and dirty way that won't check for empty entries and presents the results somewhat clumsily.

        Code:
        <!-- Fitting 3 items into the Other Info Prompt -->  Simple version.
        
        Make a renamed copy of your Act_ProductLine.html template (or whatever one you're using).
        Set the OtherInfoPrompt in the Product details as appropriate.
        Use the new renamed copy of your Act_ProductLine.html template for this product
        In your new Product template replace the fragment "NETQUOTEVAR:OTHERINFOPROMPT" with the following code.  -->
         
        <!-- NETQUOTEVAR:OTHERINFOPROMPT-->
        <script language=JavaScript>
        function formfield(fname){		// look through all forms 'till one containing field "fname"
          var df = document.forms;		// simplified version - only return object fname
          var i = df.length - 1;
          for ( var j = 0; j <= i; j++ )
            {
            var k = df[j].length - 1; 
            for ( var l = 0; l <= k; l++ )
              {
              if ( df[j].elements[l].name == (fname) ) 
                {
                return df[j].elements[l];
                }
              }
            }
          alert('Cannot find field ' + fname);  // shouldn't happen...
          return false;
        }  
        
        function merge3(prodref){
          formfield('O_' + prodref).value = 'Email 1: ' + formfield('Email1_' + prodref).value + '  '
        				  + 'Email 2: ' + formfield('Email2_' + prodref).value + '  ' 
        				  + 'Email 3: ' + formfield('Email3_' + prodref).value;
        }
        </script>
        <br>Email 1: <input type=text size=40 name="Email1_NETQUOTEVAR:PRODUCTREFERENCE" onchange="merge3('NETQUOTEVAR:PRODUCTREFERENCE');">
        <br>Email 2: <input type=text size=40 name="Email2_NETQUOTEVAR:PRODUCTREFERENCE" onchange="merge3('NETQUOTEVAR:PRODUCTREFERENCE');">
        <br>Email 3: <input type=text size=40 name="Email3_NETQUOTEVAR:PRODUCTREFERENCE" onchange="merge3('NETQUOTEVAR:PRODUCTREFERENCE');">
        <input type=hidden name="O_NETQUOTEVAR:PRODUCTREFERENCE" value="">
        If you need more error checking, etc then it'll have to be my big patch mentioned above.

        Norman
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          PS. If you want to check the fields before submission and you're using Quantity on Product page without the SIngle Add to Cart
          then you can replace NETQUOTEVAR:ADDTOCARTBUTTON with the following:-

          Code:
          <!-- NETQUOTEVAR:ADDTOCARTBUTTON -->
          <script language=JavaScript>
          function check3mail(prodref){
            if ( (formfield('Email1_' + prodref).value == "")
               ||(formfield('Email2_' + prodref).value == "") 
               ||(formfield('Email3_' + prodref).value == ""))
              {
              alert('You must fill in all 3 Email addresses');
              return false;
              }
            return true;
          }
          </script>
          <INPUT TYPE="IMAGE" SRC="addtocart.gif" NAME="_NETQUOTEVAR:PRODUCTREFERENCE" WIDTH="69" HEIGHT="15" BORDER="0" onclick="return check3mail('NETQUOTEVAR:PRODUCTREFERENCE')">
          Norman

          p.p.s. If you're doing this on lots of products you may want to move all the JavaScript into the HEAD of Act_Primary.html. I.e. Everything between <script...> and </script> inclusive.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks to one and all for your contribution to this

            I'll let my colleague know and get back to you if there are any hitches!

            Jos
            Thanks

            Jos Medinger

            Tel : 01978 843 962
            www.internetology.co.uk
            Actinic / E-Commerce Hosting, Design & SEO
            ______________________________________

            Comment


              #7
              Actinic add to baseline?

              Will look out for the patch... but would be great if Actinic could add it as a baseline feature / upgrade?

              Comment


                #8
                (added to message above)

                ... because I would worry that when Actinic next update their software it would clobber the non-Actinic patch installed??

                Comment

                Working...
                X