Announcement

Collapse
No announcement yet.

Different Shipping address as radio button

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

    Different Shipping address as radio button

    I'm trying to duplicate the shipping question setup used on the TV Wall Brackets site.

    What they have is the shipping question


    Would you like items delivered to a DIFFERENT address to your billing address? O Yes O No

    The page wont continue until you've selected one or the other.

    Is it simple to change this code (from Act_Order01) to the two radio buttons?

    NETQUOTEDEL:INVOICEPROMPT016
    <tr>
    <Actinic:LOCATION TYPE='SEPARATESHIP'>
    <td bgcolor="NETQUOTEVAR:CHECKOUTBG">NETQUOTEVAR:INVOICEPROMPT016</td>
    <td bgcolor="NETQUOTEVAR:CHECKOUTBG" align=LEFT valign=TOP>
    <input type="CHECKBOX" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS name="SEPARATESHIP" value="YES">
    </td>
    </Actinic:LOCATION>
    </tr>

    #2
    Hi Gary

    Please try the following :

    1. In Design | Text, click on Go to at the bottom of the window and type in ID:16 and OK. This should bring up the prompt :
    "If you want to ship the purchase to an address other than the invoice address, check this box:"

    Replace this with your desired text. Apply and OK.

    2. Now go to Advanced | Template Manager | Ordering and click on Location to open Act_LocationSelectTemplate.html

    3. Find the line
    <TD><INPUT TYPE="CHECKBOX" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="YES"></TD>
    Replace this with :

    <TD>
    <!--<INPUT TYPE="CHECKBOX" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="YES">-->
    <INPUT TYPE=RADIO NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="YES" CHECKED="TRUE">Yes

    <INPUT TYPE=RADIO NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="">No
    </TD>
    4. Save file and update site. You should now get a set of radio buttons instead of the default checkbox.

    Hope this helps.
    Krithika Chandrasekar
    SellerDeck

    sigpic

    E-commerce software by SellerDeck

    Comment


      #3
      there seems to be a bug with this code...

      the first time I test it, 'yes' was selected by default, so I just continued without changing it, but on the payment method screen there was no delivery address requested.

      I went back and retested multiple times and from then on it always did what I selected (even where I left it alone).

      But then I deleted the cookies for that site and tried again.

      This time it defaulted to 'no' (for some reason), and it also seemed to remember all the address details so not sure where it is storing that if not in a cookie - but anyway, this time it did ask for a delivery address even though 'no' was selected.

      So it seems like where the customer has no cookie (ie. they have not used your site before) then if they accept the default they may get the opposite of what is intended...

      I would suggest those that have implemented this should delete their cookies for their site and try some tests to see if you get the same results (or maybe it's just me?)

      Should this have a NO in the quotes btw?
      VALUE="">No
      If this is the case it's a pretty important bug!
      John

      Comment


        #4
        I haven't really thought about it or tested it on my own site, other than to say that customers use it, it seems to work, and I haven't had any complaints.

        I saw this thread, thought it was a good idea, pasted it in, and haven't looked back. But I can see now that Krithika's code does seem to have the typo you mentioned, AND is slightly different to mine......

        On my site, neither button is selected when the page opens, and if neither button is selected, a seperate shipping address is not asked for. (AFAIK!)

        My code is: Please select one of the following options:

        <TD ALIGN="RIGHT">
        <FONT SIZE="2">This order is to be shipped to my address:</FONT>
        </TD>
        <TD ALIGN="LEFT">
        <INPUT TYPE=RADIO NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="">
        </TD>
        </TR>
        <TR>
        <TD ALIGN="RIGHT">
        <FONT SIZE="2">This order is to be shipped to a different address:</FONT>
        </TD>
        <TD ALIGN="LEFT">
        <INPUT TYPE=RADIO NETQUOTEVAR:INVOICESEPARATECHECKSTATUS NAME="SEPARATESHIP" VALUE="YES">
        </TD>

        So I suppose I could in fact do without the first line - but then I'd be back to the same as having a checkbox, except it would be a radio button........ so I'll be interested to see your solution, please post when you sort it out!
        Paul
        Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

        Using V10.2 with Norman's brilliantly simple TABBER.

        Comment


          #5
          Originally posted by pfb5
          I'll be interested to see your solution, please post when you sort it out!
          my solution is to stick the with tickbox until someone else sorts it out!

          I actually found the answer to my question, so I'm happy now. I was just pointed at this thread as an alternative to what I was trying to do...
          John

          Comment


            #6
            Hello..

            I have tried this again on my default V7.0.6 and v7.0.7 sites with and without existing cookies. It seems to work fine for me and works according to the choices, i.e, I am prompted for a delivery address if I choose Yes, and not if No.

            Should this have a NO in the quotes btw?
            Quote:
            VALUE="">No
            If I fill in a value of No, in place of the empty "", that's when it brings up the Delivery address page irrespective of what is selected. After I left it blank, it worked OK.

            You could also try another workaround, which I suggested for a V8 customer. This was to leave both the radio buttons unselected, but have a prompt be displayed if customer tries to proceed leaving them so. I have tweaked it for V7 and it worked for me, with several attempts with both Yes and No alternately selected.

            In the Act_LocationSelectTemplate.html, replace the same input lines mentioned in my previous reply with
            <!--<TD><INPUT TYPE="CHECKBOX" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS
            NAME="SEPARATESHIP" VALUE="YES"></TD>-->
            <TD><input type="radio" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS name="SEPARATESHIP" id="C1"
            value="YES" />YES
            <input type="Radio" NETQUOTEVAR:INVOICESEPARATECHECKSTATUS name="SEPARATESHIP" id="C2"
            value="" />NO</TD>
            <script language=JavaScript>
            <!--
            function checkSepShip()
            {
            if ( document.getElementById('C1').checked == false && document.getElementById
            ('C2').checked == false)
            {
            alert('Please select an option');
            return false;
            }
            return true;
            }
            // -->
            </script>
            Save the file and now click on Order Phase 0 on the Template Manager. This will open Act_Order00.html. Find the line :

            <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">

            Replace this with :

            <input type="submit" name="ACTION" value="NETQUOTEVAR:NEXTBUTTON" onclick="return
            checkSepShip()">


            Save the file and update changes to the site. Do let me know how you get on.
            Krithika Chandrasekar
            SellerDeck

            sigpic

            E-commerce software by SellerDeck

            Comment


              #7
              Brilliant, thank you very much!

              (Not that I intended to get embroiled with this change today - was only trying to help someone out!)

              However.......

              If you select <YES> without selecting a Delivery Destination, then click <Next>, after the error message when you return to the page it defaults to <NO> - can that be fixed?

              Also - is it possible for the error message 'Please select an option' to appear in the box at the top, the same as it does if you omit to select a destination?

              Thanks in anticipation.....
              Paul
              Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

              Using V10.2 with Norman's brilliantly simple TABBER.

              Comment


                #8
                Hi Paul

                when you return to the page it defaults to <NO> - can that be fixed?
                I'll check that one out with the development team and keep you informed. Please do bear with me if delay in reply due to the forthcoming holidays.

                However, it will not be possible to make the "Please select an option" prompt appear on top like other Checkout errors. The reason being, the latter are generated from Design|Text after the Perl files validate the content.
                This prompt on the other hand is coming from the JavaScript which is independent.
                Krithika Chandrasekar
                SellerDeck

                sigpic

                E-commerce software by SellerDeck

                Comment


                  #9
                  Thanks anyway!

                  Not too worry, it only happens in what will hopefully be a rare scenario, and the other issue is not at all important.

                  Have a good holiday.
                  Paul
                  Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                  Using V10.2 with Norman's brilliantly simple TABBER.

                  Comment

                  Working...
                  X