cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Export product csv through configurable flexi query

rahulverma94
Active Participant
0 Likes
946

Hi Experts,

I need to export product csv file in Hybris. The content of the csv has to be driven through a flexiquery on product, product features, etc and the flexi query should be configurable. Need help on the starting point to proceed.

Regards Rahul

Accepted Solutions (0)

Answers (2)

Answers (2)

rahulverma94
Active Participant
0 Likes

I want to do it through a custom cron job, not through an export script.

geffchang
Active Contributor
0 Likes

Check this guide -> Exporting the Content of a Catalog Version: https://help.hybris.com/6.6.0/hcd/8bd9a45d86691014b71aa404248b7ee5.html

You need to create / customize an export script like this:

 insert_update Product; catalogVersion(catalog(id),version)[unique=true]; code[unique=true]; Europe1PriceFactory_PDG(itemtype(code),code); Europe1PriceFactory_PPG(itemtype(code),code); Europe1PriceFactory_PTG(itemtype(code),code); approvalStatus(itemtype(code),code)[allownull=true]; articleStatus[lang=de]; articleStatus[lang=en]; buyerIDS(key(itemtype(code),code)); catalog(id)[allownull=true]; contentUnit(code); data_sheet(code,catalogVersion(catalog(id),version)); deliveryTime; description[lang=de]; description[lang=en]; detail(code,catalogVersion(catalog(id),version)); ean; endLineNumber; erpGroupBuyer; erpGroupSupplier; logo(code,catalogVersion(catalog(id),version)); manufacturerAID; manufacturerName; manufacturerTypeDescription[lang=de]; manufacturerTypeDescription[lang=en]; maxOrderQuantity;minOrderQuantity; name[lang=de]; name[lang=en]; normal(code,catalogVersion(catalog(id),version)); numberContentUnits; offlineDate; onlineDate; order; orderQuantityInterval; others(code,catalogVersion(catalog(id),version)); picture(code,catalogVersion(catalog(id),version)); priceQuantity; remarks[lang=de]; remarks[lang=en]; segment[lang=de]; segment[lang=en]; specialTreatmentClasses; startLineNumber; supplierAlternativeAID; thumbnail(code,catalogVersion(catalog(id),version)); thumbnails(code,catalogVersion(catalog(id),version)); unit(code); variantType(code); variants(code,catalogVersion(catalog(id),version)); xmlcontent;
 "#% impex.exportItems(""SELECT {P:pk} FROM {Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"