VirtoCommerce / vc-module-catalog

Product information management module
Other
33 stars 51 forks source link

Custom properties field is empty in collection from collections dictionary #355

Open tuviks opened 4 years ago

tuviks commented 4 years ago

Could you help me? I don't know what to do. I have added property "DisplayName" for Category, filled this for Drones category, restarted IIS and site (from settings) and I have no any custom property for this collection on the home page (I have added line "{{ collections | json }}")

Version info:

Expected behavior

Properties field is not empty for collection item on home page

Actual behavior

Properties filed is always empty

Steps to reproduce

  1. Add Property for Category named "DisplayName"
  2. Fill DisplayName for one of category
  3. Add {{ collections | json }} to the top of index.liquid
  4. Load home page, find category with filled DisplayName property, find Properties field

image image image

lnetrebskii commented 4 years ago

Task https://virtocommerce.atlassian.net/browse/VP-2237 has been created

tuviks commented 4 years ago

@lnetrebskii Thank you! Could you say when you plan to fix this and how could I track this to update my platform and package versions?

yecli commented 4 years ago

Hi @tuviks Maybe the problem is that categories are loaded without properties by default. If there is the case, you could set ResponseGroup to e.g. Info, WithPropertiesmanually using the liquid paginate filter. This link could be useful for setting responseGroup in the liquid template: https://www.virtocommerce.org/t/how-to-flexibly-manage-data-completeness-in-liquid-templates/146 The part you are interested in is here:

{{ paginator =  collection.products | paginate number_of_products_to_fetch '{ "ResponseGroup" : "Default, ItemProperties" }' }}