feat: refactor product attributes handling to use product_attribute table and update related models and requests
This commit is contained in:
@@ -925,7 +925,7 @@
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"producto_id\": {{producto_id}},\n \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M\",\n \"stock\": 8,\n \"descripcion\": \"Variante de prueba\",\n \"precio\": 26999,\n \"definitions\": [\n {\n \"attribute_id\": {{color_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"attribute_id\": {{talle_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
|
||||
"raw": "{\n \"producto_id\": {{producto_id}},\n \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M\",\n \"stock\": 8,\n \"descripcion\": \"Variante de prueba\",\n \"precio\": 26999,\n \"definitions\": [\n {\n \"products_attribute_id\": {{color_product_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"products_attribute_id\": {{talle_product_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/product-variants",
|
||||
@@ -987,7 +987,7 @@
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M Updated\",\n \"stock\": 12,\n \"descripcion\": \"Variante actualizada\",\n \"precio\": 27999,\n \"definitions\": [\n {\n \"attribute_id\": {{color_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"attribute_id\": {{talle_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
|
||||
"raw": "{\n \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M Updated\",\n \"stock\": 12,\n \"descripcion\": \"Variante actualizada\",\n \"precio\": 27999,\n \"definitions\": [\n {\n \"products_attribute_id\": {{color_product_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"products_attribute_id\": {{talle_product_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/product-variants/{{product_variant_id}}",
|
||||
@@ -1499,6 +1499,16 @@
|
||||
"value": "2",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "color_product_attribute_id",
|
||||
"value": "1",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "talle_product_attribute_id",
|
||||
"value": "2",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "producto_id",
|
||||
"value": "1",
|
||||
|
||||
Reference in New Issue
Block a user