Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Fixed ordered list prefix (MD029) - Group 14 #5688

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions _videos/fundamentals/add-a-javascript-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ It will illustrate how Magento 2 works with JavaScript files, executing the code
The steps we’ll need to take are:

1. Create a new module.
2. Create a requirejs-config.js and a JavaScript module file.
3. Create a layout update to add a template that will enable the JavaScript module.
4. Create a template file.
5. Add the module and test it.
1. Create a requirejs-config.js and a JavaScript module file.
1. Create a layout update to add a template that will enable the JavaScript module.
1. Create a template file.
1. Add the module and test it.

Let’s go through each step.

Expand All @@ -29,7 +29,13 @@ We will create a new module called Learning_Js:

```bash
cd <magento2_root>
```

```bash
mkdir app/code/Learning
```

```bash
mkdir app/code/Learning/Js
```

Expand Down Expand Up @@ -70,7 +76,13 @@ Next, we’ll create a view folder:

```bash
cd <magento2_root>
```

```bash
mkdir app/code/Learning/Js/view
```

```bash
mkdir app/code/Learning/Js/view/frontend
```

Expand All @@ -94,6 +106,9 @@ Then add the JavaScript module:

```bash
mkdir app/code/Learning/Js/view/frontend/web
```

```bash
mkdir app/code/Learning/Js/view/frontend/web/js
```

Expand Down Expand Up @@ -121,7 +136,13 @@ First, we need to create the layout folder:

```bash
cd <magento2_root>
```

```bash
mkdir app/code/Learning/Js/view/frontend
```

```bash
mkdir app/code/Learning/Js/view/frontend/layout
```

Expand All @@ -148,6 +169,9 @@ Now, we’ll create the template that will enable JavaScript.

```bash
cd <magento2_root>
```

```bash
mkdir app/code/Learning/Js/view/frontend/templates
```

Expand Down Expand Up @@ -180,7 +204,13 @@ Finally, let’s add our module and test the result.

```bash
cd <magento2_root>
```

```bash
bin/magento setup:upgrade
```

```bash
bin/magento cache:clean
```

Expand Down
35 changes: 25 additions & 10 deletions _videos/fundamentals/add-a-new-table-to-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ The install scripts run only once, while the upgrade scripts are executed every

To look at all four script types, we’ll complete the following greeting page tasks:

* Create a `greeting_message` table with the columns greeting_id and message.
* Add two records: “Happy New Year” and “Happy Holidays”.
* Modify the table by adding another field, “season”, to which we add the records “Happy Thanksgiving” and “Fall'”.
* Update the types for the first and second records.
* Create a `greeting_message` table with the columns greeting_id and message.
* Add two records: “Happy New Year” and “Happy Holidays”.
* Modify the table by adding another field, “season”, to which we add the records “Happy Thanksgiving” and “Fall'”.
* Update the types for the first and second records.

The steps we need to take to accomplish these tasks are:

1. Create a new module.
2. Create an InstallSchema script.
3. Create an InstallData script.
4. Add a new module and verify that a table with the data was created.
5. Create an UpgradeSchema script.
6. Create an UpgradeData script.
7. Run the upgrade scripts and verify that the table has changed.
1. Create an InstallSchema script.
1. Create an InstallData script.
1. Add a new module and verify that a table with the data was created.
1. Create an UpgradeSchema script.
1. Create an UpgradeData script.
1. Run the upgrade scripts and verify that the table has changed.

## Step 1: Create a new module

Expand All @@ -41,7 +41,13 @@ Navigate to the `app/code` folder and create the folders `Learning` and `Learnin

```bash
cd <magento2_root>/app/code
```

```bash
mkdir Learning
```

```bash
mkdir Learning/GreetingMessage
```

Expand Down Expand Up @@ -93,6 +99,9 @@ To create an InstallSchema script, navigate to the `app/code/Learning/GreetingMe

```bash
cd <magento2_root>/app/code/Learning/GreetingMessage
```

```bash
mkdir Setup
```

