Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Variation.ItemAttributes.MaxQuantity is 0 after upgrade

Vote:
 

Hi!

Upgrade from 8.7.1 to 8.15

Seems that somethings changed.

Variation.ItemAttributes.MaxQuantity and MinQuantity is always 0 after upgrade. Even if in the database and Catalog UI the values are set. In the database table "Variation" the value is set to 1 and 30.

What to do?

#131924
Aug 10, 2015 12:55
Vote:
 

Even the Weight object is Null, thought is a value 1 in database. If i run sql "exec ecf_CatalogEntry @CatalogEntryId=1361,@ReturnInactive=0,@ResponseGroup=4"

The third return is  (observe only MerchantId is Null)

CatalogEntryId	ListPrice	TaxCategoryId	TrackInventory	MerchantId	WarehouseId	Weight	PackageId	MinQuantity	MaxQuantity	Length	Height	Width
1361	0,00	0	0	NULL	0	1	0	1,00	30,00	0	0	0
#131931
Aug 10, 2015 14:09
Vote:
 

Hi,

You meant the Entry object?

Previously some methods in ICatalogSystem will return CatalogEntryFull if no responseGroup is not supplied. This is incorrect and we decided to change it.

So you can explicitly pass the CatalogResponseGroup.Variations to your method call.

Regards,

/Q

#131936
Aug 10, 2015 14:41
Vote:
 

Hi! ok,

What is best practice then with webforms?

I am inheriting from BaseEntryTemplate, for the Entry Object. On ProductTemplate.ascx i need to list all variations:

Im using the base.Entry to retrieve the actual entry.

 foreach (var ProductVariation in base.Entry.Entries.Entry.Where(x => x.IsActive == true))
{
var min = ProductVariation.ItemAttributes.MinQuantity //not working


var newvari = CatalogContext.Current.GetCatalogEntry(ProductVariation.CatalogEntryId, new CatalogEntryResponseGroup(CatalogEntryResponseGroup.ResponseGroup.Variations));

min = newvari.ItemAttributes.MinQuantity // working good
}

Is this the best practice then?

Regards.

#131942
Aug 10, 2015 15:08
Vote:
 

I don't think we have a best practice for this, but if you can - stick with content APIs, unless you really need to entry object.

The first one requires you to use CatalogEntryFull or RecursiveAssociations responsegroup, but as it loads in batch so it can have better performance than the second approach - but you should try it for sure.

Regards.

/Q

#131946
Aug 10, 2015 15:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.