Problem with CS2007 'QueryCatalogInfo' Pipeline
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Problem with CS2007 'QueryCatalogInfo' Pipeline




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Problem with CS2007 'QueryCatalogInfo' Pipeline  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-06 12:21 PM

Hello I am developing an e-commerce website using MSCS 2007, and all is goin
g
great until I reached the order system.

Adding items to baskets is simple and working fine however when I attempt to
run the 'basket' pipeline. An error is generated during the first stages of
the pipeline - "QueryCatalogInfo". When it attempts to read the value
"item.product_catalog" an error is displayed:

Exception Details: System.Exception: Component Execution failed for
component[0x0]  hr: 0x80131500
ProgID: Commerce.QueryCatalogInfo
The catalog name is not valid. Catalog names may not be blank and may not
exceed 85 characters. Catalog names may not contain any of the following nin
e
reserved characters: .,"[]'()#.

I am sure there is a catalog available and I am also sure that this catalog
does not contain any .,"[]'()#.

Any1 knows where I can specify the catalog name of the catalog to be used
during the pipeline execution or does this pipeline executes on all product
catalogs defined in MSCS 2007??

Thanks for the help.
Steve






[ Post a follow-up to this message ]



    RE: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-06 12:21 PM

Hello Steve,

The problem is not with your catalog (otherwise it'd not have displayed )
The problem seems to be pertaining to storage of catalog name with your
lineitem object... The QueryCatalogInfo uses the catalog name, category name
(if available), product name (SKU) and product variant id (if present) to ge
t
the complete set of product details from the catalog system for use within
the pipelines. So I'd go and check the code being used to add the product to
the basket (there I'd also store the catalog name where I'm storing the SKU,
Qty, etc)

Hope this helps !
--
Ravi Shankar


"Steve" wrote:

> Hello I am developing an e-commerce website using MSCS 2007, and all is go
ing
> great until I reached the order system.
>
> Adding items to baskets is simple and working fine however when I attempt 
to
> run the 'basket' pipeline. An error is generated during the first stages o
f
> the pipeline - "QueryCatalogInfo". When it attempts to read the value
> "item.product_catalog" an error is displayed:
>
> Exception Details: System.Exception: Component Execution failed for
> component[0x0]  hr: 0x80131500
> ProgID: Commerce.QueryCatalogInfo
> The catalog name is not valid. Catalog names may not be blank and may not
> exceed 85 characters. Catalog names may not contain any of the following n
ine
> reserved characters: .,"[]'()#.
>
> I am sure there is a catalog available and I am also sure that this catalo
g
> does not contain any .,"[]'()#.
>
> Any1 knows where I can specify the catalog name of the catalog to be used
> during the pipeline execution or does this pipeline executes on all produc
t
> catalogs defined in MSCS 2007??
>
> Thanks for the help.
> Steve
>





[ Post a follow-up to this message ]



    RE: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-06 12:21 PM

Hello Ravi,

Thanks for replying to my post.

I would like to know however, when u mentioned about specifying the catalog
name in lineitem did u mean when a lineitem is added to the order form, i.e
during the:

LineItem lineItem = new LineItem();

// Set the required LineItem properties
// productItem is a variable of type Product.

lineItem.Quantity = quantity;
lineItem.ProductCatalog = "catalogName";
lineItem.ProductId = productItem.ProductId;
lineItem.DisplayName = productItem.DisplayName;
lineItem.ProductCategory = category;

//add lineitem to orderform:
orderForm.LineItems.Add(lineItem, true);
basket.Save();

This is the exact code I am using and that is generating the error. As u can
see the catalog name is actually defined.

Can it be a pipeline problem ? although I am using the default "Basket"
pipeline and it hasnt been modified.

Thanks again.

"Ravi Shankar" wrote:
[vbcol=seagreen]
> Hello Steve,
>
> The problem is not with your catalog (otherwise it'd not have displayed 
)
> The problem seems to be pertaining to storage of catalog name with your
> lineitem object... The QueryCatalogInfo uses the catalog name, category na
me
> (if available), product name (SKU) and product variant id (if present) to 
get
> the complete set of product details from the catalog system for use within
> the pipelines. So I'd go and check the code being used to add the product 
to
> the basket (there I'd also store the catalog name where I'm storing the SK
U,
> Qty, etc)
>
> Hope this helps !
> --
> Ravi Shankar
>
>
> "Steve" wrote:
> 





[ Post a follow-up to this message ]



    RE: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-06 12:21 PM

Hi Steve,

The problem line you'd need to examine would be

>    lineItem.ProductCatalog = "catalogName";
You'd need to check if the "catalogName" is indded the name of the catalog
to which this product belongs. is "catalogName" actually your catalog name o
r
the name of the variable which hold the catalog name ? 

--
Ravi Shankar


"Steve" wrote:
[vbcol=seagreen]
> Hello Ravi,
>
> Thanks for replying to my post.
>
> I would like to know however, when u mentioned about specifying the catalo
g
> name in lineitem did u mean when a lineitem is added to the order form, i.
e
> during the:
>
>    LineItem lineItem = new LineItem();
>
>    // Set the required LineItem properties
>    // productItem is a variable of type Product.
>
>    lineItem.Quantity = quantity;
>    lineItem.ProductCatalog = "catalogName";
>    lineItem.ProductId = productItem.ProductId;
>    lineItem.DisplayName = productItem.DisplayName;
>    lineItem.ProductCategory = category;
>
>    //add lineitem to orderform:
>    orderForm.LineItems.Add(lineItem, true);
>    basket.Save();
>
> This is the exact code I am using and that is generating the error. As u c
an
> see the catalog name is actually defined.
>
> Can it be a pipeline problem ? although I am using the default "Basket"
> pipeline and it hasnt been modified.
>
> Thanks again.
>
> "Ravi Shankar" wrote:
> 





[ Post a follow-up to this message ]



    Re: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Jeff Lynch


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-06 06:30 PM

I may be all wet on this, but from your code it looks like you may have
forgotten to run the pipeline before saving the basket.

I use this code to update by basket:

public void UpdateBasket(string pipelinename)
{
// Run the pipeline
_Basket. RunPipeline(GetBasketPipelineInfo(pipeli
nename));
// Save the Basket
_Basket.Save();
// Dispose of the PipelineInfo object
this.GetBasketPipelineInfo(pipelinename).Dispose();
}

--
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch


"Steve" <Steve@discussions.microsoft.com> wrote in message
news:640E9939-BAA2-4D8C-8D34-6DA006C4632C@microsoft.com...[vbcol=seagreen]
> Hello Ravi,
>
> Thanks for replying to my post.
>
> I would like to know however, when u mentioned about specifying the
> catalog
> name in lineitem did u mean when a lineitem is added to the order form,
> i.e
> during the:
>
>   LineItem lineItem = new LineItem();
>
>   // Set the required LineItem properties
>   // productItem is a variable of type Product.
>
>   lineItem.Quantity = quantity;
>   lineItem.ProductCatalog = "catalogName";
>   lineItem.ProductId = productItem.ProductId;
>   lineItem.DisplayName = productItem.DisplayName;
>   lineItem.ProductCategory = category;
>
>   //add lineitem to orderform:
>   orderForm.LineItems.Add(lineItem, true);
>   basket.Save();
>
> This is the exact code I am using and that is generating the error. As u
> can
> see the catalog name is actually defined.
>
> Can it be a pipeline problem ? although I am using the default "Basket"
> pipeline and it hasnt been modified.
>
> Thanks again.
>
> "Ravi Shankar" wrote:
> 







[ Post a follow-up to this message ]



    Re: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-13-06 12:16 AM

Hello Mr. Lynch,

I saw your article about adding items to basket on codebetter.com. Also,
thank you for your suggestion about running the pipeline before saving the
basket. Yes it's true I forgot to do that.

However I am trying to follow the MS way used in the MSCS 2006 starter site
and they have the basket saved before the running pipeline.

So, I will try what you suggested.

One last thing. In your code you used:
_Basket. RunPipeline(GetBasketPipelineInfo(pipeli
nename)); in the
UpdateBasket void.

'GetBasketPipelineInfo' is a custom function that returns a pipelineinfo
(variable) for a specified pipeline name and of specific type as in:

PipelineInfo pipeline = new PipelineInfo(pipelineName,
OrderPipelineType.Basket)
return pipeline;

am i right ?
Thanks

"Jeff Lynch" wrote:

> I may be all wet on this, but from your code it looks like you may have
> forgotten to run the pipeline before saving the basket.
>
> I use this code to update by basket:
>
> public void UpdateBasket(string pipelinename)
> {
>     // Run the pipeline
>     _Basket. RunPipeline(GetBasketPipelineInfo(pipeli
nename));
>     // Save the Basket
>     _Basket.Save();
>     // Dispose of the PipelineInfo object
>     this.GetBasketPipelineInfo(pipelinename).Dispose();
> }
>
> --
> Jeff Lynch
> MVP Windows Server System - Commerce Server
> http://codebetter.com/blogs/jeff.lynch
>
>
> "Steve" <Steve@discussions.microsoft.com> wrote in message
> news:640E9939-BAA2-4D8C-8D34-6DA006C4632C@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    RE: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-13-06 12:16 AM

Hello Ravi,

Yes, I am sure I am having the catalog name right. I changed the catalog
name in here for sake of the example: lineItem.ProductCatalog = "catalogName
";

I can't display the real catalog name here for business reasons.

I think however, that Jeff is right about his post.

"Ravi Shankar" wrote:
[vbcol=seagreen]
> Hi Steve,
>
> The problem line you'd need to examine would be
> 
> You'd need to check if the "catalogName" is indded the name of the catalog
> to which this product belongs. is "catalogName" actually your catalog name
 or
> the name of the variable which hold the catalog name ? 
>
> --
> Ravi Shankar
>
>
> "Steve" wrote:
> 





[ Post a follow-up to this message ]



    Re: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-13-06 12:16 AM

Unfortunatelly Jeff,

The problem persists, I am sure I got the catalog name right, I mean I can
browse the catalog get a product and display it's details (all these
functions require that I specify a catalog name, and they are all working).

