Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5394 Lượt xem

  Hello,

  I want to know about all over the process of Website Product Attribute's Filters. When any user selects any attributes on the shop page at that time how that form will submit and from where (which code) it got the appropriate results. I just check the code from the 'website_sale' module. In that, only write the code to submit the form but from where it will get the results. 

  Can anyone help me to explain this process?

 


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

when you change the product attribute filter it changes the query string of the url and the browser requests a new page with a selected attribute by query string.  
website sale controller create render the page with provided attribute and return it to browser 
ref:  https://github.com/odoo/odoo/blob/12.0/addons/website_sale/controllers/main.py#L214

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks, I understood that. Can you please tell me from which specific code it create a query string of URL according to the selected attribute.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
1546
1
thg 5 25
998
2
thg 5 25
1642
1
thg 7 24
3421
0
thg 8 24
341