I am currently working with the uWebshop package. I am trying to modify the ssws-xslt-productdetailsview.xslt so that it shows the extra fields I added on the doctype.
I can't seem to get the thing right. Something is wrong in the select I guess. But i can't figure out what. Tried a bunch of different thing with the select without luck.
The code looks like this:
<xsl:param name="currentPage"/> <!-- GET THE BASKETNODE --> <xsl:variable name="basketId" select="$currentPage/ancestor-or-self::*/sswsOrderProcessNode/@id"/>
1117 is the ID for the shop and 1118 is for the catalog. Do I need to make a variable similar the basketId variable to get the data to display? I can't quite see how to go about it.
uWebshop custom project details view xslt
Hi guys
I am currently working with the uWebshop package. I am trying to modify the ssws-xslt-productdetailsview.xslt so that it shows the extra fields I added on the doctype.
I can't seem to get the thing right. Something is wrong in the select I guess. But i can't figure out what. Tried a bunch of different thing with the select without luck.
The code looks like this:
<xsl:param name="currentPage"/>
<!-- GET THE BASKETNODE -->
<xsl:variable name="basketId" select="$currentPage/ancestor-or-self::*/sswsOrderProcessNode/@id"/>
<xsl:variable name="currentCategoryUrlName" select="umbraco.library:RequestQueryString('category')"/>
<xsl:variable name="currentProductUrlName" select="umbraco.library:RequestQueryString('product')"/>
<xsl:variable name="currentProduct" select="SSWS.Catalog:GetProductFromUrlName($currentCategoryUrlName, $currentProductUrlName)"/>
<xsl:template match="/">
<h2>
<xsl:value-of select="$currentProduct/title"/>
</h2>
<!-- Produkt specs box -->
<div class="produktSpecs">
<p><xsl:value-of select="$currentPage/specsOverskrift"/></p>
<div class="graaSpecsBox">
<div><p>Varenr.</p><xsl:value-of select="productNumber"/></div>
<div><p>Mål:</p><xsl:value-of select="specsMaal"/></div>
<div><p>Tykkelse:</p><xsl:value-of select="tykkelse"/></div>
<div><p>Farve:</p><xsl:value-of select="farve"/></div>
<div><p>Overflade:</p><xsl:value-of select="overflade"/></div>
<div><p>Bund:</p><xsl:value-of select="specsBund"/></div>
<div><p>Pakning:</p><xsl:value-of select="pakning"/></div>
<div><p>Vægt:</p><xsl:value-of select="specsVgt"/></div>
<div><p>Lager:</p><xsl:value-of select="lagerStatus"/></div>
<div><p>Levering:</p><xsl:value-of select="levering"/></div>
</div>
<div class="vejledendePris">Vejl. pris: Kr. <xsl:value-of select="vejledendePris"/>,-</div>
<div class="inproPris">Inpro pris: <xsl:value-of select="inproPris"/>,- kr. pr. m2 inkl. moms</div>
</div>
<!-- Produkt specs box SLUT -->
..... and so on :)
Any help or pointers would be much appreciated :)
/Michael
Hi Michael,
You probably just need to prefix all the fieldnames with $currentProduct, e.g.:
Etc.
/Chriztian
Tried that. Did not do the trick :(
And a totally unrelated question. How do I paste my code so it looks like your code. With that colors etc. ? :)
Hmm - I don't know whay kind of XML you get from the SSWS.Catalog extensions, so you might need to do some debugging, i.e.:
This will give you the output from $currentProduct so you can see how you need to address it with XPath.
Regarding the code formatting, I've found this to get the best results:
* Copy code as plain text from Notepad or a texteditor (if you copy from somewhere else, paste in a texteditor first and copy from there)
* Put the cursor on a blank line
* Select "Preformatted" in the style dropdown
* Paste the code (in Safari I need to Undo then paste again to fix some linebreak issues)
/Chriztian
Will give it a go and get back :)
Thx for the tip on formatting the code. Did not even think to look there :P
/Michael
When I try it I get this:
1117 is the ID for the shop and 1118 is for the catalog. Do I need to make a variable similar the basketId variable to get the data to display? I can't quite see how to go about it.
So it would be something like :
/Michael
Finally found a solution here: http://blog.uwebshop.com/2011/06/01/custom-properties-in-uwebshop/
I needed to add the word custom in front of my custom property aliases.
Thx for your help Chriztian Steinmeier :)
/Michael
is working on a reply...