Expand Down Expand Up @@ -216,6 +225,9 @@ Run the `setup:upgrade` script to verify that a table with the initial data is t

```bash
cd <magento2_root>
```

```bash
php bin/magento setup:upgrade
```

Expand Down Expand Up @@ -380,6 +392,9 @@ Run the SetupUpgrade script again:

```bash
cd <magento2_root>
```

```bash
php bin/magento setup:upgrade
```

Expand Down
25 changes: 17 additions & 8 deletions _videos/fundamentals/add-new-product-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ This is quite a broad topic, but in this video we will discuss the simple proces

For this exercise, assume that the sample data set is installed.

* We will add an attribute called clothing_material with the possible values: Cotton, Leather, Silk, Denim, Fur, and Wool.
* We will make this attribute visible on the product view page, in bold text.
* We will assign it to the Default attribute set and add a restriction that any “bottom” clothing, like slacks, cannot be the material Fur.
* We will add an attribute called clothing_material with the possible values: Cotton, Leather, Silk, Denim, Fur, and Wool.
* We will make this attribute visible on the product view page, in bold text.
* We will assign it to the Default attribute set and add a restriction that any “bottom” clothing, like slacks, cannot be the material Fur.

We will need to take the following steps to add the new attribute:

1. Create a new module.
2. Add an InstallData script.
3. Add a source model.
4. Add a backend model.
5. Add a frontend model.
6. Execute the InstallData script and verify that it works.
1. Add an InstallData script.
1. Add a source model.
1. Add a backend model.
1. Add a frontend model.
1. Execute the InstallData script and verify that it works.

Let’s go through each step.

Expand All @@ -35,7 +35,13 @@ As Magento is modular based, we start the process by creating a new module calle

```bash
cd <magento2_root>/app/code
```

```bash
mkdir Learning
```

```bash
mkdir Learning/ClothingMaterial
```

Expand Down Expand Up @@ -313,6 +319,9 @@ Now we can run our code and check the results:

```bash
cd <magento2_root>
```

```bash
php bin/magento setup:upgrade
```

Expand Down
24 changes: 12 additions & 12 deletions _videos/fundamentals/create-a-new-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Module is a structural element of Magento 2 – the whole system is built upon m
To create a module, you need to complete the following high-level steps:

1. Create the module folder.
2. Create the `etc/module.xml` file.
3. Create the `registration.php` file.
4. Run the `bin/magento setup:upgrade` script to install the new module.
5. Check that the module is working.
1. Create the `etc/module.xml` file.
1. Create the `registration.php` file.
1. Run the `bin/magento setup:upgrade` script to install the new module.
1. Check that the module is working.

Let’s go through each of these steps in detail.

Expand All @@ -36,18 +36,18 @@ Each module name in Magento 2 consists of two parts – the vendor and the modul
Let’s create the folder app/code/Learning and inside this folder place another folder: FirstUnit. If you're using the command line, the code would be:

1. `cd` to the root folder
2. `mkdir app/code/Learning`
3. `mkdir app/code/Learning/FirstUnit`
1. `mkdir app/code/Learning`
1. `mkdir app/code/Learning/FirstUnit`

## Make sure you have permission to create files and folders in your installation

Next, you need to create an `etc/module.xml` file. This file is required for the module to exist.

This file contains the following information:

* Module name
* Module version
* Dependencies
* Module name
* Module version
* Dependencies

Module name is defined by the folders we just created, because in Magento 2, class names must follow the folder structure. Because we created the folders `Learning/FirstUnit`, our module name will be `Learning_FirstUnit` and all classes that belong to this module will begin with `Learning\FirstUnit` – for example: `Learning\FirstUnit\Observer\Test`.

Expand All @@ -74,9 +74,9 @@ Then put the following code into it:

Note that in the XML file we specified:

