To accomplish this, for the pre-order items I set the product's out-of-stock message to "Pre-Order" instead of the default setting. (Whatever non-default message you select will be displayed.) I also set the stock to whatever my incoming stock will be. Then I altered catalog/controller/product/product.php as follows:
Find this:
Code: Select all
if ($product_info['quantity'] <= 0) {
$this->data['stock'] = $product_info['stock'];
} else {
if ($this->config->get('config_stock_display')) {
$this->data['stock'] = $product_info['quantity'];
} else {
$this->data['stock'] = $this->language->get('text_instock');
}
}
Code: Select all
if ($product_info['quantity'] <= 0) {
$this->data['stock'] = $product_info['stock'];
} else {
if ($this->config->get('config_stock_display')) {
$this->data['stock'] = $product_info['quantity'];
} else {
if ($product_info['stock_status_id'] == $this->config->get('config_stock_status_id')) {
$this->data['stock'] = $this->language->get('text_instock');
} else {
$this->data['stock'] = $product_info['stock'];
}
}
}
(1) If stock is zero and out-of-stock is the default, shows the default "Out Of Stock" text
(2) If stock is zero and out-of-stock is not the default, shows product's OOS text
(3) If stock is 1 or more and out-of-stock is the default, shows "In Stock" text
(4) If stock is 1 or more and out-of-stock is not the default, shows the product's OOS text
This doesn't completely resolve pre-ordering needs, but it at least gives a better availability status. I hope its helpful to others who take pre-orders.