Jump to content

Error al guardar precios de coste en combinaciones. Los redondea y se pierden decimales.


info@pardebits.es

Recommended Posts

Hola muy buenos días!

Pasa algo bastante extraño con las combinaciones y es que al añadir el precio coste, si se guarda, se ve el precio bien, pero si se vuelve a guardar pierde los decimales. Tiene pinta de algún bug con los puntos y comas, y la manera que lo guarda.

Es exactamente lo que pasa aquí:

https://github.com/PrestaShop/PrestaShop/issues/28538

Alguien sabe como solucionarlo?

Es bastante raro.

Mil gracias!

Link to comment
Share on other sites

En el enlace de Github han dado una solución que parece que funciona:

En el archivo AdminModelAdapter.php

Añadir después de esta línea:

$form_data['combinations'][$k]['attribute_unity'] = abs( $this->floatParser->fromString($combination['attribute_unity']) );

Esta otra:

$form_data['combinations'][$k]['attribute_wholesale_price'] = abs( $this->floatParser->fromString($combination['attribute_wholesale_price']) );

 

Edited by JorgeGL (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...