But I can't get the pipeline to run without displaying a:
Exception Details: System.Exception: Component Execution failed for
component[0x0]  hr: 0x80131500
ProgID: Commerce.QueryCatalogInfo
The catalog name is not valid. Catalog names may not be blank and may not
exceed 85 characters. Catalog names may not contain any of the following nin
e
reserved characters: .,"[]'()#.

Any idea what could be causing this problem ?

Thanks
Steve

"Jeff Lynch" wrote:

> I may be all wet on this, but from your code it looks like you may have
> forgotten to run the pipeline before saving the basket.
>
> I use this code to update by basket:
>
> public void UpdateBasket(string pipelinename)
> {
>     // Run the pipeline
>     _Basket. RunPipeline(GetBasketPipelineInfo(pipeli
nename));
>     // Save the Basket
>     _Basket.Save();
>     // Dispose of the PipelineInfo object
>     this.GetBasketPipelineInfo(pipelinename).Dispose();
> }
>
> --
> Jeff Lynch
> MVP Windows Server System - Commerce Server
> http://codebetter.com/blogs/jeff.lynch
>
>
> "Steve" <Steve@discussions.microsoft.com> wrote in message
> news:640E9939-BAA2-4D8C-8D34-6DA006C4632C@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Problem with CS2007 'QueryCatalogInfo' Pipeline  
Jeff Lynch


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-13-06 12:16 AM

Steve,

I think you need to look at the code which returns the value your are
putting into the "catalogName" variable and passing to your code which sets
this value in the LineItem.ProductCatalog property. Set a break point on
your lineItem.ProductCatalog = "catalogName"; code and see what is really
being passed to this.

Look at the the part of your code which returns the
Microsoft.CommerceServer.Catalog.Product object. I use the code shown below
which takes the "CatalogName" and "ProductId" strings and returns the
Product object. Once you have the Product object you can return all it's
properties such as the CatalogItem.ProductCatalog.Name property which is
what you want to pass the LineItem.ProductCatalog property.

public Product GetProduct(string CatalogName, string ProductId)
{
// Return a Product object using the CatalogName and ProductId
return
CommerceContext.Current.CatalogSystem.GetCatalog(CatalogName).GetProduct(Pro
ductId);
}

If you still need help, ping me at jtlynch@houston.rr.com

--
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:34 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register