Announcement

Collapse
No announcement yet.

change size of 'Other Info' box

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

    change size of 'Other Info' box

    Is it possible to change the size of the data entry box which appears when Other Info is requested for a product?

    By default the box has a size of sixty which is fine for some of my products but I'd like to make the box smaller when all I need is for the customer to type in two characters.

    Penny

    #2
    If you want to globally change this then you can go to Design | Design Text - Text ID 2173 and change the max length to a fixed value.

    If you want to have different ones then you will need to create another Act_ProductLine template and add your own created NQV variable and change the template to use that instead of NETQUOTEVAR:OTHERINFOPROMPT. Then select the different template as desired.

    Comment


      #3
      I've been trying to find out what the NETQUOTEVAR:OTHERINFOPROMPT looks like so I can devise a customvar to use in a new template. Is it just the html which gets plugged in when the page is generated?

      Thanks

      Comment


        #4
        Yes - it gets replaced by the Text ID that I mentioned - except the '%d's etc are replaced with specfics. SO you may copy the format of the Text ID for your own NQV.

        Edit - Please see Norman's answer below - It seems I may have been leading you up slightly the wrong path - sorry for any confusion.

        Comment


          #5
          The prompt is ID 2161 and reads

          %s<INPUT TYPE=text NAME="%s" SIZE="%d" MAXLENGTH="%d" VALUE="%s" %s>

          Change this as follows

          %s<INPUT TYPE=text NAME="%s" SIZE="10" dummy="%d" MAXLENGTH="%d" VALUE="%s" %s>

          Change the "10" as required.

          We need that dummy entry so that variable assignment doesn't go out of sequence.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thank you for the input, I've tried implementing your thoughts in a couple of ways:

            I created a customvariable called SMALLOTHERINFOPROMPT then amended the productline template to refer to it. Then I pasted the suggested text

            %s<INPUT TYPE=text NAME="%s" SIZE="10" dummy="%d" MAXLENGTH="%d" VALUE="%s" %s>

            into a text file using notepad, put that filename in as the value of the customvariable for my product and ticked the 'use file contents box'

            The result was a smaller data entry box but it had %s in the box and next to it as the prompt rather than 'type your initials here'

            Then I tried just putting the suggested text directly into the template instead of using a custom variable. The result was exactly the same.

            This happened with and without the dummy variable.

            Am I missing something here? should I expect the prompt to be picked up automatically or should I be replacing one of the variables with the actual value?

            Comment


              #7
              This is tricky. You cannot use NETQUOTEVAR's within the Design / Text entries and you cannot use Design / Text entries in Templates.

              And if you use Duplicate products it's not easy to generate your own custom Other Info prompt.

              If you don't use Duplicates you can copy your Product Template to a new file, then edit that new Template and replace

              NETQUOTEVAR:OTHERINFOPROMPT

              with
              Code:
              Your prompt<input type="text" name="O_NETQUOTEVAR:PRODUCTREFERENCE" size="2" maxlength="2">
              You then use this Template only for the 2 char products.

              You can also now use CUSTOMVAR's for the size and maxlength.

              Or create additional Templates for other character lengths.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                You could try Norms multi other info patch that may help

                Comment


                  #9
                  Thank you everyone for all your help.

                  I used the template idea in the end and it works. In some ways it's less complex than fiddling around with customvars but it does mean creating a new template for each product (and, presumeably each copy of each product).

                  By looking at the page source when previewing the page using the standard template, I was able to pick out the bit which needed pasting into the new template then adjust it as per your suggestions.

                  Fortunately there are only a couple of products I need to do this to.

                  Thanks again,
                  Penny
                  www.lavenderlifestyles.co.uk

                  Comment


                    #10
                    You don't need a Template per product if you use my suggestion #7 above and you don't use duplicates.

                    Make a Template for a 2 char input, and if required a 3 or whatever.

                    From then on you use the appropriate Template for whatever products needs them.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      Here's exactly what you need:

                      A customisable Other Info Prompt that will work on normal and duplicate products.

                      Make Custom Properties TEXTSIZE and MAXLENGTH which you can use to define the required visible size and max characters allowed.

                      Make a copy of your Product Template.

                      In that copy replace NETQUOTEVAR:OTHERINFOPROMPT with
                      Code:
                      <script type="text/javascript">
                      <!--
                       var ref = unescape(('NETQUOTEVAR:PRODUCTANCHOR'.substring(1)).replace(/_/g,'%'));
                       document.write('<input type="text" size="CUSTOMVAR:TEXTSIZE" maxlength="CUSTOMVAR:MAXLENGTH" name="O_' + ref + '"/>');
                      //-->
                      </script>
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Thank you very much indeed Norman, this works much better than having separate templates for each product and copy of product! You can see this working in my bedlinen department:

                        http://www.lavenderlifestyles.co.uk/...Bed_Linen.html

                        the monogrammed bedlinen has a data entry box of size 2 whereas the banners and advertsing have the full sized data entry boxes:

                        http://www.lavenderlifestyles.co.uk/...e_with_Us.html

                        Penny
                        www.lavenderlifestyles.co.uk

                        Comment

                        Working...
                        X