magento
restore canceled order in Magento2
Imagine that some of your team cancel an order in Magento by mistake, What is the solution?
By the below code you can restore the cancelation, hope it will help you
How to create invoice when order created programmatically in magento1
You can create an invoice programmatically for an order by using the below code
Magento1 how to change magento order status programatically?
Some time we need to change the Order status programmatically , the below code will allow us to do this
Magento 2: How to get customer collection
<?php
protected $_customerFactory;
public function __construct(
...
\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerFactory
...
Create Invoice Via REST API for Magento2 for Bundle Product
To create an invoice for an order that contain bundle product you have to prepare the good json.
Basically Magento has two different types of bundle products: dynamic and fixed. That's why I need to add clarification for Expected Result:
I) Bundle dynamic product:
Get Customer's Orders using Magento2 API REST
in this code you will see how to get all Customer's Orders from Magento2 using the REST API
Disable/Hide Recently Ordered Block in Magento 2
To hide the recently ordered product block from the left side
Create default.xml in your module or theme's view/layout folder and paste the below code.
How to enable profiler in magento2
To enable the profiler we can add it from index.php or apache/nginx conf file.
Enable/Disable Profiler from Command Line:
# Enable the profiler.
php bin/magento dev:profiler:enable
# Disable the profiler.
php bin/magento dev:profiler:disable
Enable Profiler from index.php:
Flash Catalog Images Cache Magento2
To flash the Catalog Images cache, first of all instantiate the Object and Event Manager in your constructor
private $objectManager; private $eventManager; public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Framework\Event\Manager $eventManager ){ $this->objectManager = $objectManager; $this->eventManager = $eventManager; }
After that you can clean the catalog images cache by using this two code lines
Magento add Recaptcha to any form you want
Hi, This extension will allow you to ad google reCaptcha to any form you want by add one line , only one line will activate the reCaptcha
First step is to set the configuration from
System -> Configuration
Go to the ZEO Extension section then click on reCaptcha
Then add the configuration