Developer forum

Forum » Ecommerce - Standard features » TemplateTags showing values from the default variant

TemplateTags showing values from the default variant

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have situation with a project where all products have a default variant set.

I have just noticed that this setting also affects what is returned by the tags. Instead of retruning values for the parent product, the tags are returning the values from the DefaultVariant instead.

While I definitely understand that this is a useful feature, I need to know if I have the option to render the values for the parent product without removing the default variant.

Thank you,

Adrian

 


Replies

 
Nicolai Pedersen
Reply

You do not have that option, since that is what the feature is all about...

Sorry about the inconvenience, Nicolai

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

I just tested this with Adrian and there is a different issue that we're seeing. The Product Catalog Product page is always showing the default variant rather than the product itself. If we set the default variant to None, then it shows the information of the parent, otherwise it shows the information of the default variant.

We would like to control that rather than having it forced. Sometimes we want to follow the default variant but other times we want to use the info for the parent itself. 

In Settings > Ecommerce > Advanced > General it's possible to change the behavior of the List Page ("Show default variant in product list"). Could it also be configured for the details page (or set in the Product Catalog module)? 

Thanks,

Scott

 

 
Nicolai Pedersen
Reply

Hi Scott

Using the index, you can better control this. With 9.4 we also have a concept of "Show in product list" feature that allows you to define exactly what to show in the list. Consider these products - some just products, some with one variant dimension, some with 2. Using the new show in product list checkbox together with an index, you can set checkboxes like below and that is exactly what is shown:

  • Master 1 (X)
  • Master 2 (X)
    • Color 1
    • Color 2
  • Master (X)
    • Color 1 (X)
      • Size 1
      • Size 2
    • Color 2 (X)
      • Size 1
      • Size 2
  • Master 4

You can even do this today using a custom field.

In the next 9.4 hotfix you will se a new field on the index that supports logic related to this feature combined with the Active flag. We are also adding some new UI to product edit where you can specify which variants/masters/languages that should have this flag set.

BR Nicolai

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Nicolai,

Those sound like impressive new features. It's nice to see that progress on variant functionality in the indexing. I'll check it out.

Thanks,

Scott

 

You must be logged in to post in the forum