V
V
Vitaliy Prokopenko2022-03-16 13:22:10
opencart
Vitaliy Prokopenko, 2022-03-16 13:22:10

How to display the quantity of goods in the cart if there is no required quantity (opencart 3x )?

<span>{{ product.name }}{% if not product.stock %} <span class="text-danger">***</span><?php echo $product['quantity'] ?> шт.<?php } ?> {% endif %}</span>

'quantity'  => $product['quantity'],
'stock'     => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')),

6231b8e2e3d97302613842.png
It is necessary to display the quantity in this part of the site. and only if the required quantity is not in stock, so that the user does not constantly minus the product.

{{ product.name }}{% if not product.stock %} *** {{ product.quantity }} pcs.
so displays the amount selected

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question