Skip to content

Instantly share code, notes, and snippets.

@alexmorco
alexmorco / Magento2Theme.md
Last active May 15, 2018 14:55
Create Custom Theme in Magento 2, Originally Published at: (https://www.cloudways.com/blog/create-custom-theme-magento-2-part-1/)

The theme is a component of Magento 2 which gives a consistent look and feel to your whole store. It gives an improved look to areas like Magento 2 Admin and Storefront by utilizing a combination of custom templates, designs, styles or images development.

By default, there are 2 Magento themes – Luma and Blank – that you can see after installing Magento 2 successfully. Luma is a demonstration theme, and Blank is a basis for custom theme creation.

In Magento 2, there are no restrictions on using the Luma theme for your live store. However, if you want to customize the default design or if you need to create your own theme, Magento strongly recommends not to change or edit the default Luma and Blank theme files. Many people ask why Magento does not allow to change or edit Luma and Blank theme files? The answer is: when you change or edit the default files, your changes can be overwritten by the latest version of t

@alexmorco
alexmorco / MagentoPaypal.md
Last active April 26, 2018 13:40
Integrate Paypal with Magento Store, Published Guide: https://www.cloudways.com/blog/magento-paypal-integration/

PayPal is one of the most popular payment processing company, offering fast, easy and secure ecommerce payment solutions. With the integration of PayPal module into Magento platform, you can receive payments from PayPal accounts, as well as any credit or debit card. In short, it is not necessary for your buyers to have a PayPal account only. It is an all-in-one solution benefiting both you and the online shoppers.

The good news is that setting up PayPal with Magento stores is easy. The steps are easy to follow and you could have the integration up and run within minutes. If you don’t have a Magento store set up on Cloudways, click below and signup right now.

First of all, login to your Magento admin panel.

Navigate to System > Configuration.

@alexmorco
alexmorco / SetupScript.md
Last active April 12, 2018 12:55
Setup Script For Magento 2 For Custom Module : https://www.cloudways.com/blog/setup-scripts-in-magento-2/

If you’re a Magento extension developer, there’s a chance that at some point you’ll want the extension to create and delete records from the database. You might even want to add more tables to the database or new columns to the table when you upgrade the module version. Such are the cases when Setup scripts can come in handy.

Setup scripts in Magento 2 are essential when writing custom modules. There are many differences between how these scripts are handled in Magento 2 and Magento 1. In Magento 2, we have 6 different types of Setup Scripts that can be used with our custom modules:

  • InstallSchema
  • UpgradeSchema
  • InstallData
  • UpgradeData
  • Recurring
  • Uninstall
@alexmorco
alexmorco / Magento2CLI.md
Last active April 12, 2018 11:49
Add Custom CLI Commands In Magento 2

The new command line interface (CLI) enables Magento developers to use default command provided by Magento modules. Using this, developers could manage modules, carry our database updates, manage indexes and generate classes.

The great thing is that Magento developers could now add custom CLI commands to their modules. While this is great, developers should always make sure that they observe the best code writing standards as defined by the Magento dev community.

Add a CLI Command

The process of adding a new CLI command is simple. In this tutorial, I will not go into the details of creating a Magento 2 module.

Just create a simple module Cloudways_Commandline with etc/module.xml and registration.php files included in the root of module’s directory.

@alexmorco
alexmorco / Magento2Composer.md
Last active March 1, 2018 14:37
Install Latest Magento 2 Version Using Composer

Magento 2 was introduced a while back and has already created quite a buzz in the ecommerce industry. Online merchants have already started installing and setting up their e-stores before the holiday season rush. If you are wondering how you can easily install Magento 2 on Cloudways, then follow this simple, step-by-step guide on installing Magento 2 using Composer.

#H1 Prepare your server for Magento 2 installation.

Step 1: Login to Cloudways with your Username and Password. Signup on Cloudways, if you don’t have an account yet.

Cloudways Login