Developer forum

Forum » Ecommerce - Standard features » Related products and limits

Related products and limits

Hans Kloppenborg
Reply

Hi,

We are trying to implement alternatives for product variants that are out of stock, and have managed to import these in the EcomProductsRelated table, using fields like ProductRelatedProductRelVariantID to indicate which variant product is the alternative, and ProductRelatedLimitVariant to indicate for which variant this should be valid.

Now when we try to get this data from DW in the API the limit is nowhere to to be found, or implemented. for every variant of the product the relatedcount is the same.

I tried with the webapi 

dwapi/ecommerce/products/0224.01.01/related

but that had same problem, only a generic relation on the master product, no limit info to be found anywhere.

"RelatedGroups": [
        {
          "Id": "1016",
          "Name": "alternatief",
          "Products": [
            {
              "ProductId": "0401.01.02",
              "VariantId": "4785"
            },
            {
              "ProductId": "0280.01.01",
              "VariantId": "1284"
            }
          ]
        }
      ]

As far as I can see the limit on Language and variantid are ignored. (they are shown in the CMS backend though)

Is there something I am missing, or some service I can call to get the correct data?

Greets Hans


Replies

 
Peter Leleulya
Peter Leleulya
Reply

BUMP

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

All parameters can currently be used-applied for limitation an dwapi endpoint you can find using [your site]/dwapi/docs URL. E.g. using LanguageId you can limit specific language version of products output defined as related product for product pointed (via Id) in the endpoint. The limitations works as expected on last DW9.13.4. (find attachment)

BR, Oleg QA

2022-04-20_08-36-18.png 2022-04-20_08-37-09.png 2022-04-20_08-38-11.png 2022-04-20_08-41-38.png
 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Hans,

Limitations are not shown in WebAPI, our dev are discussing how to provide them.

But it should be possible to get them by traditional API: 

Dynamicweb.Ecommerce.Services.ProductRelated.FindRelations(product.Id);

 

The limitation by language mentioned by Oleg is implemented in WebAPI 0.14.3 

Best regards,

Vladimir

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi

New task 7492 has been created to implement limits in the dwapi endpoint. Thanks.

BR, Oleg QA

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Hans and Peter

The feature 7492 limits in the dwapi on related products 

Has been implemented in Dynamicweb 9.13.8

Get this version from the download section https://doc.dynamicweb.com/downloads/dynamicweb-9

Kind Regards
Care Support
Kristian Kirkholt

Votes for this answer: 1

 

You must be logged in to post in the forum