This topic contains 4 replies, has 0 voices, and was last updated by Olivier Gagnon NC 6 years, 5 months ago.
-
AuthorPosts
-
May 25, 2018 at 3:05 pm #21955
Mohandas -
May 29, 2018 at 6:28 am #21956
Olivier Gagnon NCCan you narrow down the problem a bit more than "it's not working properly"?
Mohandas replied on 05/29/2018, 10:34 AM: Hello Olivier,
Thank you for responding.
The problem we are facing that when we try to create Sales order with shipping details. When we select ground shipping method and hit calculate shipping button it should not send XML request to get the rates from UPS and it should set the shipping cost as “0”. When we select the shipping method as three day select it should get the rates for “Ground shipping” cost. This was our intention to create the script and it was ran successfully till last Thursday.
But,now we are not getting the expected rates and it is sending the XML request to UPS for Ground Shipping Method as well which is not desired.
Thank you.
-
May 29, 2018 at 8:33 am #21957
JohnCColeMohandas how is the calculateShippingButton created do you know for sure it's actually hitting the getUPSRate function.
In your field change I assume with this line you are trying to call getUPSRate but why not just call the method. What you're actually doing is setting the onlick attributing not simulating a click.
Code:
$('#calculateShippingButton').attr('onclick', 'getUPSRate(); return false;');// why not just call
getUPSRate();
Is the calculateShppingButton a submit button or a normal button in the pageInit if you're trying to attach a click handler would using .click() not be betterCode:
$("#calculateShippingButton").click(function(){alert('Clicked now calling getUPSRate');getUPSRate();}); -
May 29, 2018 at 9:28 am #21958
Olivier Gagnon NCIn general, though, DOM manipulations are not coding Best Practices and are at high risk of failing sooner or later. Your button code should be switched to respect best practices.
-
May 29, 2018 at 2:47 pm #21959
Olivier Gagnon NCThe problem we are facing that when we try to create Sales order with shipping details. When we select ground shipping method and hit calculate shipping button it should not send XML request to get the rates from UPS and it should set the shipping cost as "0". When we select the shipping method as three day select it should get the rates for "Ground shipping" cost. This was our intention to create the script and it was ran successfully till last Thursday.
But,now we are not getting the expected rates and it is sending the XML request to UPS for Ground Shipping Method as well which is not desired.
Thank you.
I'm not sure I follow. If that is what you're trying to do, why don't you just configure your Shipping Items to behave that way?
-
AuthorPosts
You must be logged in to reply to this topic.