cancel
Showing results for 
Search instead for 
Did you mean: 

Additional funfionality on shipping page

Former Member
0 Kudos

Hi,

We need to add two new fields to store additional information in own user table, but I have a problem to add my code do continue button to save this information. Do you have any idea how to do this in WT 6.0 ?

Thanks for help

Greg.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shane thanks for help.

we try to add notes field on Shipping.aspx page. We want to give opportunity to put some additional information about delivery. I added notes (aspx:text field). ?But now i have problem to catch event that button has been pressed. Please advice how i can do this.

My idea was create new button and hide yours, next create onClick function which will do my part of code and next call your onclick function but please advice how.

And second question, we have made a lot of customization on our page. Now I would like to update to latest path, where i can find list of files which has been change. It's quite difficult to analyze changes in all.

Greg.

Former Member
0 Kudos

Hi Greg,

You will need to add a new button and make the existing button invisible.

If you are not using the Notes field in OrderMaster, you could use that and avoid having to deal with UDFs and synch issues. If you are going to use a new field, you will need to create a synch plugin to synch the data to B1.

Here is the code for the event--use this for your new button and add your custom code:


protected void lnkNext_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Page.Validate();
            imgPhoneWarning.Visible = false;
            bool noAddress = !rblShippingAddress.Visible;
            List<NPError> theErrors = new List<NPError>();
            int addID = AddAddress.Save(theErrors);

            if (addID > 0)
            {
                _order.SetAllDetailShipAddress(addID);
                if (dtRequestedShipDate.SelectedDate != DateTime.MinValue && dtRequestedShipDate.SelectedDate <= DateTime.Now)
                {
                    imgRequestedShipDate.Visible = true;
                }
                else
                {
                    imgRequestedShipDate.Visible = false;
                    _order.RequestedShipDate = dtRequestedShipDate.SelectedDate;
                }
                _order.Calculate();                
            }

            if (!DisplayErrors(theErrors))
            {
                Save(addID);
            }
        }

Former Member
0 Kudos

Hi Shane

Thanks for replay

I have tried use this code but i think that save method is protected also, so I'm not able to use it. Is there is any possibility to change this method from protected to private so we will be able to use it. Or maybe you have some workaround for this problem ?

Greg.

Former Member
0 Kudos

Bummer.

Replace the save() with this:


if (txtDayPhone.Text == "")
            {
                imgPhoneWarning.Visible = true;
                return;
            }
            if (dtRequestedShipDate.SelectedDate != DateTime.MinValue && dtRequestedShipDate.SelectedDate <= DateTime.Now)
            {
                imgRequestedShipDate.Visible = true;
                return;
            }
            else
            {
                imgRequestedShipDate.Visible = false;
                _order.RequestedShipDate = dtRequestedShipDate.SelectedDate;
            }
            _order.Calculate();

if (addid > 0){
  Response.Redirect("billing.aspx", true);
}

As long as you are not using webflow on this page, this should be all you need.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Greg,

First, when adding custom data to Webtools, I would suggest always using a table that joins to the pertinent WT table. We do not do anything to make sure your schema stays in tact during upgrades, so it is best not to modify the distributed tables.

If the data you need to add is system data and does not require user input, you can use a webflow to redirect to a page to do your processing.

If you are adding controls for user input, you will need to make the current continue button invisible and add your own continue to the shipping page. You will need to make sure you handle all of the current processing if you do this. I can give you more information on this if this is your problem.