magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Decimal Qty Increments not working correctly

Open PiimegaOy opened this issue 9 years ago • 8 comments

Preconditions

  1. Magento 2.1.3
  2. PHP 7.0.8 & MySQL 5.6.31-0ubuntu0.14.04.2

Steps to reproduce

  1. Add number with decimals as qty increment.
  2. (Use quantity decimals should be set "Yes").

Expected result

  1. Product advanced inventory form in admin panel quantity should so as decimal and not int
  2. Frontend should show qty increment as decimal

Actual result

  1. Advance inventory form shows qty incerement as int
  2. Qty increment shows as int on frontend

This happens because on line 403 of Magento\CatalogInventory\Model\Stock\Item the qty increment is converted to integer. image

PiimegaOy avatar Feb 03 '17 12:02 PiimegaOy

Is there any news about this issue yet?

tbrankaer avatar Apr 25 '17 08:04 tbrankaer

@PiimegaOy, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

magento-engcom-team avatar Oct 20 '17 06:10 magento-engcom-team

@PiimegaOy, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

magento-engcom-team avatar Oct 20 '17 06:10 magento-engcom-team

@magento-engcom-team

I can confirm that there is a continued issue for "Qty Increment" client-side validation. Please see below.

Preconditions

  • Magento 2.2
  • PHP 7.0.22
  • Ubuntu 16.04.3 LTS

Steps to Reproduce

  • Admin Panel: "Products" -> "Add Product"
  • Open "Advanced Inventory" dialog
  • Set "Qty Uses Decimals" to "Yes"
  • Set "Enable Qty Increments" to "Yes"
  • Enter a "Qty Increments" value containing a decimal value (i.e. 12.5)

Expected Result

  • Form submission will continue as normal
  • User will be able to finish product creation
  • Product will be created
  • Product will use decimal "Qty Increments" value as specified during creation.

Actual Result

  • Client-side validation is triggered by the inputting of a . character into the "Qty Increments" field
  • Form submission is prevented due to client-side validation failure
  • User cannot create product with decimal value for "Qty Increments" field.

tapvt avatar Nov 05 '17 20:11 tapvt

@magento-engcom-team

Can confirm the issue: Magento 2.1.9 PHP 7.0.24 Debian Jessie

mistub70 avatar Dec 14 '17 16:12 mistub70

I have also added a quantity button using the tutorial https://magenticians.com/quantity-increment-decrement-magento-2/ . I think here you can find the solution of your query as before starting i have a default product text field and now i have a quantity button to increment and decrement.

suthanalley avatar Dec 26 '17 08:12 suthanalley

I can confirm this problem still exists on Magento version 2.2.3

Crossmotion avatar May 18 '18 10:05 Crossmotion

#12914 falls in line with this bug, and is the second part of it.

duffner avatar Dec 08 '18 21:12 duffner