* Module name: `Learning_FirstUnit` (based on the folders we created)
* Version: 0.0.1 (initial version of our module)
* Dependency: Magento_Catalog. We could have multiple dependencies. In this case, we would put `<module name=”..” />` nodes under the sequence node.
* Module name: `Learning_FirstUnit` (based on the folders we created)
* Version: 0.0.1 (initial version of our module)
* Dependency: Magento_Catalog. We could have multiple dependencies. In this case, we would put `<module name=”..” />` nodes under the sequence node.

## Create the registration.php file

Expand Down
36 changes: 27 additions & 9 deletions _videos/fundamentals/create-a-new-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ title: "Create a New Page"
thumbnail: "fundamentals/thumbs/create-new-page.png"
menu_order: 1
---

In this video on how to create a new page, we’ll create a page which returns JSON with one parameter: the message “HELLO WORLD!”

To add a new page in Magento 2, you need to create a new controller. In Magento 2, a controller is a file located at a specific place which responds to a specific route. A route in Magento 2 is a standard URL that consists of three parts:

* frontName
* controllerName
* actionName
* frontName
* controllerName
* actionName

We’ll look at how those three parts of a route correspond to a certain file.

So the steps we need to take to add a new page are:

1. Create a new module.
2. Add a routes.xml file.
3. Add a controller (action) file.
1. Add a routes.xml file.
1. Add a controller (action) file.

To create a module, you need to complete the following high-level steps:

1. Create the module folder.
2. Create the etc/module.xml file.
3. Create the registration.php file.
4. Run the “bin/magento setup:upgrade” script to install the new module.
5. Check that the module is working.
1. Create the etc/module.xml file.
1. Create the registration.php file.
1. Run the “bin/magento setup:upgrade” script to install the new module.
1. Check that the module is working.

Let’s go through each step.

Expand All @@ -38,7 +39,13 @@ We will create a new module called `Learning_HelloPage`

```bash
cd <magento2_root>/app/code
```

```bash
mkdir Learning
```

```bash
mkdir Learning/HelloPage
```

Expand All @@ -50,6 +57,7 @@ Learning/HelloPage/etc/module.xml
```

### registration.php

```php
<?php /**
* Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
Expand All @@ -60,6 +68,7 @@ __DIR__
```

### module.xml

```xml
<?xml version="1.0"?>
<!--
Expand Down Expand Up @@ -108,7 +117,13 @@ Let’s add the controller now.

```bash
cd <magento2_root>/app/code/Learning/HelloPage
```

```bash
mkdir Controller
```

```bash
mkdir Controller/Page
```

Expand Down Expand Up @@ -155,6 +170,9 @@ Note we created a JSON-type page. This can be seen in the results factory that w

```bash
cd <magento2_root>
```

```bash
php bin/magento setup:upgrade
```

Expand Down
10 changes: 5 additions & 5 deletions guides/v2.2/advanced-reporting/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Magento collects data and sends this information to the MBI for analytics.
## Prerequisites

1. The website must run on a public web server.
2. The domain must have a valid security (SSL) certificate.
3. Magento must have been installed or upgraded successfully without error.
4. In the Magento configuration, the [Base URL (Secure) setting][base url]{:target="_blank"} for the store view must point to the secure URL. For example https://yourdomain.com.
5. In the Magento configuration, **Use Secure URLs on Storefront**, **and Use Secure URLs in Admin** must be set to **Yes**.
6. Make sure that [Magento crontab]{:target="_blank"} is created and cron jobs are running on the installed server.
1. The domain must have a valid security (SSL) certificate.
1. Magento must have been installed or upgraded successfully without error.
1. In the Magento configuration, the [Base URL (Secure) setting][base url]{:target="_blank"} for the store view must point to the secure URL. For example https://yourdomain.com.
1. In the Magento configuration, **Use Secure URLs on Storefront**, **and Use Secure URLs in Admin** must be set to **Yes**.
1. Make sure that [Magento crontab]{:target="_blank"} is created and cron jobs are running on the installed server.

The merchant can now click on the Go to Advanced Reporting button on the Admin dashboard to launch the advanced reporting features at `https://advancedreporting.rjmetrics.com/report`.

Expand Down
Loading