Category: Magento 2

Magento 2 get current product 0

Magento 2 get current product

This post shows you how to programmatically get current product in Magento 2. This is essentially if you want to display product related content on frontend (for example special banners or overlays). Magento 2...

Magento 2 overload overwrite controller 2

Magento 2 overload, overwrite controller

This tutorial shows you how to overload or overwrite controller for your Magento 2 shop. You do both, overloading or overwriting a controller depends on your needs, but lets see what different solutions you...

Magento 2 get current store 0

Magento 2 get current store

This post is about how to programmatically get current store in Magento 2. If you create a PHP script or Magento 2 module, you may need to check, which store is currently active (calls this...

Magento 2 get current quote 1

Magento 2 get current quote

This shows you how to get current quote from your Magento 2 shot. This is often needed if you want manipulate a cart before creating an order from it. With a current quote object...

Magento 2 get current category 1

Magento 2 get current category

This is about how to get current category in Magento 2. Products are organized in Magento 2 and sometimes you need to know from of for which category you are executing PHP code. It...

magento 2 customize price displayment 1

Magento 2 customize price displayment

I show you how to customize price displayment for Magento 2. This is easier than in Magento 1, but you need to know  a few things before you are changing only part of price...

magento 2 change product status programmatically 2

Magento 2 change product status programmatically

This shows how to change product status programmatically in Magento 2. Sometimes you need to create scripts that mass activate or deactivate products by cron, so you need to know how to change a product...

magento 2 order payment method 0

Magento 2 order get payment method

This time I show you how to get your orders payment method. Sometime this is needed if you want to do different processes for orders payed with different methods. It is also useful for...