Developer forum

Forum » Ecommerce - Standard features » Variant limitations on related products

Variant limitations on related products

Jesper Holm Damgaard
Reply

Hi guys

In ecommerce i have added variant limitations to related products like this:

But nothing happens in the frontend.

I'm running on Rapido version 3.4.3

So i thought it might be because Rapido did not support this feature, so i tried to make a very simple template containing only the ProductRelatedGroups loop but it makes no difference. The limitations are not applied and i still get all related products for all variants.

Am i doing something wrong or missing something?

All the best, Jesper 

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Jesper

For me it works... But you have to be on a variant that is not selected - i.e. in your example above, stand on a variant that is "Med motor" before it is removed. It will be shown for the master since it does not have a variant ID.

Can you share the template example code - and show the page and settings of the product in question?

Thanks, Nicolai

 
Jesper Holm Damgaard
Reply

The template looks like this:

@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>

<h1>Name: @GetString("Ecom:Product.Name")</h1>
<p>ID: @GetString("Ecom:Product.ID")</p>
<p>VariantID: @GetString("Ecom:Product.VariantID")</p>
<hr/>
<h2>ProductRelatedGroups</h2>
<ul>
  @foreach (LoopItem relatedGroup in GetLoop("ProductRelatedGroups"))
  {
    <li>
      RelatedGroup.Name: @relatedGroup.GetString("Ecom:Product:RelatedGroup.Name") - Product count: @relatedGroup.GetLoop("Products").Count
    </li>
  }
</ul>
<hr/>
<h2>VariantCombinations</h2>
<ul>
  @foreach (LoopItem item in GetLoop("VariantCombinations"))
  {
    <li>
      @item.GetString("Ecom:Product.VariantLinkGroup")
    </li>
  }
</ul>
<hr/>

I have a test site here:
http://thermex.test001.webtester.dk/produkter/emhaetter/vaeghaengt-emhaette/mini-perpignan

All products in the related group "Eksterne motorer" has applied the settings shown in the first post. So i would expect all products with the variant option "Med motor" not to have any related products in the "Eksterne motorer" group.

--
All the best, Jesper

 
Jesper Holm Damgaard
Reply

Any progress on this issue? All the best, Jesper

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi Jesper,

Sense of the limitation by variant - the related product is rendered in appropriate loop when checked variat of product (where the limitation was set) is rendered in frontend only. I've tested the feature with simple template on last 9.15.11 admin and it worked as expected. Here is video about my check. Your URL seems not to have product variant link but only product without it.

BR, Oleg QA    

 
Jesper Holm Damgaard
Reply

Hi Oleg

Thank you very much for looking into this issue. 

I can see in the video that it works nicely in your demo. I have created a similar case, and i can also make it work with one variant group in the limitation. When i add another it starts behaving weird. 

Can you make it work with more than one variant group in the limitaion?

All the best, Jesper

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

OK with couple of variant groups on the same environment as well, here is video about the check. Don't forget to rebuld related product index if used in product catalog module via query after updating related products (my solution set up to do it automaticaly via shop settings). 

BR, Oleg QA

 
Jesper Holm Damgaard
Reply

Hi Oleg

I see that is also working very well in your demo - but still not in my case.

After som ivestigation have i come to realise that it is because all your variant combinations consists of unique variant options.

Could you add a new variant with Color: "Black" and Size: "XS" and check if that combination will show your related product?

If am right, it must mean that the limitation logic is using OR accross variant groups and not AND, as i would expect since you cannot have partial variant combination ids.

Does it make sense and is this intended behaviour? 

Alt the best, Jesper

 

You must be logged in to post in the forum