How to get all the Items of Order In Magento 2?

In this tutorial, We want to get all the items of the placed order.

The customer placed an order and after place order, if a developer needs to get all the items programmatically this tutorial will help them.

We can get all the items of the order by order id in Magento 2 by just simple code snippets. For,  getting all the items of Order we need to required order id. Continue reading “How to get all the Items of Order In Magento 2?”

How to apply custom conditions for product collection in Magento 2?

In Magento 2, There are some situations where you need to set custom conditions for layered(filter) navigation. In Magento 2, All product collection comes from Catalog Module at Layer.php file from vendor/magento/module-catalog/Model/Layer.php. Continue reading “How to apply custom conditions for product collection in Magento 2?”

How to install Magento 2 via Commnad line interface(CLI)?

In Magento 2, We can install Magento with different techniques. Like, Via Command Line, Using the Websetup wizard.

For installation with CLI, you just need to run below command, from your Magento instance path,

Before installation through CLI, You just need to set the following commands in the order shown to set permission:

cd /var/www/html/{Magento_Package}

find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; && chmod u+x bin/magento

Now run the command below,

php bin/magento setup:install --base-url=http://127.0.0.1/magento2/ --db-host=localhost --db-name=graphql --db-user=root --db-password=root --admin-firstname=Rakesh --admin-lastname=Jesadiya --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

base-url is your URL of Magento 2 site
db-host is your hostname of database
db-name is your database name
db-user is your database username
db-password is your database password
admin-firstname is your admin user firstname
admin-lastname is your admin user lastname
admin-email is your email id of admin user
admin-user is your username for adminpanel
admin-password is your password for adminpanel
currency is your currency value like, USD,GBP,INR
language is your language like en_US,en_GB,nl_NL
timezone is your timezone of sites like America/Chicago or any.