• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Ryan Groene
#21 Posted : Tuesday, January 20, 2015 3:20:24 PM(UTC)
Ryan Groene

Rank: Member

Joined: 10/28/2014(UTC)
Posts: 11
United States
Location: Hummelstown, PA

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: tappedtech Go to Quoted Post
In addition to the questions I posted above a few hours ago, I have another order issue.

I'm trying to add a shipping method to the order. The result comes back true when I add it but when I look at the order it has no shipping method associated with it.

This is how I'm adding the shipping method to the order:
WebServices3.ShippingRate[] shippingRates = ws.Orders_Order_FindAvailableShippingRates(ref token, order);
WebServices3.ShippingRate selectedShippingRate = shippingRates[0]; //Not really 0
bool shippingMethodAdded = ws.Orders_Order_ApplyShippingRate(ref token, order, selectedShippingRate);


Assuming that the order has already been inserted, the ApplyShippingRate function will create the package, which will then appear in the order shipping page of the admin, but it will not automatically update properties like ShippingMethodId or ShippingProviderId on the order. You will have to do this manually by setting the values on the Order object from the values on the ShippingRate object (ShippingMethodId, ShippingMethodName, ShippingProviderId, ShippingProviderServiceCode, ShippingTotal) and then calling the Orders_Order_Update function.

Originally Posted by: tappedtech Go to Quoted Post
I have an additional order question. I noticed the order's tax amount isn't changing.

Do I need to call Taxes_Tax_CalculateTaxForOrder to have the tax amount calculated and applied?


Actually, that function won't actually update the tax on the order. To do that, you'll have to call the Cart Calculate workflow manually with the IsCalculatingTax property of the order object set to true. Here's some sample code:

ord = ws.Orders_Order_FindByBvin(ref token, ord.Bvin);
ord.IsCalculatingTax = true;
WebServices3Condensed.OrderTaskContext otc = new WebServices3Condensed.OrderTaskContext();
otc.Order = ord;
otc.UserId = "30";
ws.BusinessRules_Workflow_RunByBvin(ref token, otc, "ddfc85a3-97f6-4d53-9e26-0f34518ef207");

ord = ws.Orders_Order_FindByBvin(ref token, ord.Bvin);
Ryan Groene
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#22 Posted : Friday, January 23, 2015 6:04:38 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Thanks, Ryan.

The tax amount and shipping methods are both working correctly now.
tappedtech
#23 Posted : Monday, January 26, 2015 4:48:41 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I saw the shipping method issue again today (everything is null except the rate). It's been working perfectly for a while and I haven't changed how the order is created.

Have you looked into this any more? It seems very odd that I'm getting results back but most of the properties are null.

Thanks.
Aaron
#24 Posted : Monday, January 26, 2015 5:40:26 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Have you looked into this any more? It seems very odd that I'm getting results back but most of the properties are null.

No. We haven't been able to reproduce it.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#25 Posted : Tuesday, January 27, 2015 5:18:26 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

It's working fine again with no changes on my side.

I even checked the orders that it was failing on yesterday and those all worked. I haven't made any changes to the orders.
tappedtech
#26 Posted : Wednesday, January 28, 2015 5:48:38 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

The shipping method is failing again today. The orders that were failing a few days ago and worked yesterday are now failing again.

Order IDs: 63982, 63984, 63987 (no specific order, all the orders I created failed that day)

Could you please take a look at them and see if anything looks off?

The orders haven't changed since I originally created them and the shipping method results randomly fail as stated before.

The failure isn't order specific, if one fails they all fail, if one works they all work.
Aaron
#27 Posted : Monday, February 2, 2015 12:04:33 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Could you please take a look at them and see if anything looks off?

Unless you're willing to give us access to your database server it would probably be easiest if you just posted a CSV file of the bvc_Order table. If you aren't able to do that perhaps you can just post the XML that you're sending and receiving from the web service.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#28 Posted : Wednesday, February 11, 2015 5:21:40 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Arron, did you receive the email I sent you about this? I haven't received a response.
Aaron
#29 Posted : Monday, February 16, 2015 2:28:44 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Brendyn,

