| Author |
Message |
Andreas Rathmayr
Guest
|
Posted:
Thu Dec 02, 2004 9:32 pm Post subject:
Virtual Catalog Bug (ProductCatalog3.AddPriceRule) |
|
|
Just stumbled over another bug with virtual catalogs. Several weeks ago we
reported a bug to MS concerning virtual catalogs. MS provided this
http://support.microsoft.com/default.aspx?scid=kb;en-us;875517 hotfix for
that. Commerce Server just could not handle categories with "(" or ")" signs
in their names.
Now I have a similar problem with variants. I use
ProductCatalog3.AddPriceRule to alter the product/variant price of a virtual
catalog. It works as expected on products but not on variants. In a virtual
catalog the ProductId consists of the product id from the base catalog and
"(BaseCatalogName)" e.g. "12345(MyBaseCatalog)". The VariantId remains the
same as in the base catalog (according to the CS Objects I use). Now when
you call AddPriceRule with the variantId from the virtual catalog it fails
with Product/Variant not found. The problem lies within the stored procedure
ctlg_VC_AddPriceRule. It fails if the variant id is not followed by
"(BaseCatalogName)". It does not get the BaseCatalog from the ProductId
where it is stored. It looks in the VaraintId where it is not provided when
you just pass the VariantId got from a CS Object.
regards,
Andi |
|
| Back to top |
|
 |
Andreas Rathmayr
Guest
|
Posted:
Fri Dec 10, 2004 12:57 pm Post subject:
Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule) |
|
|
| No comment on this? |
|
| Back to top |
|
 |
Austin Skyles [MSFT]
Guest
|
Posted:
Fri Jan 07, 2005 6:16 am Post subject:
Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule) |
|
|
I've investigated this issue, and the workaround is simply to append
"(BaseCatalogName)" to the variant ID, (Where BaseCatalogNameis the name of
the base catalog containing the variant.)
In my testing, the VariantID is of the format "VariantID(BaseCatalogName)"
in virtual catalogs, how are you using the CS objects to get the variant
ID, perhaps that is causing the wrong variant ID to be returned?
We are considering modifying this design in a future release of Commerce
Server, however, in Commerce Server 2002, the parameter will require the
base catalog name to be appended in this fashion.
Austin Skyles
Microsoft Corporation
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
--------------------
Reply-To: "Andreas Rathmayr" <_nospam_rathi2002@gmx.at>
From: "Andreas Rathmayr" <_nospam_rathi2002@gmx.at>
References: <OFdvhQI2EHA.1144@TK2MSFTNGP09.phx.gbl>
Subject: Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule)
Date: Fri, 10 Dec 2004 07:57:05 +0100
Lines: 3
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <OIJh4Vo3EHA.1188@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: 80.243.162.210
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
..phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15227
X-Tomcat-NG: microsoft.public.commerceserver.general
No comment on this? |
|
| Back to top |
|
 |
Andreas Rathmayr
Guest
|
Posted:
Thu Jan 27, 2005 8:28 pm Post subject:
Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule) |
|
|
Thanks for the answer.
Dim Microsoft.CommerceServer.Runtime.Catalog.Product as prod
prod.GetVariants()
This is how I get the Variants and it seams that the returned records do
contain the VariantId without the (BaseCatalogName). I was aware of the
"workaround" but it is not the optimal solution, because we would need a
check if virtual catalog or real on many places in our code.
Austin Skyles [MSFT] wrote:
| Quote: | I've investigated this issue, and the workaround is simply to append
"(BaseCatalogName)" to the variant ID, (Where BaseCatalogNameis the name of
the base catalog containing the variant.)
In my testing, the VariantID is of the format "VariantID(BaseCatalogName)"
in virtual catalogs, how are you using the CS objects to get the variant
ID, perhaps that is causing the wrong variant ID to be returned?
We are considering modifying this design in a future release of Commerce
Server, however, in Commerce Server 2002, the parameter will require the
base catalog name to be appended in this fashion.
Austin Skyles
Microsoft Corporation
|
|
|
| Back to top |
|
 |
Austin Skyles [MSFT]
Guest
|
Posted:
Tue Feb 01, 2005 6:48 am Post subject:
Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule) |
|
|
You could also use the catalog system's handling of these properties to
solve the problem, when adding a variant, you could call GetVariants and
supply a search clause for "OrigVariantId='variantId'", and use the
returned properties for VariantId to pass to AddPriceRule, this way you
don't need to know if it's a virtual or base catalog.
Austin Skyles
Microsoft Corporation
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
--------------------
Date: Thu, 27 Jan 2005 15:28:56 +0100
From: Andreas Rathmayr <_nospam_rathi2002@gmx.at>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: Virtual Catalog Bug (ProductCatalog3.AddPriceRule)
References: <OFdvhQI2EHA.1144@TK2MSFTNGP09.phx.gbl>
<OIJh4Vo3EHA.1188@tk2msftngp13.phx.gbl>
<$XJCn4E9EHA.2944@cpmsftngxa10.phx.gbl>
In-Reply-To: <$XJCn4E9EHA.2944@cpmsftngxa10.phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#L4IGyHBFHA.612@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: 80.243.162.210
Lines: 1
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15508
X-Tomcat-NG: microsoft.public.commerceserver.general
Thanks for the answer.
Dim Microsoft.CommerceServer.Runtime.Catalog.Product as prod
prod.GetVariants()
This is how I get the Variants and it seams that the returned records do
contain the VariantId without the (BaseCatalogName). I was aware of the
"workaround" but it is not the optimal solution, because we would need a
check if virtual catalog or real on many places in our code.
Austin Skyles [MSFT] wrote:
| Quote: | I've investigated this issue, and the workaround is simply to append
"(BaseCatalogName)" to the variant ID, (Where BaseCatalogNameis the name
of
the base catalog containing the variant.)
In my testing, the VariantID is of the format
"VariantID(BaseCatalogName)"
in virtual catalogs, how are you using the CS objects to get the variant
ID, perhaps that is causing the wrong variant ID to be returned?
We are considering modifying this design in a future release of Commerce
Server, however, in Commerce Server 2002, the parameter will require the
base catalog name to be appended in this fashion.
Austin Skyles
Microsoft Corporation
|
|
|
| Back to top |
|
 |
|
|
|
|