Choosing which Products to import in Prestashop

Control whether to show products that are out-of-stock or otherwise not saleable

You can configure the PrestaShop module to send all products to, instead of only the saleable ones as it does per default.

To do this, start by finding this file in FTP:


In the function getJsonResponse() locate this line:

$products = $product->getProducts($this->getLanguageId(), $this->offset, $this->limit, $this->order_by, $this->order, false, false);

Simply change the very last argument from true to false.

If you do this, we strongly recommend that you also add an extra attribute to this file, which indicates when a product is not saleable, so you can show it in your Design.

Assuming you create an attribute called is_saleable which is either true or false, you can use it like this in Designs:

{% raw %}
{% if product.is_saleable %}
   <div class="in-stock">In Stock</div>
{% else %}
  <div class="not-in-stock">Not In Stock</div>
{% endif %}
{% endraw %}

Finally, go to -> Data and click Start New Sync to import your new data.