summaryrefslogtreecommitdiff
path: root/import_product_product.ktr
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-09-05 09:49:17 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-09-05 09:49:17 +0700
commit81280a09ba56d25ce8506e8f2d446e6204979cf0 (patch)
tree11b1b9473ff17db01044e0842ee53d85f265e6fd /import_product_product.ktr
parent14df7d032aae457fd0b9842f5b793c9abd687338 (diff)
import product
Diffstat (limited to 'import_product_product.ktr')
-rw-r--r--import_product_product.ktr4
1 files changed, 2 insertions, 2 deletions
diff --git a/import_product_product.ktr b/import_product_product.ktr
index afdc987..4df6ed6 100644
--- a/import_product_product.ktr
+++ b/import_product_product.ktr
@@ -559,7 +559,7 @@
<sql>select pp.id as product_id, pt.id as template_id, pt.name, pp.active::boolean, pt.x_manufacture as brand_id,
case when pp.default_code is null then pt.default_code else pp.default_code end as item_code,
(
- select name from product_public_category ppc where id in((select replace(left(parent_path, 2), '/', '')::int from product_public_category
+ select name from product_public_category ppc where id in((select replace(left(parent_path, 5), '/', '')::int from product_public_category
where id in(select ppcptr.product_public_category_id from product_public_category_product_template_rel ppcptr
where ppcptr.product_template_id = pt.id limit 1)))
) as parent_category,
@@ -567,7 +567,7 @@ case when pp.default_code is null then pt.default_code else pp.default_code end
pt.website_description as description,
pt.weight,
(
- select ppc.id from product_public_category ppc where id in((select replace(left(parent_path, 2), '/', '')::int from product_public_category
+ select ppc.id from product_public_category ppc where id in((select replace(left(parent_path, 5), '/', '')::int from product_public_category
where id in(select ppcptr.product_public_category_id from product_public_category_product_template_rel ppcptr
where ppcptr.product_template_id = pt.id limit 1)))
) as parent_category_id