From 81280a09ba56d25ce8506e8f2d446e6204979cf0 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 5 Sep 2024 09:49:17 +0700 Subject: import product --- import_product_product.ktr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'import_product_product.ktr') 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 @@ 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 -- cgit v1.2.3