Select an Option:<br /> <select name="nodeId"> <!-- loop through each of the variant products --> <xsl:for-each select="$product/Product"> <!-- do whatever you like here --> <option value="{@id}"> <xsl:if test="$variant/@id = @id"> <xsl:attribute name="selected">true</xsl:attribute> </xsl:if> <xsl:value-of select="@nodeName" /> </option> </xsl:for-each> </select>
However when selecting a variant it loads the full description and I obvioulsy just wnat the price change. Presumably its handled in a bit of JS somewhere.
Could you please point me in the right direction please.
Yes, the variant javascript loads the entire product again. Switching both prices, texts and images. To change that you go to teaCommerce_Simple.js and the updateProduct method. You can change it in any way you like.
I am using your old starterkit (not the new bike shop) to display products as its rather good.
The home page has TWO product sections both referencing product nodes via a picker control on the home page.
The Second section passes in the productlist.xslt which loads in the required products from the picker. This is styled like the product category section parent of the product.
The First section is similar except I have modded the styling to show one product with more information and a larger picture.
Its html is coming form productListDealOfTheDay.xslt to get the home page picker reference
I got the mail. Looks like a pretty classic problem.
It looks like a xslt problem of some kind. Remember that when the page is initiated this is done with the main product. When invokeXSLT is invoked the produt is then reloaded, but this time with the variant node.
You have to check that your xslt's can handle that.
Well I want to mimic the behavoir of the working "section 2"panels.
If I can see that I can correct problem as it should be indentical.
I need to get visibility how you are updating the products. Do you have a diagram or flow diagram of the process. It would make more sense and I suspect be helpful to others using Tea Commerce.
As you can see in the javascript, it will find the div with the class invokeXSLT. In that div is stored information about what xslt to load, when the variant is changed. You must ensure that the right xslt is written there, and it actually looks like it's the wrong one in your case.
It's loading the product.xslt, but it should be loading the same one that is loaded the first time.
I have another section which is vertically identical calling productListDealOfTheDay.xslt and then productList-product-Dotd.xslt for the html and styling. The invoke XSLT is:
Show variants on the front page
Hello I am trying to mod your XSLT for handling the DEAL of the DAY by including variants.
I have found the block of code that does the magic:
However when selecting a variant it loads the full description and I obvioulsy just wnat the price change. Presumably its handled in a bit of JS somewhere.
Could you please point me in the right direction please.
Hi Streety,
Yes, the variant javascript loads the entire product again. Switching both prices, texts and images. To change that you go to teaCommerce_Simple.js and the updateProduct method. You can change it in any way you like.
/Rune
Found the method.
Sorry about the spoonfeeding...but where from here
My xlst has the appropriate class
That depends on where we're going :)
What do you exactly want it to do? Please spoonfeed me as well ;)
/Rune
Sorry,
I am using your old starterkit (not the new bike shop) to display products as its rather good.
The home page has TWO product sections both referencing product nodes via a picker control on the home page.
The Second section passes in the productlist.xslt which loads in the required products from the picker. This is styled like the product category section parent of the product.
The First section is similar except I have modded the styling to show one product with more information and a larger picture.
Its html is coming form productListDealOfTheDay.xslt to get the home page picker reference
which calls ...
Might be simpler to show you.
Can I email you the link?
Have sent the url to [email protected]
Hope that is OK
Yes, please do: rg [at] teasolutions.dk
/Rune
Oh OK?
Hi Streety,
I got the mail. Looks like a pretty classic problem.
It looks like a xslt problem of some kind. Remember that when the page is initiated this is done with the main product. When invokeXSLT is invoked the produt is then reloaded, but this time with the variant node.
You have to check that your xslt's can handle that.
/Rune
Well I want to mimic the behavoir of the working "section 2"panels.
If I can see that I can correct problem as it should be indentical.
I need to get visibility how you are updating the products. Do you have a diagram or flow diagram of the process. It would make more sense and I suspect be helpful to others using Tea Commerce.
Thanks again.
It's actually pretty streight forward.
As you can see in the javascript, it will find the div with the class invokeXSLT. In that div is stored information about what xslt to load, when the variant is changed. You must ensure that the right xslt is written there, and it actually looks like it's the wrong one in your case.
It's loading the product.xslt, but it should be loading the same one that is loaded the first time.
/Rune
Hmmm, I sure its simple for you Rune. I don't have the benefit of designing this.
My templates look correct.
For instance the only place I can find that invokeXSLT is within the calling xlt file.
Lets take ProductListFeatured for example which calls productList-Product.xslt to get its HTML and styling. The line to invoke is:
<div class="invokeXSLT">productListfeatured.xslt</div>
I have this on my home page and it works fine.
I have another section which is vertically identical calling productListDealOfTheDay.xslt and then productList-product-Dotd.xslt for the html and styling. The invoke XSLT is:
<div class="invokeXSLT">productListDealOfTheDay.xslt</div>
Unless its:
getting its Invoke commenad elsewhere
or
You can only invoke on template per page
It doesn't make sense that it works for the featured but not for the deal of the day.
I am getting there.
It seems my invokeXSLT is writing twice first by my code then overwritten by the product one.
I have debugged to a class causing the kerfuflle
How's it going with this problem? And yes, of cause it's easier for us. But only because we already made all the mistakes. :)
/Rune
How's it going with this problem? And yes, of cause it's easier for us. But only because we already made all the mistakes. :)
/Rune
is working on a reply...