diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index b0e443179..39ddf9a2a 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -75,7 +75,7 @@ class Product extends BaseAction implements EventSubscriberInterface ->setRef($event->getRef()) ->setLocale($event->getLocale()) ->setTitle($event->getTitle()) - ->setVisible($event->getVisible()) + ->setVisible($event->getVisible() ? 1 : 0) // Set the default tax rule to this product ->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true)) @@ -109,7 +109,7 @@ class Product extends BaseAction implements EventSubscriberInterface ->setDescription($event->getDescription()) ->setChapo($event->getChapo()) ->setPostscriptum($event->getPostscriptum()) - ->setVisible($event->getVisible()) + ->setVisible($event->getVisible() ? 1 : 0) ->save() ; diff --git a/core/lib/Thelia/Form/ProductCreationForm.php b/core/lib/Thelia/Form/ProductCreationForm.php index de683e27a..200f61199 100644 --- a/core/lib/Thelia/Form/ProductCreationForm.php +++ b/core/lib/Thelia/Form/ProductCreationForm.php @@ -83,7 +83,6 @@ class ProductCreationForm extends BaseForm "label_attr" => array("for" => "tax_rule_field") )) ->add("weight", "number", array( - "constraints" => array(new NotBlank()), "label" => Translator::getInstance()->trans("Weight *"), "label_attr" => array("for" => "weight_field") )) diff --git a/templates/backOffice/default/categories.html b/templates/backOffice/default/categories.html index a0b43145c..d8418f46a 100644 --- a/templates/backOffice/default/categories.html +++ b/templates/backOffice/default/categories.html @@ -520,7 +520,7 @@