Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -4,15 +4,16 @@ package queries
|
||||
// Pull variant dimension combos from Nebim's variant master table.
|
||||
// We intentionally keep it small: only the keys we need to write dim-aware prices into PG sdprc.
|
||||
//
|
||||
// Note: Column semantics depend on your Nebim setup. We treat ItemDim1Code/ItemDim3Code as the
|
||||
// primary variant dimensions used by the e-commerce sdprc dim filters.
|
||||
// Note: Column semantics depend on your Nebim setup. Here ColorCode and ItemDim2Code are the
|
||||
// user-visible/key dimensions; PG stores them as mmitem_dim.val1 and mmitem_dim.val3.
|
||||
// ItemDim1Code is kept only as size context for mmitem_dim seeding.
|
||||
const GetProductVariantDimsForPricing = `
|
||||
DECLARE @ProductCode NVARCHAR(50) = @p1;
|
||||
|
||||
SELECT DISTINCT
|
||||
LTRIM(RTRIM(ISNULL(V.ColorCode,''))) AS ColorCode,
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim1Code,''))) AS ItemDim1Code,
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim3Code,''))) AS ItemDim3Code
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim2Code,''))) AS ItemDim3Code
|
||||
FROM prItemVariant V WITH(NOLOCK)
|
||||
WHERE V.ItemTypeCode = 1
|
||||
AND V.ItemCode = @ProductCode
|
||||
@@ -21,5 +22,5 @@ WHERE V.ItemTypeCode = 1
|
||||
ORDER BY
|
||||
LTRIM(RTRIM(ISNULL(V.ColorCode,''))),
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim1Code,''))),
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim3Code,'')));
|
||||
LTRIM(RTRIM(ISNULL(V.ItemDim2Code,'')));
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user