BigCommerce product update not returning image array - bigcommerce

We have a large catalog where we update products on a regular basis.
The product update works, and returns the product and other arrays except for images.
Existing images are updated and new images are added, but the responseMessage does not contain the image array. I can create a workaround, but it would not as graceful as handling a single product object.
HttpResponseMessage responseMessage = await client.PutAsync(String.Format("catalog/products/{0}", product.BigCommerceProductId), httpContent);

If you add a query on your request to include images, this should resolve the issue.
Try something like:
https://api.bigcommerce.com/stores/{{store-hash}}/v3/catalog/products/{product_id}?include=images

Related

why is the slug not saved in Strapi?

there is a video content type field in which there is a link slug, and when a new video is created, in the get request we get a null slug. tell me what's the matter. didn't install slugify
docs
getting stuck at getting {slug : null} after api call in strapi?
ok, this is what I did
I made a variable before POST request based on one of my form fields (eg:name field)
my formValues is an object with values of form fields like this
formValues = {name:"whatever" , decsription:"whatever"}
make a variable:
const slug = formValues.name.split(" ").join("-") + "-" + Math.random();
now we might have same names, so that's why I used a random value (you might want to use uuid or something like that)
then you send it like this
const res = await axios.post(`${API_URL}/api/events`,{...formValues, slug });
// you may not need to send an object with the shape like this
// but the point is you concat your custom slug to the object you want to send
notice I'm adding a custom slug from frontend which is somehow random but based off of one of the fields, but it doesn't really matter, right now strapi does not have any documentation about this common problem, it seems like the best solution might be usingstrapi-plugin-slugify but if that didn't work for you feel free to use my solution

How to get variation specific image from a listing with eBay API GetItem

I'm trying to get variation images, I have tried multiple things and nothing seems to work out.
I have one variation on all my listings called size. Within this I have Small, Medium, Large, Set of 3.
I have managed to get the main image with this code:
Dim fetchedItem As ItemType
Dim Apicall As GetItemCall = New GetItemCall(Context)
Apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll)
fetchedItem = Apicall.GetItem(myItemID)
Dim imageURL As String = fetchedItem.PictureDetails.GalleryURL.ToString()
Try using a different API call: GetSingleItem. You can either POST or GET your API request. http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html
Be sure to use an IncludeSelector for additional data in the response.

new BitmapImage from Imagelist.images

Im trying to change the source of windows.media.imagesource
I store all my images in a windows.forms.imagelist
my code is: Source = New BitmapImage((MyImageList.Images(2)))
a system.uri is expected but I cannot find the conversion method
ok i dont know the rest of your code but i asume that for adding the images to the image list you first look for an uri, save the uri's in an Array and then call them from there.
Note:there is no method for getting an Uri from a Bitmap.

Bigcommerce API Add Images

Using the legacy API in bigcommerce, trying to add a product image without success. I have done this before but it seems to not work now.
The API documentation says that there is a function to 'create a product image', however it says that the field 'product_id' is read only and any request will be rejected if it is included. If that is true and not a typo, how are you supposed to create a product image against a product?
Don't add product ID to the parameters, add it to the url. So if you want to add images to product 12345, make a post to
'/products/12345/images'
of the image data
{ 'sort_order': 1, 'image_file': 'http://blah.jpg' }

Magento API creates simple product correct -> but afterwards tells "101 Product not exists"

I try to add some pictures to a simple product, which was created (without error) by the API. The product is shown in frontend its functional with all wanted attributes. But if I check afterwards
$client->call($sessionId, 'product.info', '123456');
I get Soap Error: "101: Product doesn't exists". But its definitivly reachable over back- and frontend. (Cache cleared, Index refreshed)
Same issue, when I try to add media informations. On Confugurable Products the error don't show up and the pictures are added whithout any problems.
Maybe I messed something up with the attributes or the attribut sets... I don't know, where to watch first.
I'm at my php’s end!
Using Magento 1.6.0.0
Thank your for clarify me.
Best regards.
Since the ame API function ("product.info" in this case) receive as a parameter both SKU and ID, there is a problem if your are looking for SKU's which is numeric values.
To avoid this problem, we always adding space to the end of SKU before sending it to the API. For example, if your SKU is "123456" you should send "123456 " to the API.
Have you tried this call with your product id instead of the sku? I had some problems in the past with product calls and the sku.
I've installed 2 magentos and we always use numeric SKUs and I've always had this problem.
I've solved it by modifying the file:
app/code/core/Mage/Catalog/Model/Api/Resource.php
About line 122 that reads:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), $identifierType);
I've changed it to:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), 'sku');
This way the function always expects an SKU.