weight and visibility on product are not mandatory anymore
This commit is contained in:
@@ -75,7 +75,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
|||||||
->setRef($event->getRef())
|
->setRef($event->getRef())
|
||||||
->setLocale($event->getLocale())
|
->setLocale($event->getLocale())
|
||||||
->setTitle($event->getTitle())
|
->setTitle($event->getTitle())
|
||||||
->setVisible($event->getVisible())
|
->setVisible($event->getVisible() ? 1 : 0)
|
||||||
|
|
||||||
// Set the default tax rule to this product
|
// Set the default tax rule to this product
|
||||||
->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true))
|
->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true))
|
||||||
@@ -109,7 +109,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
|||||||
->setDescription($event->getDescription())
|
->setDescription($event->getDescription())
|
||||||
->setChapo($event->getChapo())
|
->setChapo($event->getChapo())
|
||||||
->setPostscriptum($event->getPostscriptum())
|
->setPostscriptum($event->getPostscriptum())
|
||||||
->setVisible($event->getVisible())
|
->setVisible($event->getVisible() ? 1 : 0)
|
||||||
|
|
||||||
->save()
|
->save()
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ class ProductCreationForm extends BaseForm
|
|||||||
"label_attr" => array("for" => "tax_rule_field")
|
"label_attr" => array("for" => "tax_rule_field")
|
||||||
))
|
))
|
||||||
->add("weight", "number", array(
|
->add("weight", "number", array(
|
||||||
"constraints" => array(new NotBlank()),
|
|
||||||
"label" => Translator::getInstance()->trans("Weight *"),
|
"label" => Translator::getInstance()->trans("Weight *"),
|
||||||
"label_attr" => array("for" => "weight_field")
|
"label_attr" => array("for" => "weight_field")
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -520,7 +520,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
|
||||||
<span class="input-group-addon">{intl l="Kg"}</span>
|
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user