Implemented product variations (closes #196)

This commit is contained in:
Bernd Bestel
2019-09-14 17:34:36 +02:00
parent 26ebeec74f
commit a0a0e104b0
14 changed files with 250 additions and 19 deletions

View File

@@ -10,8 +10,16 @@
}
var jsonData = $('#product-form').serializeJSON({ checkboxUncheckedValue: "0" });
var parentProductId = jsonData.product_id;
delete jsonData.product_id;
jsonData.parent_product_id = parentProductId;
Grocy.FrontendHelpers.BeginUiBusy("product-form");
if (jsonData.parent_product_id.toString().isEmpty())
{
jsonData.parent_product_id = null;
}
if ($("#product-picture")[0].files.length > 0)
{
var someRandomStuff = Math.random().toString(36).substring(2, 100) + Math.random().toString(36).substring(2, 100);