Commerce Server Catalog - Join Key for a variant

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server Catalog > September 2004 > Join Key for a variant





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Join Key for a variant
JF VALLET

2004-08-27, 6:07 pm

Hello,

Developping a CS 2K2 Site, i want to manage a separate table for the
inventory of my products to not cache these values by the catalog manager.

What i want then is to use the setJoinTable to join the CS product object
with this table.

I can successfully managed a join between using a Product Id join key.
But what i need to do is to join on the variant ID because the inventory is
variant level.

I'm affraid i can't do this.

Has someone some experience that could help me

Thanks,

JF VALLET
Vinayak Tadas[MSFT]

2004-08-27, 6:07 pm

If all the variants in your catalog have unique VariantIds then you can do
a join using the VariantId key.


--------------------
Thread-Topic: Join Key for a variant
thread-index: AcSMIy9cjJ8c4x0HSyGockRqsEGhGg==
X-WBNR-Posting-Host: 213.11.64.80
From: =?Utf-8?B?SkYgVkFMTEVU?= <JFVALLET@discussions.microsoft.com>
Subject: Join Key for a variant
Date: Fri, 27 Aug 2004 03:47:01 -0700
Lines: 19
Message-ID: <563364B1-BD4D-4816-BD73-456683028635@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.catalog
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.catalog:4904
X-Tomcat-NG: microsoft.public.commerceserver.catalog

Hello,

Developping a CS 2K2 Site, i want to manage a separate table for the
inventory of my products to not cache these values by the catalog manager.

What i want then is to use the setJoinTable to join the CS product object
with this table.

I can successfully managed a join between using a Product Id join key.
But what i need to do is to join on the variant ID because the inventory is
variant level.

I'm affraid i can't do this.

Has someone some experience that could help me

Thanks,

JF VALLET


Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

JF VALLET

2004-08-29, 5:49 pm

Thanks for your response,

I've got unique Variant Ids and in fact i've tried to use the variant id key.

I think that you are right because i've found out with the stored procedure
how to solve my problem.

EXEC dbo.ctlg_GetProductVariantProperties
1,N'01FR-2R',N'fr- FR',N'XR6E(2R)',N'',1,N'PMTC_PRD_DISPO',
N'VariantID',
N'PRDP_CODE_TECHNIQUE',N'cy_list_price,T
imeStamp,VariantID'

Where PMTC_PRD_DISPO is my join table, VariantID the product catalog
variantID and PRD_CODE_TECHNIQUE is my join key.

But i can't find how to do this from the object model.

What i do is to get the product of a category and then call the getVariants
method on it. But when i look with the profiler what happened, it seems that
the object model have forgotten my join instruction.

Here are the lines concerned ...

CommerceContext.Current.CatalogSystem.SetJoinTable("PMTC_PRD_DISPO",
"VariantID", "PRDP_CODE_TECHNIQUE", CatalogJoinType.OuterJoinLeft);

ProductCatalog productCatalog =
CommerceCatalogModule.CatalogContext.GetCatalog("01FR-2R");

Category category = productCatalog.GetCategory("Racing(2R)");

Product p = productCatalog.GetProduct("XR6E(2R)");

DataSet products = p.GetVariants();

When i look in the profiler, the stored procedure is

EXEC dbo.ctlg_GetProductVariantProperties
1,N'01FR-2R',N'fr-FR',N'XR6E(2R)',N'',- 1,NULL,NULL,NULL,N'cy_list_price,TimeSta
mp,VariantID'

If you have an idea ...

Regards,

JF VALLET



""Vinayak Tadas[MSFT]"" wrote:

> If all the variants in your catalog have unique VariantIds then you can do
> a join using the VariantId key.
>
>
> --------------------
> Thread-Topic: Join Key for a variant
> thread-index: AcSMIy9cjJ8c4x0HSyGockRqsEGhGg==
> X-WBNR-Posting-Host: 213.11.64.80
> From: =?Utf-8?B?SkYgVkFMTEVU?= <JFVALLET@discussions.microsoft.com>
> Subject: Join Key for a variant
> Date: Fri, 27 Aug 2004 03:47:01 -0700
> Lines: 19
> Message-ID: <563364B1-BD4D-4816-BD73-456683028635@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.catalog
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.catalog:4904
> X-Tomcat-NG: microsoft.public.commerceserver.catalog
>
> Hello,
>
> Developping a CS 2K2 Site, i want to manage a separate table for the
> inventory of my products to not cache these values by the catalog manager.
>
> What i want then is to use the setJoinTable to join the CS product object
> with this table.
>
> I can successfully managed a join between using a Product Id join key.
> But what i need to do is to join on the variant ID because the inventory is
> variant level.
>
> I'm affraid i can't do this.
>
> Has someone some experience that could help me
>
> Thanks,
>
> JF VALLET
>
>
> Thanks
> Vinayak Tadas
> Microsoft
> http://blogs.msdn.com/vinayakt
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security. Please
> reply to the newsgroups only

