1

To do easier checks of our stock informations, I would like to show the stock in the order view, and on the proforma.

Till now I was just trying to add it in the order view, but I didn't had luck with it. I don't really have experience in php, or I don't really have any coding skills.

So what I added in order_info.tpl is

`<td class="text-right"><?php echo $product['stock'] ?></td>`

but not working. I was searching for the solution, but I found details only about showing it on category page, and I guess on the admin page is something different. I might add something in one of the PHP files? Thank you!

Update: I need stock quantity. Here a picture, right side is where I want to show the stock quantity remaining

1 Answers1

0

You can Follow this Two step as well

Step : 1 admin\controller\sale\order.php

A : Find this

public function info() {

after Add below code

$this->load->model('catalog/product');

B: Find this

$data['products'][] = array(

after Add below code

'stock'            => $this->model_catalog_product->getProduct($product['product_id']),

Step : 2 admin\view\template\sale\order_info.tpl

A : Find this

<td class="text-right"><?php echo $column_total; ?></td>

after Add below code

<td class="text-right"><?php echo 'Stock-Quantity'; ?></td>

B : Find this

<td class="text-right"><?php echo $product['total']; ?></td>

after Add below code

<td class="text-right"><?php echo $product['stock']['quantity']; ?></td>

C : Find this

<td colspan="4" class="text-right"><?php echo $total['title']; ?></td>

Replace this code

<td colspan="5" class="text-right"><?php echo $total['title']; ?></td>

You can see below screenshot as well

enter image description here

i hope this articles very helpful for you. if you are appreciate with my code. please give me up-vote and review for this answer.

Mujahid Bhoraniya
  • 1,518
  • 10
  • 22