เกี่ยวกับบทเรียน
Attribute Set คือ Set ข้อมูลของสินค้านั้น ๆ และ Attribute Set จำเป็นจะต้องมีส่วนประกอบภายใน Set นั้น ๆ ที่เรียกว่า “Product Attribute” เช่น สี ไซส์ แบรนด์
วิธีสร้าง Attribute
- เข้าไปที่ Stores -> Product
2. คลิก Add New Attribute เพื่อเพิ่ม Product Attributes
ยกตัวอย่างการเพิ่ม Attribute ไซส์ของเสื้อผ้า
แท็บ Properties
- Default Label : เป็นการตั้งชื่อ field ข้อมูลซึ่งจะไปแสดงในหน้าสินค้า
- Catalog Input Type for Store Owner : เลือก Dropdown ซึ่ง Dropdown/Visual Swatch/Text Swatch จะสามารถนำไปใช้เพื่อเป็น Configuration Products ได้
- Manage Options (Values of Your Attribute) : ใส่ size ที่ต้องการ
- Attribute Code : เป็นภาษาอังกฤษตัวเล็กไม่มีช่องว่าง ใช้ _ เชื่อม ความยาวไม่เกิน 60 ตัวอักษร
- Scope : เลือก Global
แท็บ Manage Labels
- Manage Titles : ใส่ชื่อของ Attribute โดยในส่วนนี้ชื่อที่ใส่จะเป็นชื่อของ Attribute ที่แสดงบนเว็บไซต์
แท็บ Storefront Properties
- Use in Search : เลือก Yes
- Visible in Advanced Search : เลือก Yes
- Comparable on Storefront : เลือก Yes ถ้าต้องการให้สามารถ Compare สินค้าได้
- Use in Layered Navigation : เลือก Yes เพื่อให้สามารถ Filter บนหน้าเว็บไซต์ได้
- Visible on Catalog Pages on Storefront : เลือก Yes เพื่อให้โชว์รายละเอียดสีที่หน้าสินค้า
วิธีสร้าง Attribute Set
1.เข้าไปที่ Stores -> Attribute Set
2. คลิก Add Attribute Set
3.ตั้งชื่อและเลือกให้ดึงข้อมูลของ Attribue Set ไหนมาอ้างอิง
4.จะเห็นได้ว่า Product Attribute จะอยู่ในช่อง Unassigned Attributes
ให้ทำการลาก Attribue ไปไว้ในช่อง Groups หากต้องการเอาออกก็ให้ลากกลับมาที่ Unassigned Attributes