GithubHelp home page GithubHelp logo

ritesh-rana / graphql-for-order-and-product-comment-magento2 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 26 KB

GraphQl For update or edit Order and Product comment magento2. Also contains GraphQl query for update product and customer attribute. Also contians payment and shipping method and can be configure for particular city i.e., visible for particular city.

PHP 83.08% HTML 13.83% JavaScript 3.09%
graphql magento2 magento2-extension payment-method shipping-method

graphql-for-order-and-product-comment-magento2's Introduction

Download zip code from: https://github.com/Ritesh-Rana/GQ

Steps to configure modules:

Extract zip file into magento directory app/code/ app/code/Abc/Def app/code/GqRitesh/Assignment

Run the following commands in magento root directory: sudo bin/magento setup:upgrade sudo bin/magento setup:di:compile sudo bin/magento cache:clean sudo chmod -R 777 var/ generated/ pub/

Check if module GqRitesh_Assignment and Abc_Def are enabled or not in file app/etc/config.php if Abc_Def => 1 and GqRitesh_Assignment => 1 this means modules are enabled.

Configuration for admin panel: Shipping method: Stores > Configuration > Sales > Delivery Methods > Available Shipping Method only in specific country

Payment method: Stores > Configuration > Sales > Payment Methods > OTHER PAYMENT METHODS > Test Payment

Steps to run graphql queries:

Add one google chrome extension https://chrome.google.com/webstore/detail/altair-graphql-client/flnheeellpciglgpaodhkhmapeljopja?hl=en

Setup url with POST method example: http://hostname/graphql

Graphql Queries:

A). For edit or update entire order comment:

{ editCommentAttribute( id: 3, entireOrderComment: "string") { entireOrderCommentUpdateFlag id updatedComment } } Where parameter id is order id or order number and entireOrderComment is comment
that we have to update or edit.

B). For edit or update customer attribute company name:

{ editCustomerAttributes( email: "[email protected]", companyName: "Sigma") { flag updatedCompanyName } } Where parameter email is of customer and companyName is company name that we have to update or edit

C). For edit or update Product Attribute unit of measure:

{ editProductAttributes( id: 0, sku: "shirt", unit: "l") { flag sku updatedUnit } } Where parameter id is product id ,sku is sku of the product and unit unit of measure that we have to update or edit. In this unit can be ‘kg’,’l’,’gm’ or ‘ml’. We can load product by its id or by sku, if loaded by sku then id should be 0.

D). For edit or update order comment for Product:

{ editProductComment( id: 3, sku: "shirt", comment: "Please deliver as soon as soon") { flag sku updatedComment } } Where parameter id is order id or order number that can be obtain from placing order. And sku is the sku of the product that is available in placed order. And comment is the comment that we need to update.

Thanks.

graphql-for-order-and-product-comment-magento2's People

Contributors

ritesh-rana avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.