-1

EDIT: I'm on OpenCart 3.0.3.2

I want to get the product's stock number on my Category page, so i added this to catalog/controller/product/category.php

$data['products'][] = array(
                    ...,
        'stock'       => $result['quantity'],
);

and when i add this to [mytheme]/template/product/category.twig:

<p>TEST {{ product.stock }}</p>

it only shows the 'TEST' string without the variable, i just can't pass the .stock variable's value to my .twig file, any suggestions?

DarkBee
  • 16,592
  • 6
  • 46
  • 58

1 Answers1

0

Clearing the cache and refresh the modifications did it