User Tools

Site Tools


udropship:umarketplace:m2:vendor-info-graphql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
udropship:umarketplace:m2:vendor-info-graphql [2021/09/06 19:02]
wtsergo [Get list of Vendor Products]
udropship:umarketplace:m2:vendor-info-graphql [2021/09/06 19:06] (current)
wtsergo
Line 634: Line 634:
       }       }
     ]     ]
 +  }
 +}
 +</code>
 +
 +===== Add product to cart with specific vendor =====
 +
 +It's the same mutation with small extension to grapql CartItemInput 
 +
 +''
 +Example:
 +''
 +<code>
 +mutation {
 +  addSimpleProductsToCart(
 +    input: {
 +      cart_id: "{ CART_ID }"
 +      cart_items: [
 +        {
 +          data: {
 +            quantity: 1
 +            sku: "test"
 +            udropship_vendor: 1
 +          }
 +        }
 +      ]
 +    }
 +  ) {
 +    cart {
 +      items {
 +        id
 +        product {
 +          sku
 +          stock_status
 +        }
 +        quantity
 +        udropship_vendor
 +      }
 +    }
 +  }
 +}
 +</code>
 +''
 +RESPONSE
 +''
 +<code>
 +{
 +  "data": {
 +    "addSimpleProductsToCart": {
 +      "cart": {
 +        "items": [
 +          {
 +            "id": "102",
 +            "product": {
 +              "sku": "test",
 +              "stock_status": "IN_STOCK"
 +            },
 +            "quantity": 1,
 +            "udropship_vendor": 1
 +          }
 +        ]
 +      }
 +    }
   }   }
 } }
udropship/umarketplace/m2/vendor-info-graphql.txt · by wtsergo