เนื้อหาของคอร์ส
สินค้าและการลงสินค้า
แนะนำเกี่ยวกับ Attribute และการลงสินค้าในรูปแบบต่างๆ รวมถึงการจัดการหมวดหมู่สินค้า
0/6
วิธีการแก้ไข Template Email
0/1
คู่มือการใช้งานระบบ Box Calculator for Magento 2
0/1
โปรโมชั่น / คูปอง
Cart Price Rules = คูปองหรือโปรโมชั่น Catalog Price Rules = โปรโมชั่น
0/3
Magento 2: Basic
เกี่ยวกับบทเรียน

Attribute Set คือ Set ข้อมูลของสินค้านั้น ๆ และ Attribute Set จำเป็นจะต้องมีส่วนประกอบภายใน Set นั้น ๆ ที่เรียกว่า “Product Attribute” เช่น สี ไซส์ แบรนด์

วิธีสร้าง Attribute

  1. เข้าไปที่ Stores -> Product

วิธีการสร้าง Attribute และ Attribute Set Magento 2

 

     2. คลิก Add New Attribute เพื่อเพิ่ม Product Attributes

ยกตัวอย่างการเพิ่ม Attribute ไซส์ของเสื้อผ้า

 

แท็บ Properties

  1. Default Label : เป็นการตั้งชื่อ field ข้อมูลซึ่งจะไปแสดงในหน้าสินค้า
  2. Catalog Input Type for Store Owner : เลือก Dropdown ซึ่ง Dropdown/Visual Swatch/Text Swatch จะสามารถนำไปใช้เพื่อเป็น Configuration Products ได้
  3. Manage Options (Values of Your Attribute) : ใส่ size ที่ต้องการ
  4. Attribute Code : เป็นภาษาอังกฤษตัวเล็กไม่มีช่องว่าง ใช้ _ เชื่อม ความยาวไม่เกิน 60 ตัวอักษร
  5. Scope : เลือก Global

วิธีการสร้าง Attribute และ Attribute Set Magento 2

แท็บ Manage Labels

  1. Manage Titles : ใส่ชื่อของ Attribute โดยในส่วนนี้ชื่อที่ใส่จะเป็นชื่อของ Attribute ที่แสดงบนเว็บไซต์

แท็บ Storefront Properties

  1. Use in Search : เลือก Yes
  2. Visible in Advanced Search : เลือก Yes
  3. Comparable on Storefront : เลือก Yes ถ้าต้องการให้สามารถ Compare สินค้าได้
  4. Use in Layered Navigation : เลือก Yes เพื่อให้สามารถ Filter บนหน้าเว็บไซต์ได้
  5. Visible on Catalog Pages on Storefront : เลือก Yes เพื่อให้โชว์รายละเอียดสีที่หน้าสินค้า

วิธีการสร้าง Attribute และ Attribute Set Magento 2

วิธีสร้าง Attribute Set

1.เข้าไปที่ Stores -> Attribute Set

วิธีการสร้าง Attribute และ Attribute Set Magento 2

2. คลิก Add Attribute Set

วิธีการสร้าง Attribute และ Attribute Set Magento 2

3.ตั้งชื่อและเลือกให้ดึงข้อมูลของ Attribue Set ไหนมาอ้างอิง

วิธีการสร้าง Attribute และ Attribute Set Magento 2

 

4.จะเห็นได้ว่า Product Attribute จะอยู่ในช่อง Unassigned Attributes 

ให้ทำการลาก Attribue ไปไว้ในช่อง Groups หากต้องการเอาออกก็ให้ลากกลับมาที่ Unassigned Attributes

วิธีการสร้าง Attribute และ Attribute Set Magento 2