Pick Your Ship Date
Pick Your Ship Date
Hello!
I'm attempting to add the [[ConLib:Utility\PickerAndCalendar]] on my checkout page so that Customers can pick their desired ship date. Where would I want to put the utility for this to work?
Thanks!
I'm attempting to add the [[ConLib:Utility\PickerAndCalendar]] on my checkout page so that Customers can pick their desired ship date. Where would I want to put the utility for this to work?
Thanks!
Re: Pick Your Ship Date
Why don't you simply turn on the delivery instructions to capture this sort of information. you can put a note that customers need to put their preferred ship date in instructions.
Re: Pick Your Ship Date
That could work too... how do I turn that on?
I just thought that was what the PickerAndCalendar was for.
Thanks
I just thought that was what the PickerAndCalendar was for.
Thanks
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Pick Your Ship Date
If you are using the one page checkout, you would probably want to put it in the same section where they select the shipping method to get around the show/hide panel code. To save the selection, you might have to do that in the checked out event - that is the first time that the final orderid is available. I usually save it to another table (like user settings), then move it to the final resting place in the checked out event or the receipt page. That way if the user is migrated from anonymous, the data follows them thru the migration.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Pick Your Ship Date
Log in to merchant side of your store and then go to Administration > Website > Content and Layout. Edit Checkout Page scriptlet and then update its contents fromjessthib wrote:That could work too... how do I turn that on?
I just thought that was what the PickerAndCalendar was for.
Thanks
Code: Select all
[[ConLib:OnePageCheckout]]
Code: Select all
[[ConLib:OnePageCheckout EnableShipMessage="true"]]
-
- Lieutenant (LT)
- Posts: 77
- Joined: Mon Apr 19, 2010 4:52 pm
Re: Pick Your Ship Date
Mazhar,
Any easy way to make the Delivery Instructions mandatory when a specific "ship method" is selected?
We have a "customer pays" method that our customers can use to put in their own FedEx, UPS, etc. accounts for us to charge. Below that we have enabled the "Delivery Instructions?" box for them to use to enter such information. If someone selects the "customer pays" ship method, then I want to validate that there is at least something (not null field) in the box.
Any easy way to make the Delivery Instructions mandatory when a specific "ship method" is selected?
We have a "customer pays" method that our customers can use to put in their own FedEx, UPS, etc. accounts for us to charge. Below that we have enabled the "Delivery Instructions?" box for them to use to enter such information. If someone selects the "customer pays" ship method, then I want to validate that there is at least something (not null field) in the box.
Re: Pick Your Ship Date
This could be accomplished by doing something like this. Edit you ConLib/OnePageCheckout.ascx.cs file and locate following code block in RecalculateBasket methodThistle3408 wrote:Mazhar,
Any easy way to make the Delivery Instructions mandatory when a specific "ship method" is selected?
We have a "customer pays" method that our customers can use to put in their own FedEx, UPS, etc. accounts for us to charge. Below that we have enabled the "Delivery Instructions?" box for them to use to enter such information. If someone selects the "customer pays" ship method, then I want to validate that there is at least something (not null field) in the box.
Code: Select all
if (ShipMethodList != null)
{
shipment.ShipMethodId = AlwaysConvert.ToInt(ShipMethodList.SelectedValue);
}
and then replace it with
Code: Select all
if (ShipMethodList != null)
{
shipment.ShipMethodId = AlwaysConvert.ToInt(ShipMethodList.SelectedValue);
if (EnableShipMessage)
{
ShipMethod shipMethod = ShipMethodDataSource.Load(shipment.ShipMethodId);
if (shipMethod != null && shipMethod.Name.ToLower().Contains("customer pays"))
{
PlaceHolder shipMessagePanel = (PlaceHolder)item.FindControl("ShipMessagePanel");
RequiredFieldValidator rfv = new RequiredFieldValidator();
rfv.ErrorMessage = "Delivery Instructions are required";
rfv.Text = "*";
rfv.ControlToValidate = "ShipMessage";
rfv.ValidationGroup = "OPC";
shipMessagePanel.Controls.Add(rfv);
}
}
}
-
- Lieutenant (LT)
- Posts: 77
- Joined: Mon Apr 19, 2010 4:52 pm
Re: Pick Your Ship Date
Got an error...
It said a ";" was missing, but I don't see any problems.
Let me look later when I have a little more time
It said a ";" was missing, but I don't see any problems.
Let me look later when I have a little more time
Re: Pick Your Ship Date
What line number for error?
Re: Pick Your Ship Date
Make sure when replacing the code you replaced the exact block that I mentioned. Nothing more or less. This could be due to a bad replace where you may replaced the else part of if.
-
- Lieutenant (LT)
- Posts: 77
- Joined: Mon Apr 19, 2010 4:52 pm
Re: Pick Your Ship Date
Double checked that and the pairing up of brackets to make sure I didn't delete on or should have deleted one.
Like I said, I'll take a look (when it's not likely customers may be looking) which mean probably Sunday morning.
Like I said, I'll take a look (when it's not likely customers may be looking) which mean probably Sunday morning.
-
- Lieutenant (LT)
- Posts: 77
- Joined: Mon Apr 19, 2010 4:52 pm
Re: Pick Your Ship Date
Redoing the edit got rid of the error, so I must have hit something I shouldn't have.
But the desired result is not happening.
To start with the Scriptlet 'Checkout Page has the EnableShipMessage on....
Here's the code in the recalculate right now:
But the desired result is not happening.
To start with the Scriptlet 'Checkout Page has the EnableShipMessage on....
Code: Select all
[[ConLib:OnePageCheckout EnableShipMessage="true"]]
Code: Select all
private void RecalculateBasket(bool rebindPaymentForms)
{
Basket basket = Token.Instance.User.Basket;
UpdateShippingAddress(basket, GetShippingAddress());
//UPDATE SHIPPING RATES
if (trShowRates.Visible)
{
int shipmentIndex = 0;
foreach (RepeaterItem item in ShipmentList.Items)
{
BasketShipment shipment = basket.Shipments[shipmentIndex];
DropDownList ShipMethodList = (DropDownList)item.FindControl("ShipMethodList");
// if (ShipMethodList != null)
// {
// shipment.ShipMethodId = AlwaysConvert.ToInt(ShipMethodList.SelectedValue);
// }
//new
if (ShipMethodList != null)
{
shipment.ShipMethodId = AlwaysConvert.ToInt(ShipMethodList.SelectedValue);
if (EnableShipMessage)
{
ShipMethod shipMethod = ShipMethodDataSource.Load(shipment.ShipMethodId);
if (shipMethod != null && shipMethod.Name.ToLower().Contains("customer pays"))
{
PlaceHolder shipMessagePanel = (PlaceHolder)item.FindControl("ShipMessagePanel");
RequiredFieldValidator rfv = new RequiredFieldValidator();
rfv.ErrorMessage = "Delivery Instructions are required";
rfv.Text = "*";
rfv.ControlToValidate = "ShipMessage";
rfv.ValidationGroup = "OPC";
shipMessagePanel.Controls.Add(rfv);
}
}
}
//old again
else
{
shipment.ShipMethodId = 0;
}
shipment.Save();
shipmentIndex++;
}
}
//RECALCULATE SHIPPING, TAXES, DISCOUNTS, ETC.
basket.Recalculate();
_CurrentBasketHash = basket.GetContentHash(OrderItemType.Product);
if (rebindPaymentForms) BindPaymentMethodForms();
}
Re: Pick Your Ship Date
The changes you posted above seems to be right. So keep these changes and make one more change in your ConLib/OnePageCheckout.ascx.cs file. locate following code block in your code
and then update it to
Save it and repeat the test.
Code: Select all
//bind the payments
BindPaymentMethodForms();
Code: Select all
//bind the payments
RecalculateBasket(true);
-
- Lieutenant (LT)
- Posts: 77
- Joined: Mon Apr 19, 2010 4:52 pm
Re: Pick Your Ship Date
That did it.
Thx
Thx