Odoo 12ce
I have a website, with products under various eCommerce categories:
All Products
Cat 1
Cat 1a
Cat 1b
Cat 2
Cat 2a
Cat 2b
Cat 3
etc.
When I go to the the https://www.myodoosite.com/shop page, I get all the products.
When I go to https://www.myodoosite.com/shop/category/Cat_1a I see all of the products in "Cat 1a".
When I go to https://www.myodoosite.com/shop/category/Cat_1b I see all of the products in "Cat 1b".
I would like to go to https://www.myodoosite.com/shop/category/Cat_1 and see all of the products in all of the subcategories (Cat 1, Cat 1a, Cat 2b).
How can I do this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi Russ:
You can use eCommerce categories to do this.
Go to Website > Configuration > eCommerce Categories.
Create the required hierarchy of categories and associate these eCommerce categories with your products in the eCommerce tab of the product template.
Then go to the shop page of your website in developer mode and turn on the "eCommerce Categories" toggle button in the "Customize" menu. (NOTE: You need to be on the Shop page for this toggle button to be visible)
Now you will get the hierarchy of the categories displayed on the left and if you pick the parent category it will display all the products in that eCommerce category and its sub-categories.
You can use child_of operator in domain.
Something like: self.env['product_model_name'].search([('category_ids', 'child_of', category_id)])
Read more: https://www.odoo.com/documentation/12.0/reference/orm.html#domains
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
4
thg 2 25
|
4213 | ||
|
0
thg 10 22
|
1876 | ||
|
2
thg 6 20
|
3754 | ||
|
1
thg 7 19
|
4391 | ||
|
2
thg 7 25
|
6283 |