Developer forum

Forum » Development » Change for inactive products in AssortmentNavigationProvider

Change for inactive products in AssortmentNavigationProvider

Anders Ebdrup
Anders Ebdrup
Reply

Hi Dynamicweb,

 

We have an issue with empty groups when using the assortment navigation provider as it does not checks for active products in this query:

 

SELECT DISTINCT(EcomGroupProductRelation.GroupProductRelationGroupID) as GroupID FROM EcomGroupProductRelation INNER JOIN ( SELECT DISTINCT EcomProducts.ProductID FROM EcomProducts INNER JOIN EcomAssortmentItems AS AssortmentItems ON ( AssortmentItems.AssortmentItemProductID = EcomProducts.ProductID ) INNER JOIN EcomAssortments AS Assortments ON ( Assortments.AssortmentID = AssortmentItems.AssortmentItemAssortmentID AND AssortmentItems.AssortmentItemLanguageID = Assortments.AssortmentLanguageID) AND AssortmentItems.AssortmentItemAssortmentID IN ('SYS_CUST_50000213','SYS_DISC_10%') WHERE EcomProducts.ProductLanguageID = 'LANG1' UNION SELECT DISTINCT EcomProducts.ProductID FROM EcomProducts WHERE EcomProducts.ProductID NOT IN (SELECT DISTINCT EcomAssortmentItems.AssortmentItemProductID FROM EcomAssortmentItems WHERE EcomAssortmentItems.AssortmentItemLanguageID = 'LANG1') AND EcomProducts.ProductLanguageID = 'LANG1' UNION SELECT DISTINCT EcomProducts.ProductID FROM EcomProducts WHERE EcomProducts.ProductLanguageID = 'LANG1' AND EcomProducts.ProductID IN (SELECT DISTINCT EcomAssortmentItems.AssortmentItemProductID FROM EcomAssortmentItems INNER JOIN EcomAssortments ON (EcomAssortmentItems.AssortmentItemAssortmentID = EcomAssortments.AssortmentID AND EcomAssortmentItems.AssortmentItemLanguageID = EcomAssortments.AssortmentLanguageID) WHERE AssortmentActive = 0 AND EcomAssortmentItems.AssortmentItemLanguageID = 'LANG1') ) Products ON EcomGroupProductRelation.GroupProductRelationProductID = Products.ProductID

 

Can you please add an extra clause with "EcomProducts.ProductActive = true"?

If possible I will appreciate if this can be added to the 8.9-branch? smiley

 

Best regards, Anders


Replies

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply

Registered as TFS-37981. Scheduled for next 8.9 hotfix

 

/Morten Buhl, DW

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Morten,

 

I can see in the TFS, that it seems like you are still missing the condition two places in the sql statement. Will you please try to have a look again? :-)

 

Best regards, Anders

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply

Hi Anders

I've sent the item back to development. Will let you know once I get an answer

/Morten 

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply
This post has been marked as an answer

Hi Anders

Sorry about the mix-up. The other two checks are added now and available for download in 8.9.2.10

/Morten

Votes for this answer: 1

 

You must be logged in to post in the forum