Page 1 of 1
How to make sure we charge the right shipping
Posted: Fri Feb 29, 2008 12:56 pm
by Will
I noticed when a customer is checking out they can specify whether the ship-to address is a business or residence. If they choose business they are charged less for shipping.
There doesn't seem to be any validation once they've made that choice. So if someone is savvy, they can choose "This is a business" and the storefront charges them the business rate even if it's actually a residential address.
If this happens, UPS will still charge us the residential rate through WorldShip.
How are people handling this problem? Do you just eat the difference?
Is there any way for us to lock down the shipping to residential only?
Or am I misunderstanding something?
Thanks.
Posted: Fri Feb 29, 2008 12:57 pm
by compunerdy
I think you are stuck with that setup. You would probably need custom code to remove the option for them to select business.
Posted: Fri Feb 29, 2008 12:58 pm
by Shopping Cart Admin
Hello Will,
Hard code it to business if it's a big deal as there isn't any way to know or any form of lookup available for this information.
Posted: Fri Feb 29, 2008 1:04 pm
by Will
If we hard-code the checkout process to charge residential rates is there any way to make the shipping estimator in the basket return residential rates as well?
Thanks.
Posted: Fri Feb 29, 2008 1:06 pm
by Shopping Cart Admin
Hello,
not that I could see from my review of the code, but let's see what our developers might say to the other post before we assume anything.
make resident and business dropdown invisable
Posted: Mon Mar 03, 2008 3:40 am
by cerami2
is there a way of making the dropdown not show up on the page
so it is set to resident all the time
Regards
Joe Cerami
Posted: Mon Mar 03, 2008 5:59 am
by jmestep
I commented out this in the conlib/onepagecheckout.ascx:
<!--<tr>
<th class="rowHeader" valign="top">
<asp:Label ID="BillToAddressTypeLabel" runat="server" Text="Type:" AssociatedControlID="BillToAddressType" EnableViewState="false"></asp:Label>
</th>
<td valign="top">
<asp:DropDownList ID="BillToAddressType" runat="server" EnableViewState="false">
<asp:ListItem Text="This is a residence" Value="1" Selected="true"></asp:ListItem>
<asp:ListItem Text="This is a business" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>-->
I had only a test shipping method so it might not work with real methods. I tried changing this also to visible="false", but the row still showed up.
<asp:DropDownList ID="BillToAddressType" runat="server" EnableViewState="false">
You would need to change the code further down the page also if they picked a different shipping address.
You would need to disable the selection in
Members/EditMyAddress.aspx
Posted: Mon Mar 03, 2008 8:58 am
by bobr2k
I tried commenting then deleting two rows from this ascx page
conlib/onepagecheckout.ascx
... the code was not recognized because I had put it in conlib\custom directory. I then tried changing the scriplet to access conlib:custom\onepagecheckout but that didn't work because the page kept failing - wanting related files to be placed in that directory, (basket, etc). Apparently you can't just modify one element and have it picked up from custom directory. I thought the custom conlib technique worked similar to the scriptlet technique. (this ought to stoke Joe's "enlightenment" juices)

Posted: Wed Mar 05, 2008 11:50 pm
by ayilmaz
To make shipping estimator in basket return residential rates,
add this line to ConLib/BasketShippingEstimator.ascx.cs
// CREATE AN ADDRESS INSTANCE TO HOLD ESTIMATE DESTINATION
Address estimateAddress = new Address();
bool isCA = Regex.Match(safePostalCode, "^[A-Z][0-9][A-Z][0-9][A-Z][0-9]$").Success;
estimateAddress.CountryCode = isCA ? "CA" : "US";
estimateAddress.PostalCode = safePostalCode;
->>> Line added
estimateAddress.Residence = true;
This basically sets the address to residential.
Will wrote:If we hard-code the checkout process to charge residential rates is there any way to make the shipping estimator in the basket return residential rates as well?
Thanks.
thank you that works but how do you change the checkout
Posted: Thu Mar 06, 2008 6:15 am
by cerami2
there is two dropdown on the checkout is there a way of having the type: save the type but have it push the same rats as the resident
Thanks
Joe
Posted: Thu Mar 06, 2008 7:12 am
by jmestep
I set up a test payment method and the orders go thru OK with the section that I posted earlier commented out and ta similar section under the shipping address> I had to comment out the whole section, not just the select box
Code: Select all
<!--<tr>
<th class="rowHeader" valign="top">
<asp:Label ID="ShipToAddressTypeLabel" runat="server" Text="Type:" AssociatedControlID="ShipToAddressType" EnableViewState="false"></asp:Label>
</th>
<td valign="top">
<asp:DropDownList ID="ShipToAddressType" runat="server" EnableViewState="false">
<asp:ListItem Text="This is a residence" Value="1" Selected="true"></asp:ListItem>
<asp:ListItem Text="This is a business" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>-->