I don't know why only the cart quantity was added but not the product quantity in stock while it has been used only within the cart library to compare the results. This topic should be moved to the feature requests section since this is a pretty good one.
The following modifications would be on a core file so I would suggest to make a backup before applying this.
In your system/library/cart.php file,
find:
add right below:
Code: Select all
'product_quantity' => (int)$product_query->row['quantity'],
Then, in your catalog/controller/checkout/cart.php file,
find:
Code: Select all
$this->data['column_quantity'] = $this->language->get('column_quantity');
add below:
Code: Select all
$this->data['column_product_quantity'] = $this->language->get('column_product_quantity');
Then, find:
Code: Select all
'quantity' => $product['quantity'],
add below:
Code: Select all
'product_quantity' => $product['product_quantity'],
Then, in your language/english/checkout/cart.php file,
find:
Code: Select all
$_['column_quantity'] = 'Quantity';
add after:
Code: Select all
$_['column_product_quantity'] = 'Left In Stock';
Then, in your catalog/view/theme/x/template/checkout/cart.tpl file,
find:
Code: Select all
<td class="quantity"><?php echo $column_quantity; ?></td>
add below:
Code: Select all
<td class="quantity"><?php echo $column_product_quantity; ?></td>
find:
Code: Select all
<td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="3" /></td>
add below:
Code: Select all
<td class="quantity">(<?php echo $product['product_quantity']; ?>)</td>
This should do it.