Woocommerce产品搜索栏在Ionic V 1

时间:2019-11-02 19:04:10

标签: ionic-framework woocommerce wordpress-rest-api woocommerce-rest-api

我想按名称搜索产品,但结果始终显示两个产品,而不仅仅是一个产品。我该如何解决?我将其余API与woocommerce一起使用。我用的是Ionic V1。

我尝试过如上。搜索栏正在工作,但是当我按名称搜索时,它显示两个结果,不仅是一个产品结果。我该怎么做?我只想搜索具有该名称的特定产品。我用的是Ionic V1。


<ion-list class="list card" style="border-radius: 30px;">
        <div class="item item-input">
            <i class="icon ion-search placeholder-icon"></i>
           <input type="search" ng-model="filter_products.name" placeholder="{{ 'Search' | translate }}" aria-label="filter products.name" style="color: #ff7200;" />
        </div>
    </ion-list>

   <div class="list row" ng-repeat="rows in chunked_products | filter:filter_products as result" ng-init="$last ? fireEvent() : null">
    <div class="col card" ng-repeat="item in rows" style="border-radius: 30px 0px 30px 0px;">
             <a class="item item-image ink" ng-href="#/library_to_door/product_singles/{{item.id}}">
            <img alt="" class="ratio1x1" ng-src="{{item.featured.thumbnail}}" />
        </a>

        <div class="item item-text-wrap" >
          <span ng-bind-html="item.name | to_trusted" style="color: #ffffff;">{{product.name}}</span>
            <strong class="calm" style="color: #ffffff;">{{ item.price | currency:"Ks":2 }}</strong><br/>
          <span style="color: #ff7200;">{{product.rating}}</span>
        </div>

我希望搜索栏按名称显示准确的产品结果。这是Ionic V1

0 个答案:

没有答案