Announcement

Collapse
No announcement yet.

State (Location) input box on Delivery Address in checkout

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

    State (Location) input box on Delivery Address in checkout

    Is there a way to bypass the state dropdown box and let the customer enter the delivery state when they fill out the deliver address details? The shipping for our site is not based on location and is figured outside of the Actinic environment, so it's strange to our customers that they would have to select a state, then later on in the process fill in all the delivery address details except for state.

    If you need to see anything:
    www.raprec.com/support.html
    UI/pass: testuser/testuser

    Other tidbits of info:

    - I know that I'm able to comment out the dropdown, but then there is no way to enter the state in the delivery details. Even though I can put an input box for the state, the system wants the value from the dropdown box.

    - I have tried changing the values in the "Design|Text" area (Phase I, ID 7). Selecting "Show" just shows the prompt value (in my case "State:") and does not even show an input box (although I can change that in the code, Actinic still does not plug the value placed there into the order/receipt - rather, it takes the value from the state drop down box).

    - I also have a cookie that's being stored on login that contains the customers state (value comes from a database that has userids and other info). Ultimately, it would be great to bypass the state dropdown AND prefill the state input box, but as I mentioned in the previous bit - Actinic seems to be looking elsewhere for the value.

    - If this can't be done, is there a way that I can at least reference what was selected in the drop down and put that in the state field on the delivery address section?

    Thanks for your help.
    Kristin Amaro.

    #2
    Kristin,

    One way to bypass the selector process is to use simple shipping and simple tax, this however will also remove the 'use separate Delivery Address' checkbox.

    If you want this bit:
    - If this can't be done, is there a way that I can at least reference what was selected in the drop down and put that in the state field on the delivery address section?
    The workaround is the following:

    In the site directory, open Orderscript.pl and find the following part
    in the sub DisplayShipContactPhase:

    (texts that are at the beginning of the lines, should be at the end of the
    previous line.)
    #
    # restore the default values from the table
    #
    $::s_VariableTable{$::VARPREFIX.'DELIVERSALUTATION'} =
    ACTINIC::EncodeText2($::g_ShipContact{'SALUTATION'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERNAME'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'NAME'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERJOBTITLE'} =
    ACTINIC::EncodeText2($::g_ShipContact{'JOBTITLE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOMPANY'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'COMPANY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS1'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS1'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS2'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS2'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS3'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS3'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS4'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS4'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPOSTALCODE'} =
    ACTINIC::EncodeText2($::g_ShipContact{'POSTALCODE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOUNTRY'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'COUNTRY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPHONE'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'PHONE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERFAX'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'FAX'});
    $::s_VariableTable{$::VARPREFIX.'DELIVEREMAIL'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'EMAIL'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERUSERDEFINED'} =
    ACTINIC::EncodeText2($::g_ShipContact{'USERDEFINED'});
    and change it to the following part:
    if (scalar(keys %::g_ShipContact) == 0) # if we don't have
    stored delivery address of the shopper, then copy the invoice details to
    shipping details
    {
    $::s_VariableTable{$::VARPREFIX.'DELIVERSALUTATION'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICESALUTATION'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERNAME'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICENAME'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERJOBTITLE'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEJOBTITLE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOMPANY'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICECOMPANY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS1'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEADDRESS1'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS2'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEADDRESS2'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS3'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEADDRESS3'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS4'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEADDRESS4'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPOSTALCODE'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEPOSTALCODE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOUNTRY'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICECOUNTRY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPHONE'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICEPHONE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERFAX'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICEFAX'});
    $::s_VariableTable{$::VARPREFIX.'DELIVEREMAIL'} -

    = ACTINIC::EncodeText2($::g_InputHash{'INVOICEEMAIL'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERUSERDEFINED'} =
    ACTINIC::EncodeText2($::g_InputHash{'INVOICEUSERDEFINED'});
    }
    else
    {
    #
    # restore the default values from the table
    #
    $::s_VariableTable{$::VARPREFIX.'DELIVERSALUTATION'} =
    ACTINIC::EncodeText2($::g_ShipContact{'SALUTATION'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERNAME'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'NAME'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERJOBTITLE'} =
    ACTINIC::EncodeText2($::g_ShipContact{'JOBTITLE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOMPANY'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'COMPANY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS1'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS1'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS2'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS2'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS3'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS3'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERADDRESS4'} =
    ACTINIC::EncodeText2($::g_ShipContact{'ADDRESS4'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPOSTALCODE'} =
    ACTINIC::EncodeText2($::g_ShipContact{'POSTALCODE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERCOUNTRY'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'COUNTRY'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERPHONE'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'PHONE'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERFAX'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'FAX'});
    $::s_VariableTable{$::VARPREFIX.'DELIVEREMAIL'} -

    = ACTINIC::EncodeText2($::g_ShipContact{'EMAIL'});
    $::s_VariableTable{$::VARPREFIX.'DELIVERUSERDEFINED'} =
    ACTINIC::EncodeText2($::g_ShipContact{'USERDEFINED'});
    }
    Save the file and upload the site.

    (Don't forget to backup the original file, just in case

    Kind regards,
    Bruce King
    SellerDeck

    Comment

    Working...
    X