Vinayak Tadas[MSFT]

2004-09-09, 5:52 pm

You should add the joint table information in Web.config under the
joinTable element. See the docs for more information,
The CommerceCatalogModule.CatalogContext will read the join table
information from web.config and set it on the returned CatalogContext object
If you want to set the join table on the
CommerceContext.Current.CatalogSystem then you should use this object and
call GetCatalog().
You can also try setting the join table on the
CommerceCatalogModule.CatalogContext.SetJoinTable()

--------------------
Thread-Topic: Join Key for a variant
thread-index: AcSOC5WfhwpCbJgLThmoVikHKmiKdg==
X-WBNR-Posting-Host: 83.155.241.69
From: =?Utf-8?B?SkYgVkFMTEVU?= <JFVALLET@discussions.microsoft.com>
References: <563364B1-BD4D-4816-BD73-456683028635@microsoft.com>
<XrglG9FjEHA.3956@cpmsftngxa10.phx.gbl>
Subject: RE: Join Key for a variant
Date: Sun, 29 Aug 2004 14:03:07 -0700
Lines: 110
Message-ID: <3B5022C6-5111-44FB-972D-B56690BD952F@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.catalog
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.catalog:4906
X-Tomcat-NG: microsoft.public.commerceserver.catalog

Thanks for your response,

I've got unique Variant Ids and in fact i've tried to use the variant id
key.

I think that you are right because i've found out with the stored procedure
how to solve my problem.

EXEC dbo.ctlg_GetProductVariantProperties
1,N'01FR-2R',N'fr- FR',N'XR6E(2R)',N'',1,N'PMTC_PRD_DISPO',
N'VariantID',
N'PRDP_CODE_TECHNIQUE',N'cy_list_price,T
imeStamp,VariantID'

Where PMTC_PRD_DISPO is my join table, VariantID the product catalog
variantID and PRD_CODE_TECHNIQUE is my join key.

But i can't find how to do this from the object model.

What i do is to get the product of a category and then call the getVariants
method on it. But when i look with the profiler what happened, it seems
that
the object model have forgotten my join instruction.

Here are the lines concerned ...

CommerceContext.Current.CatalogSystem.SetJoinTable("PMTC_PRD_DISPO",
"VariantID", "PRDP_CODE_TECHNIQUE", CatalogJoinType.OuterJoinLeft);

ProductCatalog productCatalog =
CommerceCatalogModule.CatalogContext.GetCatalog("01FR-2R");

Category category = productCatalog.GetCategory("Racing(2R)");

Product p = productCatalog.GetProduct("XR6E(2R)");

DataSet products = p.GetVariants();

When i look in the profiler, the stored procedure is

EXEC dbo.ctlg_GetProductVariantProperties
1,N'01FR-2R',N'fr-FR',N'XR6E(2R)',N'',-1,NULL,NULL,NULL,N'cy_list_price,Time
Stamp,VariantID'

If you have an idea ...

Regards,

JF VALLET



""Vinayak Tadas[MSFT]"" wrote:

> If all the variants in your catalog have unique VariantIds then you can

do
> a join using the VariantId key.
>
>
> --------------------
> Thread-Topic: Join Key for a variant
> thread-index: AcSMIy9cjJ8c4x0HSyGockRqsEGhGg==
> X-WBNR-Posting-Host: 213.11.64.80
> From: =?Utf-8?B?SkYgVkFMTEVU?= <JFVALLET@discussions.microsoft.com>
> Subject: Join Key for a variant
> Date: Fri, 27 Aug 2004 03:47:01 -0700
> Lines: 19
> Message-ID: <563364B1-BD4D-4816-BD73-456683028635@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.catalog
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.catalog:4904
> X-Tomcat-NG: microsoft.public.commerceserver.catalog
>
> Hello,
>
> Developping a CS 2K2 Site, i want to manage a separate table for the
> inventory of my products to not cache these values by the catalog manager.
>
> What i want then is to use the setJoinTable to join the CS product object
> with this table.
>
> I can successfully managed a join between using a Product Id join key.
> But what i need to do is to join on the variant ID because the inventory

is
> variant level.
>
> I'm affraid i can't do this.
>
> Has someone some experience that could help me
>
> Thanks,
>
> JF VALLET
>
>
> Thanks
> Vinayak Tadas
> Microsoft
> http://blogs.msdn.com/vinayakt
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All

rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security.

Please
> reply to the newsgroups only



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com