I'm facing an issue with the product details page (addtocart.phtml) on my Magento website. The page is not displaying the Quantity +/- options, and I'm unable to add products to the cart using the regular interface.

I have checked the template file addtocart.phtml and verified that the relevant code for the Quantity +/- options is present. However, when I visit the product details page, the Quantity field is missing, and I can't figure out why.

Steps I've taken so far:

Verified that the addtocart.phtml file contains the correct code for the Quantity options.
Cleared the cache and re-indexed the Magento store.
Checked for any custom JavaScript or CSS that might be affecting the Quantity options.
Ensured that the product has a stock quantity greater than zero and is enabled for sale.
Looked for any layout XML updates that might affect the product details page.

Expected Result: The Quantity +/- options should be displayed on the product details page, allowing customers to adjust the quantity before adding products to the cart.

Actual Result: The Quantity +/- options are missing, and customers can't set the desired quantity for adding products to the cart.

Custom Theme: Porto 4.0.5

1 Answer 1


Enble template path hints to verify which phtml file calling on the page.

Go to Admin Panel -> Stores -> Settings -> Configuration -> Advanced -> Developer -> Debug

Enable Template Path Hints for Storefront -> Yes

Enable Hints for Storefront with URL Parameter -> Yes

clear magento cache

Add this ?templatehints=magento in URL like exmaple.com/product.html?templatehints=magento

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.