Business and Residential flags
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Business and Residential flags
It seems like a few different things depend on whether an address is set as business or residential. When an address is residential, the system charges a different rate on checkout for shipping. We have already made it so that the same rate is applied to the customer whether they select business or residential(the value gets set to 1 in either selection on checkout). The problem now is that when the orders get pulled up on our shipper, some have flags for residential and some have flags for business. If someone doesnt uncheck the Residential box, we get charged more. How can we set these flags to make it be residential in our system, but have our shipper think it is business.
Re: Business and Residential flags
Hi William,
I can tell you how we approach this problem which may not be the most eloquent solution, but it does work for us. We charge everyone at residential rate, but when we ship, we ship everything as if it was a business address. Then when UPS delivers a package at a residential address they will mark it as residential and then UPS will do an adjustment on the next week's bill for the residential fee.
We basically let UPS make the decision whether the address is business or residential. I know this puts a great amount of faith in UPS, but our studies have shown they are pretty good about getting it right. In addition, UPS has a pretty narrow definition on what a commercial address constitutes For example home offices are not commercial.
We are using Worldship so it is easy for us to use this methodology.
I can tell you how we approach this problem which may not be the most eloquent solution, but it does work for us. We charge everyone at residential rate, but when we ship, we ship everything as if it was a business address. Then when UPS delivers a package at a residential address they will mark it as residential and then UPS will do an adjustment on the next week's bill for the residential fee.
We basically let UPS make the decision whether the address is business or residential. I know this puts a great amount of faith in UPS, but our studies have shown they are pretty good about getting it right. In addition, UPS has a pretty narrow definition on what a commercial address constitutes For example home offices are not commercial.
We are using Worldship so it is easy for us to use this methodology.
Able Customer Since 1999 Currently Running on GOLD R12 SR1 and PCI Certified.
-
- Commodore (COMO)
- Posts: 433
- Joined: Wed May 28, 2008 9:42 am
- Location: Concord, NC
- Contact:
Re: Business and Residential flags
Calvis that is right on the money.
Our issue is we use Shipper 3(great program btw) and it passes the flag to Shiprush(like worldship).
I want Able to NOT pass the flag over.
Our issue is we use Shipper 3(great program btw) and it passes the flag to Shiprush(like worldship).
I want Able to NOT pass the flag over.
Re: Business and Residential flags
Here's one way of forcing every address to business. This assumes you are using ConLib/OnePageCheckout.ascx.
1. Copy ConLib/EditMyAddressPage.ascx and EditMyAddressPage.ascx.cs to ConLib/Custom/.
2. After line 49 in Custom/EditMyAddressPage.ascx.cs, insert the code shown (the part between the comments),
3. After line 141 in Custom/EditMyAddressPage.ascx.cs, insert the code shown,
4. In line 111 of Custom/EditMyAddressPage.ascx, add Visible="false" as shown:
5. In line 114 of Custom/EditMyAddressPage.ascx, add Visible="false" as shown:
6. Using Manage Content and Layout (Scriptlets), change the "Edit My Address Page" scriptlet to use [[ConLib:Custom/EditMyAddressPage]].
7. Copy ConLib/OnePageCheckout.ascx and OnePageCheckout.ascx.cs to ConLib/Custom/.
8. Insert the following code after line 1240 in Custom/OnePageCheckout.ascx.cs,
9. Insert the following code after line 1272 in Custom/OnePageCheckout.ascx.cs,
10. Add runat="server" visible="false" to line 143 in Custom/OnePageCheckout.ascx as shown,
*Note that this table row surrounds the BillToAddressType fields.
11. Add runat="server" visible="false" to line 310 in Custom/OnePageCheckout.ascx as shown,
*Note that this table row surrounds the ShipToAddressType fields.
1. Copy ConLib/EditMyAddressPage.ascx and EditMyAddressPage.ascx.cs to ConLib/Custom/.
2. After line 49 in Custom/EditMyAddressPage.ascx.cs, insert the code shown (the part between the comments),
Code: Select all
_Address.Residence = true;
//AFM Default is business
_Address.Residence = false;
//AFM End
Code: Select all
address.Residence = (Residence.SelectedIndex == 0);
//AFM Force business address
address.Residence = false;
//AFM End
Code: Select all
<asp:Label ID="ResidenceLabel" runat="server" Text="Type:" AssociatedControlID="Residence" EnableViewState="false" Visible="false"></asp:Label>
Code: Select all
<asp:DropDownList ID="Residence" runat="server" EnableViewState="false" Visible="false">
7. Copy ConLib/OnePageCheckout.ascx and OnePageCheckout.ascx.cs to ConLib/Custom/.
8. Insert the following code after line 1240 in Custom/OnePageCheckout.ascx.cs,
Code: Select all
billingAddress.Residence = (BillToAddressType.SelectedIndex == 0);
//AFM Force business address type
billingAddress.Residence = false;
//AFM End
Code: Select all
shippingAddress.Residence = (AlwaysConvert.ToInt(ShipToAddressType.SelectedValue) == 1);
//AFM Force business address type
shippingAddress.Residence = false;
//AFM End
Code: Select all
<tr runat="server" visible="false">
11. Add runat="server" visible="false" to line 310 in Custom/OnePageCheckout.ascx as shown,
Code: Select all
<tr runat="server" visible="false">
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Re: Business and Residential flags
Thank you for your help, but for whatever reason, this didnt work.
I heard that you wrote shipper, so im sure you can help.
Could you tell me what value from ABLE that shipper uses to determine whether or not to set the residential checkbox.
Basically we want everyone to be treated as residential on the site, and everyone to be treated as business on shipper.
If there is no static way to do it, the value could even just "become" residential for a second during checkout until they get charged and the order sent on to shipper, and then switched back to whatever.
Hopefully this makes sense.
I heard that you wrote shipper, so im sure you can help.
Could you tell me what value from ABLE that shipper uses to determine whether or not to set the residential checkbox.
Basically we want everyone to be treated as residential on the site, and everyone to be treated as business on shipper.
If there is no static way to do it, the value could even just "become" residential for a second during checkout until they get charged and the order sent on to shipper, and then switched back to whatever.
Hopefully this makes sense.
Re: Business and Residential flags
The changes I made only affect new orders, and they only work if you use the OnePageCheckout.ascx checkout from AC. Even then, the changes treat every address as a business address throughout the life of the basket/order.
If the changes are not affecting new orders, then you are probably using a different checkout control than the one you modified.
To treat every address as a residence (for shipping cost calculation), you could use true instead of false everywhere I wrote Residense = false (i.e. you would write Residence = true).
To change the address to business after the order is placed, you could make the change in the payment controls (that is where the order is created after payment is made). I have not looked for this specifically, but I would look for the order save and insert some lines immediately before that change the shipping address residence flag to false.
If the changes are not affecting new orders, then you are probably using a different checkout control than the one you modified.
To treat every address as a residence (for shipping cost calculation), you could use true instead of false everywhere I wrote Residense = false (i.e. you would write Residence = true).
To change the address to business after the order is placed, you could make the change in the payment controls (that is where the order is created after payment is made). I have not looked for this specifically, but I would look for the order save and insert some lines immediately before that change the shipping address residence flag to false.
Re: Business and Residential flags
Okay, unfortunately, this busy Christmas shopping season taught me that I can no longer trust in the "honor system" in regards to letting the customers select whether they are Business or Residential.
The lower commercial rates were coming through consistantly. It must be too easy for them to try each one and notice the cheaper shipping when selecting commercial. The first thing I did was add the Address Type to the email confirmation under the Shipping Method. Then I started getting emails from customers saying, "ohhhh, could you please change this from commercial to residential?" (busted) but that doesn't deter anyone from selecting the proper type because they don't see that until the checkout process is complete and they read their confirmation email.
I have decided for 2009 I want to charge every customer as a Residential address. It's okay if the option to select Residential or Business still stays in the OnePageCheckout but I just want it to charge residential rates regardless of which one they select...
So, could I just follow Andy's instructions above
Thank you.
The lower commercial rates were coming through consistantly. It must be too easy for them to try each one and notice the cheaper shipping when selecting commercial. The first thing I did was add the Address Type to the email confirmation under the Shipping Method. Then I started getting emails from customers saying, "ohhhh, could you please change this from commercial to residential?" (busted) but that doesn't deter anyone from selecting the proper type because they don't see that until the checkout process is complete and they read their confirmation email.
I have decided for 2009 I want to charge every customer as a Residential address. It's okay if the option to select Residential or Business still stays in the OnePageCheckout but I just want it to charge residential rates regardless of which one they select...
So, could I just follow Andy's instructions above
to accomplish this?To treat every address as a residence (for shipping cost calculation), you could use true instead of false everywhere I wrote Residense = false (i.e. you would write Residence = true).
Thank you.
AC 7.0.3 build 13937
Re: Business and Residential flags
You can try the Andy's code by using Residence = true
- compunerdy
- Admiral (ADM)
- Posts: 1283
- Joined: Sun Nov 18, 2007 3:55 pm
Re: Business and Residential flags
I want to see a option to turn off business rates period..one little click of the mouse. How many people have made threads about this now..lets get it fixed once and for all
Re: Business and Residential flags
I agree there needs to be an easy 'switch' to take care of this because of the rampant abuse. I do remember the days when U)nited P)arcel S)urcharge did not have a residential fee then there would be no worries. Customer are sly and they are trying to get the best deal. (I can't blame them in this economy). It would be nice if the cart would have this built in.compunerdy wrote:I want to see a option to turn off business rates period..one little click of the mouse. How many people have made threads about this now..lets get it fixed once and for all
draneb:
In addition to making it where new customers are not able to select commercial. You also need to change the abusers back to residential as well. Also you need to make sure that it can not be abused via multiple addresses as well. I had one customer that was able to get his cheaper commercial rates by using the multiple address page. So you need to cover all angles.
Giving you all this advice might make me sound anti-consumer which I am not, but rather I am more anti-UPS. I wish my business was able to raise rates the first of the every year. Pass along costs immediately. ie fuel surcharge. UPS uses a surcharge fee based model because your UPS discounts are not applicable to surcharges - just on base shipping fee. I have never been able to negotiate a discount on surcharges. Its a very clever way of doing business especially when surcharges can equate to a huge percentage of the total shipping charge. From now remember that UPS - United Parcel Surcharge.
Able Customer Since 1999 Currently Running on GOLD R12 SR1 and PCI Certified.
-
- Commodore (COMO)
- Posts: 433
- Joined: Wed May 28, 2008 9:42 am
- Location: Concord, NC
- Contact:
Re: Business and Residential flags
Having the same issues. Google Checkout will hand our Commercial rates also.calvis wrote:I agree there needs to be an easy 'switch' to take care of this because of the rampant abuse. I do remember the days when U)nited P)arcel S)urcharge did not have a residential fee then there would be no worries. Customer are sly and they are trying to get the best deal. (I can't blame them in this economy). It would be nice if the cart would have this built in.compunerdy wrote:I want to see a option to turn off business rates period..one little click of the mouse. How many people have made threads about this now..lets get it fixed once and for all
draneb:
In addition to making it where new customers are not able to select commercial. You also need to change the abusers back to residential as well. Also you need to make sure that it can not be abused via multiple addresses as well. I had one customer that was able to get his cheaper commercial rates by using the multiple address page. So you need to cover all angles.
Giving you all this advice might make me sound anti-consumer which I am not, but rather I am more anti-UPS. I wish my business was able to raise rates the first of the every year. Pass along costs immediately. ie fuel surcharge. UPS uses a surcharge fee based model because your UPS discounts are not applicable to surcharges - just on base shipping fee. I have never been able to negotiate a discount on surcharges. Its a very clever way of doing business especially when surcharges can equate to a huge percentage of the total shipping charge. From now remember that UPS - United Parcel Surcharge.
Need a switch to control all of these.
Re: Business and Residential flags
You can create a store setting for this purpose. Here is the modified store settings file with an extra checkbox setting. Unzip the attachment and place the StoreSettings.aspx file in your Website\Admin\Store directory. Then edit your Website\App_Code\PageHelper.cs file and add following method to it.I want to see a option to turn off business rates period..one little click of the mouse. How many people have made threads about this now..lets get it fixed once and for all
Code: Select all
public static bool GetUseResidentialAddressValue()
{
string value = Token.Instance.Store.Settings.GetValueByKey("UseResidentialAddress");
if (!String.IsNullOrEmpty(value))
{
bool result = AlwaysConvert.ToBool(value, false);
return result;
}
return false;
}
Code: Select all
_Address.Residence = true;
Code: Select all
_Address.Residence = PageHelper.GetUseResidentialAddressValue();
Re: Business and Residential flags
Mazhar to the rescue
Would we still be able to keep the drop down list for the customer to select Business or Residential on the onepagecheckout? It looks like Andy's method above hides all of that. I'll take whatever I can get but ideally I would like to keep the look the same and still let the customer choose Commercial or Residential (for UPS labeling purposes) but just have it charge Residential regardless of which one they choose.
If this is possible could you tell me what to edit?
Thanks a million!
Would we still be able to keep the drop down list for the customer to select Business or Residential on the onepagecheckout? It looks like Andy's method above hides all of that. I'll take whatever I can get but ideally I would like to keep the look the same and still let the customer choose Commercial or Residential (for UPS labeling purposes) but just have it charge Residential regardless of which one they choose.
If this is possible could you tell me what to edit?
Thanks a million!
AC 7.0.3 build 13937
- compunerdy
- Admiral (ADM)
- Posts: 1283
- Joined: Sun Nov 18, 2007 3:55 pm
Re: Business and Residential flags
Do all the coding minus the visable=false changes
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Re: Business and Residential flags
Where do I need to change this specifically to make your code work?_Address.Residence = PageHelper.GetUseResidentialAddressValue();
The previous comment was a little unclear:
This doesnt seem quite right.
Also, wouldnt you need a modification for onepagecheckout since they can choose address type there as well?_Address.Residence = true;
//AFM Default is business
_Address.Residence = false;
//AFM End
Re: Business and Residential flags
All I posted is to help you provide a setting that can be used to flag wheather to use residential address or not instead of hard coding it. For example if some wants to use the residential address then he will change the code
and if some one don't want to use it then he will made the code to look like
So instead of hard coding this I created a setting in the above post so that merchant can enable/disable the residential address just through mouse click instead of changing the code in file. As the below code
So you have to made the other changes if you have some where else or as mentioned by the Andy's post. My code just makes the ResidentialAddress = true or ResidentialAddress = false part dynamic.
Code: Select all
_Address.ResidentialAddress = true;
Code: Select all
_Address.ResidentialAddress = false;
Code: Select all
_Address.Residence = PageHelper.GetUseResidentialAddressValue();
-
- Commander (CMDR)
- Posts: 121
- Joined: Wed Dec 17, 2008 9:13 am
Re: Business and Residential flags
Hi Mazhar,
The customization by adding shipping setting, Is it possible for us to do, or do we need to get a control from you according to our requirements.
How are we gonna be able to add new columsn to the database?
Thanks,
Carol
The customization by adding shipping setting, Is it possible for us to do, or do we need to get a control from you according to our requirements.
How are we gonna be able to add new columsn to the database?
Thanks,
Carol
Re: Business and Residential flags
I didn't get your point. Please explain the question in detail. regarding
If you want to add a store wide setting then you can create a store setting for it. As I created in the above posted code. Also read the following thread as well
viewtopic.php?f=42&t=9427
If you want to create something that could be linked to order or can have more then one occurring for example some shipping information for each order then you can use ac_CustomFields table
viewtopic.php?f=42&t=8684
How are we gonna be able to add new columsn to the database?
If you want to add a store wide setting then you can create a store setting for it. As I created in the above posted code. Also read the following thread as well
viewtopic.php?f=42&t=9427
If you want to create something that could be linked to order or can have more then one occurring for example some shipping information for each order then you can use ac_CustomFields table
viewtopic.php?f=42&t=8684
Re: Business and Residential flags
Ideally we would have some system to check the address to see. But that's just wishfully thinking.
I have some wholesale customers who are part of a user group. Some of these customers are commercial addresses. What i guess would be best, is have it so the user can not control there address setting at any part. With these wholesale customers i would manually go to the admin and change there setting, and have it save it for there account. This way they are quoted correctly.
Regular customers shipping to a business address i would not worry about my self.
I have some wholesale customers who are part of a user group. Some of these customers are commercial addresses. What i guess would be best, is have it so the user can not control there address setting at any part. With these wholesale customers i would manually go to the admin and change there setting, and have it save it for there account. This way they are quoted correctly.
Regular customers shipping to a business address i would not worry about my self.
Re: Business and Residential flags
If you want to keep the address flag setting at user level then you will have to save this information in user settings. For example the code will be very similar to the above posted code for store settings. You will need this code on Admin/People/Users/EditUser.aspx so that you can enable/disable it at user level and instead of store settings you will make use of User.Settings.SetValueByKey() and User.Settings.GetValueByKey() methods.With these wholesale customers i would manually go to the admin and change there setting, and have it save it for there account. This way they are quoted correctly.
-
- Commander (CMDR)
- Posts: 121
- Joined: Wed Dec 17, 2008 9:13 am
Re: Business and Residential flags
In Able Commerce, when a product template is created we add some fields like textbox and value,list box and values etc.
My requirement is we have product distribution types(online,download,online 30 days usage etc)
When a product template for a product like "practice test" is created , we have give available product distribution types from the
above lookup values,instead of giving the ability to add other distribution types.
So I thought of creating a store wide setting "product distribution types=<listbox>{"online,download,online 30 days usage"}
and pull that into Editproducttemplate.aspx by default
Am I following the right method to do it?
Anymore suggestions, please let me know.
Thanks
Carol
My requirement is we have product distribution types(online,download,online 30 days usage etc)
When a product template for a product like "practice test" is created , we have give available product distribution types from the
above lookup values,instead of giving the ability to add other distribution types.
So I thought of creating a store wide setting "product distribution types=<listbox>{"online,download,online 30 days usage"}
and pull that into Editproducttemplate.aspx by default
Am I following the right method to do it?
Anymore suggestions, please let me know.
Thanks
Carol
Re: Business and Residential flags
warmoth.com has used the UPS XML address validation on there site.
see this poll
viewtopic.php?f=45&t=9430
I have registered for a key to the XML api
see this poll
viewtopic.php?f=45&t=9430
I have registered for a key to the XML api
-
- Ensign (ENS)
- Posts: 19
- Joined: Thu Oct 29, 2009 5:34 am
Re: Business and Residential flags
I'm on 7.0.3. and none of these files work. It appears the code has changed.
Is there an update out there? I need to have one standard set of shipping options for my customers.
Is there an update out there? I need to have one standard set of shipping options for my customers.
-
- Ensign (ENS)
- Posts: 19
- Joined: Thu Oct 29, 2009 5:34 am
Re: Business and Residential flags
No one looking to tackle this one?
Wish there was a simple way out of the box.
Wish there was a simple way out of the box.
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Re: Business and Residential flags
Is there anyway to remove commercial as an option all together and have all rates returned be residential rates?