Product Documents Spanning Portals

Jun 15, 2009 at 4:46 AM
Edited Jun 15, 2009 at 4:49 AM

Hi There

When adding a document to a product, nb_store lists all products documents found in NB_Store_ProductDoc table - (Query is distinct to prevent duplicates from listing, but does not limit to portal.)

Is it possible to have a settings option to limit the listing to "portal only documents" or change the procedure to always have it list portal only documents. - I can modify my version, but the group may prefer and user option or a default setting change.

NB_Store_ProductDoc has a ProductID and NB_StoreProduct has PortalID - therefore a join in the querie could limit the list to portal only documents.

I checked the procedure and it could be coded with an extra parameter @PortalID -- (Note, cut down version below - not the full proc code)
also note i changed the alias for ProductDoc from P to Pd - it made sense after adding table Products.

And, If using a user option setting an extra parameter could passed ie @Limit_To_Portal BIT and the code below modified to accomodate option.

PROCEDURE [dbo].[NEvoweb_NB_Store_ProductDoc_GetSelectList]
@Lang
nchar(5
),
@FilterText nvarchar(50
),
@PortalID INT
SELECT DISTINCT Pd.DocPath, PL.Lang, PL.DocDesc, Pd.FileName, Pd.FileExt
FROM NB_Store_ProductDoc AS
Pd
INNER JOIN NB_Store_Products AS P ON Pd.ProductID = P.
ProductID
LEFT OUTER JOIN NB_Store_ProductDocLang AS PL ON PL.DocID = Pd.DocID AND PL.Lang =
@Lang
Where PortalID
=@PortalID
ORDER  BY Pd.FileName
 

Coordinator
Jun 15, 2009 at 9:04 AM

Hi,

The fact that the docs aren't limited to a single portal is an oversight on my part.  It really should be.

I'll try and put a fix in for the next release.

Thanks,

Dave.

Coordinator
Jun 15, 2009 at 9:05 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.