Detect device in jQuery

Sometime we need to detect device in jQuery to identify the screen, To add some extra or different logic according to the requirement. 5 ways to detect the mobile Devices in jQuery Solution 1:- Using navigator userAgent. if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // mobile device code } Solution 2:- Using window matchMedia method $(function() { […]

Add Product With Custom Options To Cart Graphql in Magento 2

Add product to cart GraphQL Magento 2 Add product to cart GraphQL Magento 2 or Add Simple Product With Custom Options To Cart in Magento2 Method Post AUTHORIZATION Bearer Token BODY graphql mutation { addSimpleProductsToCart( input: { cart_id: “ctxNWM4yYu4udYCUm8TSeXZOdv7VXv72” cart_items: [ { data: { quantity: 1 sku: “test” } customizable_options: { id: 16, value_string: “28” […]

Back To Top