I would like to be able to display a short message if my cart has pre-orders.
Currently it is showing the Out of Stock default message since stock is 0. I would like you guys to help me, if you can, edit the function responsible for this so if my stock status is set to pre-order, it will show the pre-order text and now the default out of stock text.
as far as I know the function controlling this is this one:
Code: Select all
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} elseif (!$this->cart->hasStock() && (!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning'))) {
$this->data['error_warning'] = $this->language->get('error_preorder');
} else {
$this->data['error_warning'] = '';
}
Code: Select all
$_['error_stock'] = 'Products marked with *** are not available in the desired quantity or not in stock!';
$_['error_preorder'] = 'You have Pre-Orders in you cart. Products marked as Pre-Orders will be delivered upon game release. Please see <a href="http://www.gamers-outlet.net/terms_and_conditions">Terms & Conditions</a> for more information';
if the stock is 0 and status is pre-order, display the error_preorder as an attention message (the yellow background)
I'm using OC 1.5.5.1, can this be done?
Thanks.