Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
3714 มุมมอง

Hi Community


I want to remove the search box on the "/shop" page because I already have an Search box in the header.


I searched in the views and i found "website_sale.search" this probably where this box came frome. The search is also on the product website and is left next to the price list.


Code:

https://www\\.paste\\.org/flat/126306

And\ here\ a\ image\ from\ the\ searchbox:


https://pasteboard.co/QACIU8PvcH3R.jpg 



What is the best way to hide this box?


Thank you for your help.



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Enable debug mode, Open the shop page and go to Site -> HTML/CSS Editor


Choose the SCSS(CSS) option from the drop down.


Type in this code and save. It will hide the search box.


Hope it helps

อวตาร
ละทิ้ง
ผู้เขียน

Hi thank you for this answer. Yes this removes also the sort options. I only want to remove the search field. Do you have also a solution for this?

Best Regards

คำตอบที่ดีที่สุด

Hello Marc Walter

-> Enable debug mode, Open the shop page, and go to Site -> HTML/CSS Editor

-> Choose the XML(HTML) option from the drop-down Menu.

-> Search for "Search Box"

-> Edit the code:

Disable the code from the second line till the end of the second last line using "less than exclamation mark minus minus" and  "minus minus more than symbol".


This is not recommended by Odoo though because the changes may be lost at the time of upgrade to the version of Odoo.

Thanks 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Inherit 'website.website_search_box' this view and replace it with blank or add the css for hide this search box

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi Gaurav

I have never done something like this. Can you make some more explanation wheren I have to inerhit which view? Or can you give me the sample css code? Maybe Printscreen?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
6275
1
มี.ค. 15
7246
2
มี.ค. 24
1909
0
ธ.ค. 23
1822
1
พ.ย. 22
2285