20.10.2016

How To Remove The “Position” Sort Option!!!

You need override block “Mage_Catalog_Block_Product_List_Toolbar” with the following code:

 

29.08.2016

Installing and configuring xDebug (for using with PHP Storm)

Install xDebug via console Linux:

Configure xDebug (add next content to file “/etc/php5/mods-available/xdebug.ini” after string “zend_extension=….”). You can use any installed editor to do it (nano, vim, etc):

Restart APACHE:

Install Google Chrome extension “xDebug helper” from here.
Configure PHP Storm (for each projects):

File -> Settings -> Languages & Frameworks -> PHP -> Servers:

Press “+”;

Name: {your_project_name}.dev;

Host: {your_project_name}.dev;

Port: 80 (or 443 if it requires);

Debugger: Xdebug

Press Apply

Run -> Edit Configurations…:

Press “+”;

Choose PHP Web application;

Name: {your_project_name}.dev;

Server: {your_project_name}.dev (choose from list);

Press Apply

01.08.2016

Magento 2. Magento Backend. Part IV.

Creating a grid of a database table

(We need the module that we created in the previous recipes)
 

STEP I – Adding the ACL for grid page:

Change the file:

app/code/Magedd/Education/etc/acl.xml
Add the following line of code as a child of the <resource id=”Magento_Backend::admin”>:

More

29.07.2016

Magento 2. Magento Backend. Part III.

Adding configuration parameters

(We need the module that we created in the previous recipes)
 
When you want to save some configuration parameters for your module, you can use the Magento configuration table to save your configuration in it. You can find all the configuration forms under Stores | Configuration in the Magento backend.

More

29.07.2016

Magento 2. Magento Backend. Part II.

Extending the menu

(This recipe builds further on the previous one)

STEP I – Create the menu:

Create the file:

app/code/Magedd/Education/etc/adminhtml/menu.xml

More

29.07.2016

Magento 2. Magento Backend. Part I.

Registering a backend controller

STEP I – Remove the secret key:

 
For development purposes, it is recommended that we remove the secret key:

Stores | Configuration | Advanced | Admin | Security

Set Add Secret Key to URLs to No

More

29.07.2016

Magento 2. Databases and modules.

Programmatically adding product attributes

(We need the module that we created in the previous recipes)
 

STEP I – Create an upgrade script:

Create the file:

app/code/Magedd/Education/Setup/UpgradeData.php

More

29.07.2016

Magento 2. Databases and modules.

Working with Magento 2 collections

(We need the module that we created in the previous recipe – Creating a flat table with models)

 

STEP I – Create a Collection controller action:

Create the file:

app/code/Magedd/Education/Controller/Index/Collection.php

More

28.07.2016

Magento 2. Creating a module. Part IV.

(We need the module that we created in the previous recipes)

Creating a flat table with models

STEP I – Create a resource model:

Create folders:

app/code/Magedd/Education/Model

app/code/Magedd/Education/Model/ResourceModel

 

Create the file:

app/code/Magedd/Education/Model/ResourceModel/Subscription.php

More

27.07.2016

Magento 2. Creating a module. Part III.

(We need the module that we created in the previous recipes)

Adding a block with new products

STEP I – Create the block class:

Create a folder:

app/code/Magedd/Education/Block

 

Create a file:

app/code/Magedd/Education/Block/Newproducts.php

More