Those order numbers (63982, 63984, 63987) do not appear in either the production or development database.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#30 Posted : Sunday, February 22, 2015 3:03:22 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Aaron, those orders must have been removed. Please try these order numbers: 65247, 65272 & 65278.
Ryan Groene
#31 Posted : Thursday, February 26, 2015 2:13:06 PM(UTC)
Ryan Groene

Rank: Member

Joined: 10/28/2014(UTC)
Posts: 11
United States
Location: Hummelstown, PA

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Aaron, those orders must have been removed. Please try these order numbers: 65247, 65272 & 65278.


When you say order number, are you referring to the ID field in the database? That field has records in the proper range, but the OrderNumber field doesn't go above 7466. In any case, there are no orders with those particular ID's in the database. If they are unplaced orders, they may have been wiped out via cart cleanup.

In any case, I was not able to reproduce the error. I tried both with an existing order and with a new order, and I can't find anything in the code that seems like it would cause that. The fact that it is intermittent, of course, makes it difficult to debug.
Ryan Groene
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#32 Posted : Thursday, February 26, 2015 4:02:05 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Those are the OrderID numbers (65247 should have been 65274).They have not been placed and are still active in the database.

The BVINs are 0c984d38-88cb-4a2d-af21-e3400167a1e2, 0c391108-b37f-4fea-bb13-564389f1a6be & a2b151fa-6a5a-4d9b-b7dd-f0d729d65c60.

The issue isn't occurring right now.

What order properties is the shipping method lookup referencing? Is the lookup method on the web service the same as what's used by the website?

The shipping method lookup either works or it doesn't (it's not order specific). It doesn't matter if I try a new or old order. If it works for one order it works for them all and if it fails for one it fails for them all.
Steve95
#33 Posted : Friday, February 27, 2015 2:24:32 PM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 256

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
Do you have access to the front end store when the issue occurs? If so could you please add something to the cart and visit the checkout?

I cannot remember the exact wording but do you get an "No Valid Shipping Methods Found." or shipping methods unavailable type error?

If so its possibly to do with the fact that the website is in in the process of or has just had a rebuild/application pool recycle. The custom task for the shipping rate rule provider may have thrown thrown an exception.

Have a look in the event log. This can sometimes be fixed by an app pool recycle or putting a space in the web.config to prompt a rebuild.

If the above fixes the issue then its a case of hutting down what going on with the shipping rate rule provider.
Ryan Groene
#34 Posted : Friday, February 27, 2015 2:44:59 PM(UTC)
Ryan Groene

Rank: Member

Joined: 10/28/2014(UTC)
Posts: 11
United States
Location: Hummelstown, PA

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Those are the OrderID numbers (65247 should have been 65274).They have not been placed and are still active in the database.

The BVINs are 0c984d38-88cb-4a2d-af21-e3400167a1e2, 0c391108-b37f-4fea-bb13-564389f1a6be & a2b151fa-6a5a-4d9b-b7dd-f0d729d65c60.

The issue isn't occurring right now.

What order properties is the shipping method lookup referencing? Is the lookup method on the web service the same as what's used by the website?

The shipping method lookup either works or it doesn't (it's not order specific). It doesn't matter if I try a new or old order. If it works for one order it works for them all and if it fails for one it fails for them all.


Let us know when this problem happens again, and Aaron or I will try to reproduce it while it's actually occurring for you, which will hopefully help us to debug it.

Yes, the lookup method is the same on the web service and on the website. They both call the same method within BV. The method looks at the country and region of the order's shipping address (if provided), to only look for rates configured in BV with that country and region. Then, it breaks up the items in the order into shipping groups based on LineItem properties like ShipSeparately and ShippingMode. The items are added to the shipping group, and the fields that are then used to determine shipping depends on which provider is used (UPS, USPS, etc.)
Ryan Groene
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012