Joomla »

[30 Jun 2016 | No Comment]

Problem:
I recently got the following error while trying to install a custom extension on Joomla.
JFolder::create: Could not create directory

Magento, Magento 2 »

[27 Jun 2016 | No Comment]

This article shows how to create and run cronjob in a custom module in Magento 2. To know about general details about setting up and running cron on Magento 2, you may refer to this official documentation. This documentation will show you how you can create cron job on web server as well.
Here, we will focus on creating / setting up / running cron for a custom Magento 2 module.

Magento, Magento 2 »

[23 Jun 2016 | No Comment]

This article shows how get height and width of the media images in Magento 2.
In this example, we will load product by id or sku and then fetch and display height and width of product small image.
To load the product, we will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento.

Magento, Magento 2 »

[16 Jun 2016 | No Comment]

This article shows how to resize product image in Magento 2. In this example, we will be loading a product by id or sku and then resizing its image. We will also be injecting the object of Catalog Helper Image class for image resize purpose.
To load the product, we will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento.

Miscellaneous »

[10 Jun 2016 | No Comment]

This article shows how to load product by it’s ID and then get all attributes associated with that product in Magento 2. We print the attribute code, attribute name, and attribute value of all the attributes related to any particular product.
We will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento.

Magento, Magento 2 »

[6 Jun 2016 | No Comment]

This article shows how to get stock quantity (qty) of a product in Magento 2. We can also fetch other stock information like minimum quantity (min_qty), minimum sale quantity (min_sale_qty), maximum sale quantity (max_sale_qty), see if a product is in stock (is_in_stock), etc.
We will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento.

Magento, Magento 2 »

[1 Jun 2016 | No Comment]

This article shows how to load product by id and sku in Magento 2.
We will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento.
Below is a block class of my custom module (Chapagain_HelloWorld). I have injected object of \Magento\Catalog\Model\ProductRepository class in the constructor of my module’s block class.

Magento, Magento 2 »

[27 May 2016 | No Comment]

This article shows how we can get list of all categories and all category of current store in Magento 2.
Below is a block class of my custom module (Chapagain_HelloWorld). I have injected object of \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory and \Magento\Catalog\Helper\Category classes in the constructor of my module’s block class.

PHP »

[23 May 2016 | No Comment]

This article shows how to create a simple CRUD (Create, Read, Update, Delete) application with CodeIgniter. CodeIgniter (CI) is a PHP framework that helps building a full-fledged web application.
This article is a continuation of the basic tutorial present in the official CodeIgniter site. The tutorial had view and add data part. But, it didn’t contain the update and delete part. I have just added update and delete functionality in it.