WebSphere Commerce suite - sku won't display

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Commerce suite > August 2004 > sku won't display





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 sku won't display
Diane

2004-08-19, 2:52 am

I am using WC Pro 5.5 on Windows 2000.
I have loaded catentry, baseitem, itemspc, storeitem tables with a
ProductBean and an ItemBean and the corresponding baseitem and itemspc set
up per the documentation. When I go into Commerce Accelerator, I can display
the sku on some of my products, but not all. Here is the message I get in
the log when an sku cannot be found.

com.ibm.commerce.catalog.commands.ResolveSkuCmdImpl getDistinctAttributes
CMN1009E: The command was unable to retrieve the SKU number from the
environment.

Does anyone have any idea how to correct this?

Thank you,
Dianne


Robert Brown

2004-08-19, 7:33 pm

> I am using WC Pro 5.5 on Windows 2000.
> I have loaded catentry, baseitem, itemspc, storeitem tables with a
> ProductBean and an ItemBean and the corresponding baseitem and itemspc set
> up per the documentation. When I go into Commerce Accelerator, I can display
> the sku on some of my products, but not all. Here is the message I get in
> the log when an sku cannot be found.
>
> com.ibm.commerce.catalog.commands.ResolveSkuCmdImpl getDistinctAttributes
> CMN1009E: The command was unable to retrieve the SKU number from the
> environment.
>
> Does anyone have any idea how to correct this?


Check for attribute anomalies with the products that throw the error.
The easiest thing to do is to look at joining the
CATENTRY-ATTRIBUTE-ATTRVALUE tables together to look at the attributes
you have for those SKUs in question. If you need help building the SQL
let me know, I might have something handy.

If 'color' is the name of the attribute, then you are allowed to assign
the specific colors (black, white, red, etc.) as attribute values for
that name. If you have two 'red' values for the same name attribute
'color' and the same SKU, then you can get this error. A null value may
cause problems with Accelerator as well.

R


Diane

2004-08-19, 11:00 pm

Thank you for your response. Your information will come in very handy as I
move on to setting up attributes.

This particular problem was because I did not have the catentrel table set
up correctly for some of the product to item relationships.

Thanks again,
Dianne

"Robert Brown" <rbrown@redbaritone.com> wrote in message
news:cg2c4d$6oko$1@news.boulder.ibm.com...
set[vbcol=seagreen]
display[vbcol=seagreen]
in[vbcol=seagreen]
getDistinctAttributes[vbcol=seagreen]
>
> Check for attribute anomalies with the products that throw the error.
> The easiest thing to do is to look at joining the
> CATENTRY-ATTRIBUTE-ATTRVALUE tables together to look at the attributes
> you have for those SKUs in question. If you need help building the SQL
> let me know, I might have something handy.
>
> If 'color' is the name of the attribute, then you are allowed to assign
> the specific colors (black, white, red, etc.) as attribute values for
> that name. If you have two 'red' values for the same name attribute
> 'color' and the same SKU, then you can get this error. A null value may
> cause problems with Accelerator as well.
>
> R
>
>



Robert Brown

2004-08-20, 2:52 am

> Thank you for your response. Your information will come in very handy as I
> move on to setting up attributes.
>
> This particular problem was because I did not have the catentrel table set
> up correctly for some of the product to item relationships.


Yep, items must be correctly assigned to their appropriate parent
(ProductBean, PackageBean, etc.) as well. Here is a query that I use
frequently to locate a SKU's attribute values. Substitute your
partnumbers and database name appropriately. The buyable flag is optional.

select
a.catentry_id, ce.partnumber, a.attrvalue_id,
a.name, a.stringvalue, a.attrtype_id
from
<dbname>.attrvalue as a, <dbname>.catentry as ce
where
a.catentry_id = ce.catentry_id and
ce.buyable = 1 and
ce.partnumber in ('<partnumber1>', '<partnumber2>')

This query came in handy when I had to determine how many SKUs had 2
attributes, 3 attributes, and so on. This can be easily modified to
show which SKUs have 2, 3, or more attribute values rather than the
total count.

with attributecount as
(
select
distinct a.catentry_id as productcount,
count (attrvalue_id) as attrcount
from
<dbname>.attrvalue as a, <dbname>.catentry as p
where
a.catentry_id = p.catentry_id and
p.buyable = 1 and
p.catenttype_id = 'ItemBean'
group by a.catentry_id
)
select
count (productcount) as productcount, attrcount
from
attributecount
where
attrcount > 1
group by attrcount
order by attrcount

DB2 specific...your mileage may vary.

R

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com