{"data":{"id":"MDVA-39031","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where adding a product to the cart via GraphQL is possible even if it is not assigned to the target website.","categories":["GraphQL","Shopping Cart"],"components":["magento/module-quote","magento/module-quote-graph-ql"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-6/mdva-39031-adding-unassigned-products-to-cart-possible-via-graphql","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-6/mdva-39031-adding-unassigned-products-to-cart-possible-via-graphql.md","blobSha":"88b625f3b2960996400703618e99188621ba6875","description":"Adding a product to the cart via GraphQL is possible even if it is not assigned to the target website.","stepsToReproduce":"1. Create a secondary website. 1. Create a product and assign it to the primary website. 1. Create an empty cart for the secondary website using GraphQL. <pre> <code class=\"language-graphql\"> mutation{ createEmptyCart } </code> </pre> With headers like: <pre> <code class=\"language-graphql\"> { \"Store\":\"en_au\" } </code> </pre> 1. Add the product assigned to the primary website to the cart in secondary website. <pre> <code class=\"language-graphql\"> mutation { addProductsToCart( cartId: \"XHrUN2nJ37OqDByhtL0VC8OxYsEZs41c\" cartItems: [ { quantity: 1 sku: \"p1\" } ] ) { cart { items { product { name sku } quantity } } } } </code> </pre> Headers <pre> <code class=\"language-graphql\"> { \"Store\":\"en_au\" } </code> </pre>","introducedInQpt":"1.1.6","createdFor":["2.4.2-p1"],"documentedRange":"2.4.2 - 2.4.3-p1","scheduledFixRelease":"2.4.4"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.1 <2.4.4","path":"patches/os/MDVA-39031_2.4.2-p1_v2.patch","blobSha":"2be635de6d3fbf702e6b76a2ba1b636c002d9eb6","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/MDVA-39031_2.4.2-p1_v2.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-quote/Model/Cart/AddProductsToCart.php","change":"modified","package":"magento/module-quote"},{"path":"vendor/magento/module-quote-graph-ql/Model/Cart/AddSimpleProductToCart.php","change":"modified","package":"magento/module-quote-graph-ql"}],"packages":["magento/module-quote","magento/module-quote-graph-ql"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2","2.4.1-p1","2.4.1"],"magento-commerce":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2","2.4.1-p1","2.4.1"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2","2.4.1-p1","2.4.1"],"magento-commerce":["2.4.3-p3","2.4.3-p2","2.4.3-p1","2.4.3","2.4.2-p2","2.4.2-p1","2.4.2","2.4.1-p1","2.4.1"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch MDVA-39031 details"}