We have a ecommerce marketplace for different kinds of products, such as machines and agricultural products. When the buyer clicks on a particular product, we are running into the following problem:
Say machine has fields machine_field_1, machine_field_2
Coffee has fields coffee_Field_1, coffee_field_2
Our API response for product detail has all 4 fields in the JSON response, eg:
{
machine_field_1: "value"
machine_filed_#: "value"
coffee_Field_1: "value"
coffee_filed_2: "Value"
}
As we add 100s of categories, the response is becoming too big.
We are looking for a way to make it easy to add categories while not bloating the API response. Any suggestions?
Related
I am a node js programming, testing the self-service api calls on amadeus website.
I am aware of the whole flow: Flight Offers Search -> Flight Offers Price -> Flight Create Orders. Just curious which api are returning cached results from servers, which return live results.
PS.How does 'create order' actually create flight orders? I do not see url link to book air ticket, like skyscanner's api. All I get is
"type": "flight-order",
"id": "eJzTd9f39vA0co4AAArzAk8=",
"associatedRecords": [
{
"reference": "KHI2CX",
"creationDate": "2020-01-09T07:51:00.000",
"originSystemCode": "GDS",
"flightOfferId": "1"
}
],
etc...
How can a customer book an air ticket from this info?
PPS: Is it possible to skip Flight Offers Price in the flow? If not, how long does response from Flight Offers Price stay valid as input for create orders?
Thanks in advance.
The 3 APIs have live results (no cache), so in theory, if you do a booking right after the search you could skip the price, but as it can take time to browse and select the flight to book it's better to perform the price to make sure the price didn't change and the seat(s) is still available.
Regarding the validity of the Price API: it's valid as long as the price doesn't change and the seat is still available.
Our Flight Create Orders API creates a booking reservation, it doesn't redirect to a website of a travel agency or an airline. You can find more information in our guide: Create a flight booking engine.
Do not hesitate to contact our support team if you want more information.
I have Shopify Store, where customer can design/customise their product before buying it. and based on the design / customisation price of the selected variant may get varied. but I think Shopify does not facilitate to change variant price dynamically while adding into cart.
Is any solution there I might be missing ? Any help will be appreciated.
There are a few solutions none of which are great.
Quantity based
Make the product price $1 and based on the options increase the quantity in order to meet the required price. With a little code you can change the cart to look like it's a single product, but the checkout will not be OK.
Variant based
If the product will have only a few price changes you can create different variants and change the variants based on the selected options. For example 10 different variants for 10 different prices.
App based
You can use an App such as https://apps.shopify.com/product-options to create options that can modify the product price. ( this will add dummy products to the checkout as well )
For Plus, you can use shopify script to edit the line items directly.
If you're not Plus users, you have to do it on server-side, i.e. your backend
submit an ajax request on your custom product page
backend receives the request. Use admin API to create a new product variant on the fly
set the variant price, weight, quantity, or other properties based on your business rules
return response to client
client receives a successful response. use cart ajax to add the new variant to cart
let client continue checkout
Upon order is made, use webhook to update inventory or other information required. But there is a problem regarding variant limit. For each product, you can only add 100 variants.
So you need to create new products when the variant is used up for the product. Alternatively, you can delete the existing variants. But the variants in customer carts will be cleared.
I am doing something similar to what you're doing so I think our approach will be more or less the same. Basically, there are only 2 solutions, either create a new product or new discount dynamically. Both approaches create many dummy/garbage data
I run table tennis products website.
I need to add product specification and way for users be able to compare between products on their specs.
Example the following product page : product example
Every blade like above will have its speed and control quality number.
So need to put this on above product page like :
Speed : 89
Quality: 70
And users can compare specs with other products side by side.
I understand I can just input the above spec on product description, but then it does not have compare system,
users will have to manualy open two screens, and thats difficult for mobile users.
Is there any in-build solution in shopify or any app that can do this ?
You can do it but it is not a straight forward way.
Create all additional fields using metafields property of the products. More information - https://help.shopify.com/themes/liquid/objects/metafield
Create a comparison "page" where you can provide 2/3/4 drop lists for products to be used for comparison
Create a template for products that displays the comparison data in JSON notation. More information - https://help.shopify.com/themes/customization/store/create-alternate-templates
As soon as a product is selected in "2", do an AJAX call to the product template in "3". You'll get the required data. Now you can arrange it in any format as you need.
I have 3 local stores, each stores have one prestashop e-commerce.
65% of their products are the same and the rest changes regarding to the store.
I would like to find the way to create a fourth prestashop e-commerce which sell the products of all the 3 stores, manage the stock and notify the different stores when an order is created.
Each store has to manage their special products ( descriptions, pictures and prices). For the products which are the same between each stores, the price, description and pictures are exactly the same.
Is it possible?
Thanks!!
EDIT
By local stores, I mean real physical stores. These stores impemented in three differents places have a online store on the subdomaine : mydomaine.com/city1 , mydomaine.com/city2 , mydomaine.com/city3.
For instance the store 1 has the product 1, the store 2 the product 2, the store 3 the product 3.
And the online site 4 should have the products 1,2,3.
I would like to create a fourth online story which regroup the products of the three other online stores. The stock on the fourth online store for the same products, should be the sum of the product available one each local store.
For instance, the store based in the city 1, could add a new special product ( price, description, stock) in its online store ( mydomaine.com/city1). ( special product : product only sold in one location ) This product should be directly accessible on the fourth online store ( the local managers have no access to the fourth online store). The thorny point is here : if a customer order on the fourth online store, the local stores which have the products involved in the customer order should be notified to send the products. And If a product is sold on a local online store ( for instance, mydomaine.com/city2) the stock of the fourth online store should be updated.
The stock for each online store is updated everyday to match the store stocks. For instance, the store in the city 1 will update every day the stocks of their products available online regarding to their sales of the day in their brick and mortgage store.
Prestashop includes a MultiStore functionality.
You can create a single website with 4 different shops. You then can import all your products and link those products to your shops (You can link a product to one or more shops). You can manage prices and stocks independently for each shops as well.
Please let me know if you have more questions on the subject.
Here are some links:
Managing Multiple Shops
Advanced Stock Management
I'm trying to use the eBay shopping API to try and retrieve the ISBNs from listings for books. I already have the eBay IDs for the listings which I'm interested in. Likely that most will have the ISBNs included in the Item Specifics for the listing (some won't, these can be disregarded).
One would therefore assume that retrieving the Item Specifics from the API would give the ISBN as a value, but it appears that the output gives pretty much everything apart from the ISBN. For example, the following API request gives lots of interesting detail about the listing, apart from the ISBN itself:
http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=MYAPPID&siteid=1&version=897&ItemID=EBAYID&IncludeSelector=ItemSpecifics
I haven't had much joy searching the API docs for a solution to getting this particular element from the listing - does anybody have a solution for this? Or if it simply isn't possible to get the ISBN via the API cleanly, is there an alternative method? (This is for very small scale personal use.)
ISBN, UPC, EAN and suchlike come under the productID field.
This field is returned by using the Details value of IncludeSelector. So the url you would want is:
http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=MYAPPID&siteid=1&version=897&ItemID=EBAYID&IncludeSelector=Details
http://developer.ebay.com/devzone/shopping/docs/CallRef/GetSingleItem.html#Response.Item.ProductID
EDIT:
To get the ISBN form a catalogue product you need to use the productID value to make a request to the Product API.
You need to call getProductDetails with the input:
<productDetailsRequest>
<productIdentifier>
<ePID>91515717</ePID>
</productIdentifier>
<datasetPropertyName>ISBN</datasetPropertyName>
</productDetailsRequest>
You can use ISBN10 or ISBN13 as the value of datasetPropertyName depending on which one you want.
http://svcs.ebay.com/services/marketplacecatalog/ProductService/v1?OPERATION-NAME=getProductDetails&SECURITY-APPNAME=APPID&SERVICE-VERSION=1.3.0&productDetailsRequest.productIdentifier.ePID=REFERENCE&productDetailsRequest.datasetPropertyName=ISBN
http://developer.ebay.com/DevZone/product/CallRef/getProductDetails.html