oystparis / oyst-1click-magento

Oyst 1-Click plugin for Magento
Apache License 2.0
0 stars 3 forks source link

Catalogue bug produits avec variations #41

Closed quentinjunior closed 6 years ago

quentinjunior commented 7 years ago

ETQ user, quand je fais un achat 1 click en indiquant une couleur et une taille et que je regarde le détail de l'order dans la console, le champ variation est null partout. image

ref: 412 quantity_avilable:0 variations: null image

Dans postman j'ai:

{
    "product": {
        "amount_including_taxes": {
            "value": 24000,
            "currency": "EUR"
        },
        "available_quantity": 0,
        "categories": [
            {
                "title": "VIP",
                "is_main": true,
                "reference": "9"
            },
            {
                "title": "Tees, Knits and Polos",
                "is_main": false,
                "reference": "16"
            }
        ],
        "condition": "new",
        "cpa": 0,
        "description": "V-neck cardigan. Mother of pearl front button closure. Two dart pockets. Ribbed cuff and hem. 100% cotton. Hand wash.",
        "ean": "",
        "id": "ec62c576-90fb-410c-ab4b-34379c04a55d",
        "images": [
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_2.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_3.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_4.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_5.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_1.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009a.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009b_1.jpg",
            "http://www.born3convert.com/media/catalog/product/m/t/mtk009b_2.jpg"
        ],
        "informations": {},
        "is_active": true,
        "is_discounted": false,
        "is_materialized": false,
        "isbn": "",
        "manufacturer": "",
        "merchant_id": "281fcf14-916e-44dd-89be-996966469478",
        "reference": "412",
        "related_products": null,
        "shipments": null,
        "short_description": "A lean, raglan sleeve cardigan with cosmopolitan appeal.",
        "size": null,
        "tags": null,
        "title": "Lexington Cardigan Sweater",
        "upc": "",
        "url": "http://www.born3convert.com/lexington-cardigan-sweater-566.html",
        "variations": [
            {
                "amount_including_taxes": {
                    "value": 0,
                    "currency": "EUR"
                },
                "available_quantity": 25,
                "condition": "new",
                "description": "",
                "ean": "",
                "id": "2150891f-2807-4f80-9fe8-95d1677859ed",
                "images": [
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_1.jpg"
                ],
                "informations": {},
                "is_discounted": false,
                "is_materialized": false,
                "isbn": "",
                "manufacturer": "",
                "reference": "258",
                "shipments": null,
                "short_description": "",
                "size": null,
                "tags": null,
                "title": "",
                "upc": "",
                "url": "http://www.born3convert.com/lexington-cardigan-sweater.html",
                "weight": "0"
            },
            {
                "amount_including_taxes": {
                    "value": 0,
                    "currency": "EUR"
                },
                "available_quantity": 25,
                "condition": "new",
                "description": "",
                "ean": "",
                "id": "80bf4bea-42a6-4a4d-8804-6a1546465d24",
                "images": [
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_2.jpg",
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009b_1.jpg"
                ],
                "informations": {},
                "is_discounted": false,
                "is_materialized": false,
                "isbn": "",
                "manufacturer": "",
                "reference": "259",
                "shipments": null,
                "short_description": "",
                "size": null,
                "tags": null,
                "title": "",
                "upc": "",
                "url": "http://www.born3convert.com/lexington-cardigan-sweater-564.html",
                "weight": "0"
            },
            {
                "amount_including_taxes": {
                    "value": 0,
                    "currency": "EUR"
                },
                "available_quantity": 24,
                "condition": "new",
                "description": "",
                "ean": "",
                "id": "94ccced5-f469-44e5-b0e2-b66f5ffad30e",
                "images": [
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_3.jpg"
                ],
                "informations": {},
                "is_discounted": false,
                "is_materialized": false,
                "isbn": "",
                "manufacturer": "",
                "reference": "260",
                "shipments": null,
                "short_description": "",
                "size": null,
                "tags": null,
                "title": "",
                "upc": "",
                "url": "http://www.born3convert.com/lexington-cardigan-sweater-565.html",
                "weight": "0"
            },
            {
                "amount_including_taxes": {
                    "value": 0,
                    "currency": "EUR"
                },
                "available_quantity": 21,
                "condition": "new",
                "description": "",
                "ean": "",
                "id": "6db25fa6-f827-4704-a7d2-34b0247aa9f7",
                "images": [
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_4.jpg"
                ],
                "informations": {},
                "is_discounted": false,
                "is_materialized": false,
                "isbn": "",
                "manufacturer": "",
                "reference": "494",
                "shipments": null,
                "short_description": "",
                "size": null,
                "tags": null,
                "title": "",
                "upc": "",
                "url": "http://www.born3convert.com/lexington-cardigan-sweater-567.html",
                "weight": "0"
            },
            {
                "amount_including_taxes": {
                    "value": 0,
                    "currency": "EUR"
                },
                "available_quantity": 21,
                "condition": "new",
                "description": "",
                "ean": "",
                "id": "1bc77860-407e-44d6-80fe-a4ca4289e5e2",
                "images": [
                    "http://www.born3convert.com/media/catalog/product/m/t/mtk009t_5.jpg"
                ],
                "informations": {},
                "is_discounted": false,
                "is_materialized": false,
                "isbn": "",
                "manufacturer": "",
                "reference": "495",
                "shipments": null,
                "short_description": "",
                "size": null,
                "tags": null,
                "title": "",
                "upc": "",
                "url": "http://www.born3convert.com/lexington-cardigan-sweater-568.html",
                "weight": "0"
            }
        ],
        "weight": ""
    }
}
mehdichaouch commented 7 years ago

To make this work correctly, first I have to add additional informations in product export field informations like,

{
"color": "red",
"size": "32",
"...": "..."
}

Fields will need to be selectable in backend.

mehdichaouch commented 7 years ago

The information of price are now available on product's variations. Import order with simple product is ok. I check now how to import order with variations.