Jump to content

 

necmettin

Member Since 18 Jun 2015
Offline Last Active Jul 08 2015 08:11 AM
-----

Posts I've Made

In Topic: Create Product With Images

06 July 2015 - 01:44 PM

Please post this issue to the bug tracker. Looks like a bug

I thought as much. Apparently, nobody has used this feature before :s

In Topic: Create Product With Images

06 July 2015 - 12:35 PM

According to the API code, the images should be created. Try to add the following parameter:

main_pair[detailed][image_path]=IMAGE_URL


Thank you, successfully added the main pair. But not a second image. I'm using the same structure in image_pairs but with no luck:
image_pairs[][detailed][image_path]=IMAGEURL

No luck.

In Topic: Api: Products: New Product: Add Images

06 July 2015 - 11:57 AM

array (content explained below)

This part is confusing because there is no 'below', no indentation.

I have managed to have the main image created, but not the secondary images.

Here is the current data I'm sending:
Array
(
[product] => test - xxx
[main_category] => 221
[price] => 22.22
[list_price] => 22.22
[amount] => 500
[full_description] => adsa
[company_id] => 1
[category_ids] => Array
(
[0] => 221
)
[lang_code] => tr
[product_features] => Array
(
[18] => Array
(
[feature_id] => 18
[feature_code] =>
[company_id] => 1
[feature_type] => E
[parent_id] => 0
[display_on_product] => N
[display_on_catalog] => N
[display_on_header] => Y
[description] => Marka
[lang_code] => tr
[prefix] =>
[suffix] =>
[categories_path] =>
[full_description] =>
[status] => A
[comparison] => N
[position] => 0
[variant_id] => 146
)

)

[main_pair] => Array
(
[detailed] => Array
(
[http_image_path] => http://192.168.1.50/...18-77822800.jpg
[image_path] => http://192.168.1.50/...18-77822800.jpg
)

)

[image_pairs] => Array
(
[0] => Array
(
[detailed] => Array
(
[http_image_path] => http://192.168.1.50/...39-15438300.jpg
[image_path] => http://192.168.1.50/...39-15438300.jpg
)

)

)

)

The image is there, made sure of it; main pair is downloaded into Cscart, everything is updated; but the image_pairs are not processed. It says image pair ID must be the key, but does not mention what must be done when the image pair is new. The representation above says key 0 but in actuality there are no keys there. I tried to read the code but too complex for me.

In Topic: Api: Products: New Product: Add Images

03 July 2015 - 06:01 AM

Solved it!

Apparently, you need to use
[detailed][image_path / http_image_path]
for it to pull the images.

But the documentation does not mention that image_path needs to be below detailed.

Thanks, you guys!

Now on to the feature insertion problem.

In Topic: Api: Products: New Product: Add Images

03 July 2015 - 05:52 AM

we tried the image link into browser and it is not opened (possibly badly modified when posting this topic...) so please make sure that links are ok.

also please check this article and let us know if it helps

Hello,
The link would not work for you because it's a link local to my network. I know the link works, tested it in the browser and from the machine itself. Cscart and the code that calls the API are both on 192.168.1.50.
Checked the article and did as it said (except used .html instead of .gif) and it works, so file_get_contents works as expected.

Which means there is some other problem, possible something wrong with the API.