If you got the qty box empty when you edit the product from the cart page, please follow the below instruction.
You need to override “vendor/magento/module-checkout/view/frontend/templates/cart/item/configure/updatecart.phtml” file in your theme
<vendername>/<themename>/Magento_Checkout/templates/cart/item/configure/updatecart.phtml
then just add below line in value
<?= $block->getProductDefaultQty() * 1 ?>
After making above changes QTY field code show will look like below:
1 2 3 4 5 6 7 8 |
<input type="number" name="qty" id="qty" min="0" value="<?= $block->getProductDefaultQty() * 1 ?>" title="<?= $block->escapeHtmlAttr(__('Qty')) ?>" class="input-text qty" data-validate="<?= $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> |
Note: I have tried this in Magento 2.3.6 – Let us know if it works with the other versions as well.
If you want get query string params in controller file,...
Create di.xml and add the below code Magemonkey/Redirect/etc/frontend/di.xml [crayon-6284769fe48ce644619775/] Create...
You can try below code to change local date to...
Step 1: First you need to add registration.php file in...
Step1 : Override message.js in current theme file on the...