Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if ProductID is loaded

Status
Not open for further replies.

Datzent83

Programmer
Apr 18, 2002
2
US
I have a product XML package which displays a product for my shopping cart. I created a custom (related products) XML package and included it within the product XML package. I need to make sure that the related product XML package does not display the same product as is being currently viewed. I attached both my XML packages.

Thanks in advanced!
 
[0] First thing first. I am stranger to aspdnsf.
[1] Then I read the package files, I notice these.
[1.1] For the parameter BestSellerShowSales, when you use it, should you not attach "$" sign to it? (at three places, it seems). Take an example. But this is the your question.
[tt]<xsl:if test="[red]$[/red]BestSellersShowSales='true'">
<td align="center"><b><a href="bestsellers.aspx?orderby=units"><xsl:value-of select="aspdnsf:StringResource('bestsellers.aspx.1')" disable-output-escaping="yes" /></a></b></td>
<td align="center"><b><a href="bestsellers.aspx?orderby=amount"><xsl:value-of select="aspdnsf:StringResource('bestsellers.aspx.2')" disable-output-escaping="yes" /></a></b></td>
</xsl:if>[/tt]
[1.2] As to the question, I would suspect it should be resolve at the sql level rather than in the xslt level. For instance, if the [Name] sufficiently characterises the product in the variants db, I would try the inner join with an additional condition of name being not equal:
[tt] Product P Inner JOIN ProductVariant PV With (NOLOCK) ON P.ProductID = PV.ProductID [blue]and P.[Name]<>PV.[Name][/blue][/tt]
or something along this line of reasoning.
[1.3] As I said in [0], I may be completely off.
[2] If this forum cannot answer the question, maybe further the question to the general e-business:
But that forum may be too general to handle that specific.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top