I am working on checkout shipping methods but I am not getting what's wrong in configuration that shipping methods are not showing at all at checkout after saveBilling method calls it returns null in shipping methods.Here is a site link www.posmogo.com
Related
I'm creating a progress bar for my product pages that show how much you have to spent until you get free shipping. Everything works great, except that I can't get the shipping rates with the rate for which the client will get free shipping. Currently my request looks like this:
if (cart.items.some(i => i.requires_shipping === true)) {
const url = '/cart/shipping_rates.json?' + encodeURI('shipping_address[zip]={$zip}&shipping_address[country]={$country}');
jQuery.getJSON(url, function(shipping_rates) {
console.log(shipping_rates);
});
}
The If statement checks if a Product is in the Cart that requires shipping. With this setup I'm getting the shipping method based on the current cart value. Expl: If the cart value is below the 25€ free shipping threshold the shipping method shows that shipping costs 3.5€ and once the cart value is above the threshold, it show that the shipping is free.
I want to get the threshold based on the country the client lives in. Is there a way to get the Threshold with a request without making complicated logic based around the shipping_rates?
The problem with this approach is that your request is retrieving currently available shipping rates for the given order but they are not showing the next level.
There are a few problems with this approach:
You won't get next-tier details (e.g. how much $ away you are from the next shipping). It would be best if you stored that info somewhere and JS is not a good place for that.
I am not sure if Script Editor / Shopify Functions shipping discount will be calculated at this point. It will be in the checkout step, but I have never heard of that happening on the cart request level. If my concerns are true then this endpoint is not the best choice for being the source of truth.
You are making a javascript request which takes time and assuming you are showing that info somewhere, you are experiencing reflow and CLS issue
3.1 Such a request could fail.
Since you need to define business logic somewhere and you can't get rid of that requirement, I would highly recommend keeping that logic in meta fields/theme customizer (tiers, discount values) and calculating everything using liquid code. On refresh, you can use Section Rendering API to reload a given part of the page. This is how it solves the above problems:
Your tiers setup is stored in fields/theme customizer which can be accessed using liquid.
You don't need to worry about falsy result from API (shipping rate set up in admin panel vs possible discount) because this is defined by you. The downside is you need to keep discount logic in two places - backend and frontend (liquid) and keep it in sync.
Because you calculate everything using liquid you don't get reflows, issues with loading fetch data and content layout shift.
I'm looking into how to use the Time Sheet Invoicing Upload and first port of call was the Try It Out page.
The documentation lists the value for the mandatory "Type" field as TIMESHEET INVOICING but this seems at odds with other calls (it's usually just the call name, e.g. Time Sheet Invoicing Upload). Have tried these values and multiple other variants on the "Try It Out" page but all have failed so far with "The Type value specified in this file is not recognized".
Grateful for any pointers on how to get this working and/or advice on whether the SAP Fieldglass REST API documentation for this call might need to be amended.
As an aside - am also wondering about some of the fields listed in the body - e.g. TIMESHEET ID and ORIGINAL TIMESHEET ID are in block capitals, which doesn't follow the convention of other fields and the API reference for this call just has "data": [ {} ] in the body with no actual fields present - again, this is at odds with other calls.
Re: Main question - The documentation is incorrect - the Type value should be "Time Sheet Invoicing Upload". Also found out that this particular call can only be made by a Supplier tenant, not a Buyer tenant. In our case, we needed to request SAP to enable Configuration Manager for that tenant and then we could log in as the Supplier, change to the linked Configuration Manager account, create the API Application Key and License Key, enable the integration connector and use all of the above to authenticate as the Supplier and make the API call... it also requires a Buyer field in the header (set to the 4 digit Buyer code e.g. "A123") - this also isn't mentioned in the documentation.
Re: Aside - Turns out the API is case insensitive for field names - e.g. "Timesheet ID" will work just as well as "TIMESHEET ID".
I have created one shoppping cart application.I do not know how to redirect payment option after filled all details.If anyone know please help me to find the solution.
src/app/directives/billing.dir.ts:
send(){
if(this.billingForm.valid){
this.storage.set({
customerInfo:this.billingForm.value
})
this.router.navigate(['/checkout']);
}
}
Demo: https://stackblitz.com/edit/angular-selvam-ecommerce-task-cnstaj?file=src%2Fapp%2Fdirectives%2Fbilling.dir.ts
If you are using only angular for payment then you have to implement any payment_gateway (paytm or paypal etc) in angular then send that information to that gateway.
OR
If you are using backed like Node.js then you can send that data to the server and implement that gateway on server-side
Then after sending that data to the gateway, it will return you the URL. then you have to redirect on that URL and made your payment.
You can ask for any help If you need.
You have to choose payment which you want to start with it.
After they will provide you integration kit for supported language mostly all payment gateway support JavaScript SDK.
Then you have to convert or use as it library inside angular project like importing library.
Before start payment integration get clarity on below article :
https://www.quora.com/How-do-payment-gateways-work-technically
https://www.quora.com/What-is-the-process-of-transaction-in-payment-gateway
https://www.quora.com/What-is-the-procedure-to-get-a-payment-gateway
https://www.quora.com/What-is-the-procedure-to-get-a-payment-gateway-for-my-website-in-India
They will provide Kit like this :
https://razorpay.com/integrations/
Demo Paytm Account you can follow this :
https://developer.paytm.com/docs/v1/payment-gateway/ and for going live
sign up here : https://business.paytm.com/payment-gateway
When POSTing to https://developer.api.autodesk.com/viewingservice/v1/register I sometiems receive the following error:
{
Diagnostic: The request is rejected as it conflicts with a previous request that is in-progress.,
registerKeys: {},
Result: Conflict
}
How can I find out which job is already in progress so that I can track its progress and get its result?
First, this is the old API, you need to consider using the ModelDerivtive API instead (ie https://developer.autodesk.com/en/docs/model-derivative/v2)
Like Xiaodond said there is no API to collect all jobs currently processing on your account. You need to request each URN manifest to determine how many jobs runs on this model as know you can translate to SVF, but also export to other formats such as obj, stl, ... when it is possible. Manifest end point and documentation here - https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-GET/
Last, we are working on a webhook solution which will be a better solution as a Webhook will call you back when a job is starting and completes. Webhooks aren't yet available at the time of this post, but you should be notified via the developer newsletter when it will be on production.
Hope that helps,
I am working on Ibeacon in android, I am calling one web service in didenterRegion with request of UUID of Beacon and one flag for Region enter as true. Same web service I need to call in didexitregion with UUID and flag should be false as user is exiting from that region. In didenterregion,web service is working fine and I am doing accordingly, but in didexitregion, it is not calling what should I do, Please help me.