Skip to Content
Menu
This question has been flagged
1146 Views

Hello, 

I am trying to find the html code to access and transform the stock value of a product, in order to use a progress bar.

This is my progress bar, and I just want to change the data-animate-width value ("64%"), with something like ("initial stock" - "stock value"/"initial stock")*100, to have a visual effect of the stock. 


<section class="progress">
<div class="progress-bar progress-bar-gray" role="progressbar" data-animate-width="64%" style="width: 70%;">
<span class="object-non-visible o_default_snippet_text" data-effect-delay="200"/>
</div>
</section>


I know my product id is for exemple "199" like in the following code : 

<span data-oe-model="product.template" data-oe-id="199" data-oe-field="name" data-oe-type="char" data-oe-expression="product.name">Article Test</span>

Thank you for any advice (including where to look!)
Antoine
Avatar
Discard