HUSKY - Products Filter Professional for WooCommerce

[woof_quick_search_results]

Should be activated extension快速搜索

  • per_page – 每页产品数
  • template_result – 应定义,并且有 5 个预定义模板: list_1 | list_2 | list_3 | grid_1 | grid_2。还可以创建自定义模板(阅读下文) 并使用它。创建文件夹 'woof_qs_templates‘ 在当前 WordPress 主题中 -> 在此处放置任何预定义的模板,您可以在其中找到 wp-content\plugins\woocommerce-products-filter\ext\quick_search\views\templates OR 下载 将此自定义模板作为示例 -> 按需自定义 CSS -> 在 template_result 属性中写入值,例如:‘custom/custom_1‘ – 这里第一个词是 ‘custom‘ 必须是,然后 ‘/”然后是模板所在文件夹的名称
  • always_show_products – (1/0) 如果为 1,则始终显示产品,如果为 0 – 则仅在进行搜索请求时显示产品
  • template_structure – 5 个可以在模板中显示的字段。示例: img,title,price,sku,key_words – 对于网格模板部分有效。
  • orderby – 默认排序 (title-asc)。可能的值: title-asc | title-desc | price-asc | price-desc
  • header_text - 模板标题。默认为空字符串。

Example: [woof_quick_search_results template_result=’grid_1′ always_show_products=1 per_page=9 template_structure=’title,img,price,key_words’ orderby=’price-desc’ header_text=”My Products”]

Works ONLY with shortcode: [woof_quick_search] 并显示搜索结果


可能的钩子:


如何创建自定义模板:(面向高级用户)

  • 下载 此自定义模板
  • 创建文件夹“woof_qs_template‘ 在当前 WordPress 主题中
  • unpack downloaded file and upload template
  • 打开文件 woof_qs_template/custom_1/output.php 并根据需要更改其结构,当然也要更改所需的 CSS woof_qs_template/custom_1/css/ custom_1.css 
  • 模板中的特殊键和类: 
  • 1,2,3,4 – 模板的必需类。 woof_qs_result – 包裹模板容器的类
  • woof_qs_container – 元素(产品)必须插入的容器的类。
  • woof_qs_item – 项目类(产品)
  • woof_qs_no_products_item – 搜索中没有产品时的项目类
  • 5 – 以下拉列表的形式显示按价格和标题排序
  • 6 – Displays sorting by title
  • 7 – 按价格排序
  • 8,9 – 显示分页
    • __SRC__ – in tag <img /> generate sttaribute ‘src‘ 及其值。示例: src=’http://site.com/uploads/image.png’
    • __IMG__ – 生成产品图片
    • __URL__ – 产品页面的 URL
    • __TARGET__ – target value for the link, can be _self OR _blank (在新标签页打开)
    • __TITLE__ – 产品标题
    • __PRICE__ – 产品价格
    • __SKU__ – 产品的 SKU
    • __KEY_WORDS__ - 包含在产品中的分类法的名称(它们也用于基于文本的搜索