https://docs.magento.com/m2/ce/user_guide/cms/widget-new-products-list.html
New Products List
The list of new products is an example of dynamic content, and consists of live data that is pulled from your product catalog. By default, the “New Products” list includes the first eight of the most recently added products. However, it can also be configured to include only products within a specified date range.
新製品リストは動的コンテンツのサンプルで、商品カタログから引っ張られるデータを含みます。標準で「新製品」リストは最新8商品を含みます。しかし、特定の範囲の商品のみ含むように構成することもできます。
Step 1: Set the Date Range for Each Product
商品の日付指定
To make a product appear in the list by date range, the “New From” dates must be entered in the product. The product then appears in the New Products list during the date range specified.
1. | On the Admin sidebar, tap Products. Then under Inventory, choose Catalog.
カタログ>productsで商品一覧を表示 |
2. | Find each product that you want to feature, and open in edit mode. Then, do the following:
取り上げる商品を選択し、編集モードで開く |
a. | In the Set Product as New From field, tap the calendar (). Then, choose the first date that you want the product to be featured.
[ 商品を新しいものから設定する]の項目で、カレンダーを押し、いつからこの商品が取り上げられるかを指定する |
b. | In the To field, tap the calendar (). Then, choose the last date that you want the product to be featured.
いつまでかを指定する |
3. | When complete, tap Save.
保存 |
4. | When you are prompted to reindex and refresh the page cache, click the links at the top of the workspace, and follow the instructions.
|
The list of products now appears on the Home Page for the specified date range.
ウィジェット作成
The code that determines the content of the New Products list and its placement in your store is generated by the Widget tool.
1. | On the Admin sidebar, tap Content. Then under Elements, choose Widgets.
コンテンツ>構成>ウィジェット |
2. | In the upper-right corner, tap Add Widget.
右上部の「ウィジェットを追加」 |
3. | In the Settings section, do the following: |
a. | Set Type to “Catalog New Products List.”
「新着商品リスト」 |
b. | Choose the Design Theme that is used by the store. |
4. | Tap Continue. |
5. | In the Storefront Properties section, complete the following fields: |
-
Widget Title
Enter a descriptive title for your widget. This title is visible only from the Admin.
Assign to Store Views
Select the store views where the widget will be visible. You can select a specific store view, or “All Store Views.”
特定のストアビューか「全てのストアビュー」
Sort Order
(Optional) Enter a number to determine the order this items appears with others in the same part of the page. (0 = first, 1 = second, 3= third, and so on.)
場所を指定
1. | In the Layout Updates section, tap Add Layout Update. Then, do the following: |
a. | Set Display On to “Specified Page.”
「特定のページ」 |
b. | Set Page to “CMS Home Page.”
「CMSホームページ」 |
c. | Set Block Reference to “Main Content Area.”
「Main Content Area」 |
d. | Set Template to one of the following: |
- New Product List Template
- New Products Grid Template
2. | Tap Save and Continue Edit.
「保存して編集を続ける」 |
For now, you can ignore the message to refresh the cache.
1. | In the panel on the left, choose Widget Options. Then, do the following:
「ウィジェットオプション」 |
2. | Set Display Products to one of the following: |
-
All Products
Lists products in sequence, starting with those most recently added.
New Products
Lists only the products which are identified as “New.” A product is considered to be new during the date range that is specified in the “Set Product As New From/To” fields. The list will be empty if the date range expires without any new products defined.
3. | Complete the remaining information as follows: |
a. | To provide navigation control for lists with multiple pages, set Display Page Control to “Yes.” Then, in the Number of Products per Page field, enter the number of products you want to appear on each page.
「ページコントロールを表示」をYes。「1ページあたりの商品表示件数」に必要な数。 |
b. | Set Number of Products to Display to the number of new products that you want to include in the list. The default setting is 10.
「商品表示点数」は初期値10 |
c. | In the Cache Lifetime (Seconds) field, choose how often you want to refresh the list of new products. By default, the cache is set to 86400 seconds, or 24 hours. |
4. | When complete, tap Save. |
5. | When prompted to refresh the cache, click the link in the message at the top of the workspace, and follow the instructions. |
作業のプレビュー
1. | On the Admin sidebar, tap Content. Then under Elements, choose Pages.
コンテンツ>構成>ページ |
2. | Find the page in the grid where the New Products list is to appear. Then, in the Action column, click the Preview link.
新商品が表示さえるページを探して、「アクション」列で「表示」 |
コメントは受け付けていません。