This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
udropship:umarketplace:m2:vendor-info-graphql [2021/02/18 17:16] wtsergo |
udropship:umarketplace:m2:vendor-info-graphql [2021/09/06 19:06] (current) wtsergo |
||
---|---|---|---|
Line 344: | Line 344: | ||
} | } | ||
] | ] | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Magento native version of above query is | ||
+ | |||
+ | '' | ||
+ | Example: | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | products( | ||
+ | filter: { udropship_vendor: | ||
+ | ) { | ||
+ | items { | ||
+ | name | ||
+ | sku | ||
} | } | ||
} | } | ||
Line 499: | Line 517: | ||
} | } | ||
} | } | ||
+ | </ | ||
===== Ask product question to vendor ===== | ===== Ask product question to vendor ===== | ||
Line 523: | Line 542: | ||
'' | '' | ||
< | < | ||
- | </ | ||
{ | { | ||
" | " | ||
" | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Get vendor reviews ===== | ||
+ | |||
+ | '' | ||
+ | Example: | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | vendorReviews(vendorId: | ||
+ | detail | ||
+ | nickname | ||
+ | createdAt | ||
+ | ratingVotes { | ||
+ | ratingCode | ||
+ | isAggregate | ||
+ | percent | ||
+ | value | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | '' | ||
+ | RESPONSE | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Add product to cart with specific vendor ===== | ||
+ | |||
+ | It's the same mutation with small extension to grapql CartItemInput | ||
+ | |||
+ | '' | ||
+ | Example: | ||
+ | '' | ||
+ | < | ||
+ | mutation { | ||
+ | addSimpleProductsToCart( | ||
+ | input: { | ||
+ | cart_id: "{ CART_ID }" | ||
+ | cart_items: [ | ||
+ | { | ||
+ | data: { | ||
+ | quantity: 1 | ||
+ | sku: " | ||
+ | udropship_vendor: | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ) { | ||
+ | cart { | ||
+ | items { | ||
+ | id | ||
+ | product { | ||
+ | sku | ||
+ | stock_status | ||
+ | } | ||
+ | quantity | ||
+ | udropship_vendor | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | '' | ||
+ | RESPONSE | ||
+ | '' | ||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
} | } | ||
} | } |