Hello ...
Is their a way a can display the description for each product found within the "Product Matches" section within the search results page?
Many Thanks
Shafiq
Hello ...
Is their a way a can display the description for each product found within the "Product Matches" section within the search results page?
Many Thanks
Shafiq
Using AspDotNetStorefront ML 8.0.1.2
Summary data can be used. It has been called in the code behind and is readily available. Search on Summary.
Sure. The search xmlpackage already pulls the description of the products via the aspdnsf_GetProducts stored procedure. You simply have to modify the search xmlpackage. Just add a parameter to the Product template in page.search.xml.config to support localizationand then within that template useCode:<xsl:param name="pDescription"> <xsl:choose> <xsl:when test="count(Description/ml/locale[@name=$LocaleSetting])!=0"> <xsl:value-of select="Description/ml/locale[@name=$LocaleSetting]"/> </xsl:when> <xsl:when test="count(Description/ml/locale[@name=$WebConfigLocaleSetting])!=0"> <xsl:value-of select="Description/ml/locale[@name=$WebConfigLocaleSetting]"/> </xsl:when> <xsl:when test="count(Description/ml)=0"> <xsl:value-of select="Description"/> </xsl:when> </xsl:choose> </xsl:param>wherever you want to display it.Code:<xsl:value-of select="$pDescription"/>
<a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>
That's excellent George... Worked great
Many Thanks for your help.
Shafiq
Using AspDotNetStorefront ML 8.0.1.2
Hello Again ...
I also want the description to be displayed on the shopping cart page under the SKU for each item (shoppingcart.aspx)
Can you help on how I can achieve this too? I'm guessing this will involve some changes to the source code?
Many thanks again.
Shafiq
Using AspDotNetStorefront ML 8.0.1.2
You are correct. This will involve source code mods. You can do one of two things here. You can either add a Description property to the CartItem struct so that you access the description directly from a CartItem variable (you'll also need to populate the Description property when a CartItem is populated) and then modify the GetLineItemDescription method in the shoppingcart class to append the description which you can now access (if you've modified the CartItem struct as mentioned above) using c.m_description (where c is the name of the CartItem parameter passed to GetLineItemDescription and m_description is the name of the property you've created in the CartItem struct...it matches the naming conventions of the other properties), or you can simply modify the GetLineItemDescription to pull the description from the product record in the database based off of the ProductID which the CartItem variable already has (eg. c.m_ProductID).
<a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>
We don't do this by default, as it would make the cart page somewhat unreadable, unless you know yo have very short descriptions. As G1 said, the cart is controlled in DLL source (for quite a few reasons), so you'd have to mod source for this one.
AspDotNetStorefront
Shopping Cart
The descriptions are very short (4 or 5 words the most)
I've found the function GetLineItemDescription within ShoppingCart.vb but i'm quite new to aspndsf so i'm a bit unsure on how to proceed with this.
Any help would be great.
Thanks a lot
Using AspDotNetStorefront ML 8.0.1.2
Yes, under the AspDotNetStorefrontCore.ShoppingCart.GetLineItemDe scription, all you need to do is add these lines of code:
Note: These lines are only converted via code converter tool. I made the modification on C#...Code:Dim ProductDescription As String = String.Empty Using con As New SqlConnection(DB.GetDBConn()) con.Open() Dim query As String = "select Description from Product where ProductID = " & c.m_ProductID Using rsx As IDataReader = DB.GetRS(query, con) If rsx.Read() Then ProductDescription = DB.RSField(rsx, "Description") End If End Using End Using tmpS.Append("<br/> Description:") tmpS.Append(ProductDescription)
Original lines of code in C#:
Code:string ProductDescription = string.Empty; using (SqlConnection con = new SqlConnection(DB.GetDBConn())) { con.Open(); string query = "select Description from Product where ProductID = " + c.m_ProductID; using (IDataReader rsx = DB.GetRS(query, con)) { if (rsx.Read()) { ProductDescription = DB.RSField(rsx, "Description"); } } } tmpS.Append("<br/> Description:"); tmpS.Append(ProductDescription);
and that's it...![]()
Brilliant. That worked a treat.
Many Thanks Jao!
Regards
Shafiq :sK
Using AspDotNetStorefront ML 8.0.1.2