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

Problems trying to make some product a hero product using insert_update into SolrHeroProductDefinition

Former Member
0 Likes
184

Here's my impex file:

$catalogVersion = catalogversion(catalog(id), version)

INSERT_UPDATE Category; code[unique = true]; $catalogVersion[unique = true, allowNull = true] ; testCategory ; ;

INSERT_UPDATE Product; code[unique = true]; $catalogVersion[unique = true, allowNull = true]; supercategories(code) ; testProduct ; ; testCategory

The error is: ",,,,pk has wrong format: 'testCategory ':For input string: ""testCategory """;

I'd appreciate your help

INSERT_UPDATE SolrHeroProductDefinition; code[unique = true]; $catalogVersion[unique = true]; category; indexedType; products[collection-delimiter = /] ; heroProductCode0 ; Default:Staged ; ECP648Category ; Product ; ECP648Product

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member633554
Active Participant
0 Likes

I think the solrheroproductdefinition header isn't right. The code should be the category_indexedproductype. So if your category has a code of ECP648 the code would be ECP648_productType

This works for m.

 $productCatalog=Default; 
 $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default=Staged])[unique=true,default=$productCatalog:Staged]
 
 
 INSERT_UPDATE SolrHeroProductDefinition; code[unique = true]; $catalogVersion[unique = true]; category(category.code,$catalogVersion); indexedType(SolrIndexedType.identifier); products(Product.code,$catalogVersion)[collection-delimiter = /] 
 ; ECP648_productType ; Default:Staged ; ECP648Category ; Product ; ECP648Product