diff --git a/app/Resources/ShopsysFrameworkBundle/views/Admin/Content/Product/detail.html.twig b/app/Resources/ShopsysFrameworkBundle/views/Admin/Content/Product/detail.html.twig
deleted file mode 100644
index c928a259d..000000000
--- a/app/Resources/ShopsysFrameworkBundle/views/Admin/Content/Product/detail.html.twig
+++ /dev/null
@@ -1,318 +0,0 @@
-{% extends '@!ShopsysFramework/Admin/Content/Product/detail.html.twig' %}
-{% set showHeading = false %}
-{% import '@ShopsysFramework/Admin/Form/seoFormRowMacros.html.twig' as seoFormRowMacros %}
-{% import _self as self %}
-
-{% block main_content %}
- {% if isMultidomain() %}
- {% set cssClassOnMultidomainInputs = 'input--domain' %}
- {% else %}
- {% set cssClassOnMultidomainInputs = '' %}
- {% endif %}
-
- {{ form_start(form) }}
-
- {{ form_errors(form) }}
-
-
-
- {% block product_variants %}{% endblock %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% if form.pluginData is empty %}
- {% do form.pluginData.setRendered %}
- {% else %}
- {% for pluginForm in form.pluginData %}
-
- {% endfor %}
- {% endif %}
-
- {% embed '@ShopsysFramework/Admin/Inline/FixedBar/fixedBar.html.twig' %}
- {% block fixed_bar_content %}
-
- {{ form_save(product|default(null), form) }}
- {% endblock %}
- {% endembed %}
-
- {{ form_end(form) }}
-
-{% endblock %}
\ No newline at end of file
diff --git a/src/Shopsys/ShopBundle/Form/Admin/ProductFormTypeExtension.php b/src/Shopsys/ShopBundle/Form/Admin/ProductFormTypeExtension.php
index 350b2c583..09fb89981 100644
--- a/src/Shopsys/ShopBundle/Form/Admin/ProductFormTypeExtension.php
+++ b/src/Shopsys/ShopBundle/Form/Admin/ProductFormTypeExtension.php
@@ -25,13 +25,15 @@ public function __construct(ProductConditionFacade $productConditionFacade)
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('condition', ChoiceType::class, [
+ $basicInformationGroupBuilder = $builder->get('basicInformationGroup');
+
+ $basicInformationGroupBuilder->add('condition', ChoiceType::class, [
'required' => true,
'choices' => $this->productConditionFacade->getAll(),
'label' => t('Condition'),
]);
- $builder->remove('flags');
+ $basicInformationGroupBuilder->remove('flags');
}
/**
diff --git a/tests/ShopBundle/Acceptance/acceptance/ProductImageUploadCest.php b/tests/ShopBundle/Acceptance/acceptance/ProductImageUploadCest.php
index be37397aa..cb73814b5 100644
--- a/tests/ShopBundle/Acceptance/acceptance/ProductImageUploadCest.php
+++ b/tests/ShopBundle/Acceptance/acceptance/ProductImageUploadCest.php
@@ -8,7 +8,7 @@
class ProductImageUploadCest
{
- const IMAGE_UPLOAD_FIELD_ID = 'product_edit_form_images_file';
+ const IMAGE_UPLOAD_FIELD_ID = 'product_edit_form_imageGroup_images_file';
const SAVE_BUTTON_NAME = 'product_edit_form[save]';
const EXPECTED_SUCCESS_MESSAGE = 'Product 22" Sencor SLE 22F46DM4 HELLO KITTY modified';
diff --git a/tests/ShopBundle/Smoke/NewProductTest.php b/tests/ShopBundle/Smoke/NewProductTest.php
index 0cde81938..503309c86 100644
--- a/tests/ShopBundle/Smoke/NewProductTest.php
+++ b/tests/ShopBundle/Smoke/NewProductTest.php
@@ -56,22 +56,22 @@ public function testCreateOrEditProduct($relativeUrl)
*/
private function fillForm(Form $form)
{
- $nameForms = $form->get('product_edit_form[productData][name]');
+ $nameForms = $form->get('product_edit_form[name]');
/* @var $nameForms \Symfony\Component\DomCrawler\Field\InputFormField[] */
foreach ($nameForms as $nameForm) {
$nameForm->setValue('testProduct');
}
- $form['product_edit_form[productData][catnum]'] = '123456';
- $form['product_edit_form[productData][partno]'] = '123456';
- $form['product_edit_form[productData][ean]'] = '123456';
- $form['product_edit_form[productData][descriptions][1]'] = 'test description';
- $form['product_edit_form[productData][price]'] = '10000';
- $form['product_edit_form[productData][vat]']->select($this->getReference(VatDataFixture::VAT_ZERO)->getId());
- $form['product_edit_form[productData][sellingFrom]'] = '1.1.1990';
- $form['product_edit_form[productData][sellingTo]'] = '1.1.2000';
- $form['product_edit_form[productData][stockQuantity]'] = '10';
- $form['product_edit_form[productData][unit]']->select($this->getReference(UnitDataFixture::UNIT_CUBIC_METERS)->getId());
- $form['product_edit_form[productData][availability]']->select($this->getReference(AvailabilityDataFixture::AVAILABILITY_IN_STOCK)->getId());
+ $form['product_edit_form[productData][basicInformationGroup][catnum]'] = '123456';
+ $form['product_edit_form[productData][basicInformationGroup][partno]'] = '123456';
+ $form['product_edit_form[productData][basicInformationGroup][ean]'] = '123456';
+ $form['product_edit_form[productData][descriptionsGroup][descriptions][1]'] = 'test description';
+ $form['product_edit_form[productData][pricesGroup][productCalculatedPricesGroup][price]'] = '10000';
+ $form['product_edit_form[productData][pricesGroup][vat]']->select($this->getReference(VatDataFixture::VAT_ZERO)->getId());
+ $form['product_edit_form[productData][displayAvailabilityGroup][sellingFrom]'] = '1.1.1990';
+ $form['product_edit_form[productData][displayAvailabilityGroup][sellingTo]'] = '1.1.2000';
+ $form['product_edit_form[productData][displayAvailabilityGroup][stockGroup][stockQuantity]'] = '10';
+ $form['product_edit_form[productData][displayAvailabilityGroup][unit]']->select($this->getReference(UnitDataFixture::UNIT_CUBIC_METERS)->getId());
+ $form['product_edit_form[productData][displayAvailabilityGroup][availability]']->select($this->getReference(AvailabilityDataFixture::AVAILABILITY_IN_STOCK)->getId());
}
/**