Opencart feed - 只接受价格超过80的产品

时间:2016-02-15 16:03:57

标签: php opencart opencart-module

我希望Opencart google base feed模块只接受价格超过80的产品。这样,opencart所有者只能推广价值和利润更高的产品

我怎么能这样做?我认为这个问题对于更多的opencart用户可能是有益的。

感谢任何帮助:)

proxyTcs.SetException(faultedTask.Exception.InnerExceptions);

1 个答案:

答案 0 :(得分:0)

好的,所以既然你不能编辑查询本身......这是处理它的一种方法..

....
foreach ($products as $product) {
    //Calculate the product's price, including tax.
    $priceCalc = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id']), $currency, false, false);

    //Check if the price, (in the current currency), is higher or equal to 80.
    if ($product['description'] && $priceCalc >= 80) {
      //continue if true..
      $output .= '<SHOPITEM>';
      $output .= '<ITEM_ID>' . $product['product_id'] . '</ITEM_ID>';
....