I want to be able to change the uom in the shopping cart at meter with 0.1 steps. So this means I want to add for example 0.2 meter of a product in the shopping cart. Originally I had 1 meter in the shopping cart and now I want to adjust to 1.2 meter. If I do that it will go back to 1 meter.
Here is a image for the better explanation: https://imgur.com/a/HnHiijI
I have found something in the java script code:
website_sale.js
var default_price = parseFloat($dom.find('.text-danger > span.oe_currency_value').text());
When I chance to "int" it doesn't work either because the refresh. This is a java-script problem and I'm not a developer anyway.
/**
* @private
* @param {Event} ev
*/
_onChangeCartQuantity: function (ev) {
var $input = $(ev.currentTarget);
if ($input.data('update_change')) {
return;
}
var value = parseInt($input.val() || 0, 10);
if (isNaN(value)) {
value = 1;
}
var $dom = $input.closest('tr');
var default_price = parseFloat($dom.find('.text-danger > span.oe_currency_value').text());
var $dom_optional = $dom.nextUntil(':not(.optional_product.info)');
var line_id = parseInt($input.data('line-id'), 10);
var productIDs = [parseInt($input.data('product-id'), 10)];
this._changeCartQuantity($input, value, $dom_optional, line_id, productIDs);
},
/**
* @private
* @param {Event} ev
*/
_onClickSuggestedProduct: function (ev) {
$(ev.currentTarget).prev('input').val(1).trigger('change');
},
/**
* @private
* @param {Event} ev
*/
Does anyone has an idea how to fix this?
Thank you for your answers,