I am experiencing problems with some of the scripts I have on the product page: tabs (using idTabs script) and the related products on bottom use this jQuery carousel.
I can see that the related products, which is added again on postback, are only the ones with no variants. I also have a problem with updating the currency on the related products.. inside the form tag on product page, the related products is removed on postback and outside the form tag the currency isn't updated: http://sub.ak-security.dk/da/shop/category-a/product-a1.aspx
<xsl:output method="html" omit-xml-declaration="yes"/> <!-- WHAT IS THIS FILE? Writes the html for a single product. Is used on it's own and assumes that currentPage is a Product. --> <xsl:param name="currentPage"/> <xsl:include href="relatedProducts.xslt" /> <xsl:variable name="currentCurrency" select="teacommerce:GetCurrentCurrency()"/>
<xsl:template match="/">
<!-- I make the name() = 'Product' check here to force umbraco to save the page. Otherwise it cheats and throws errors all over the place. --> <xsl:apply-templates select="$currentPage [name() = 'Product']" /> </xsl:template>
<!-- The product image is fetched from either the product or the first variant --> <!--<xsl:variable name="productImageId" select="teacommerce:GetProperty($variant, 'productImage')" /> <xsl:variable name="productImage"> <xsl:if test="$productImageId != ''"> <xsl:value-of select="umbraco.library:GetMedia($productImageId, 0)/umbracoFile" /> </xsl:if> </xsl:variable>--> <xsl:variable name="categoryPageUrl"> <xsl:if test="$category/@id != ''"> <xsl:value-of select="umbraco.library:NiceUrl($category/@id)" /> </xsl:if> </xsl:variable> <xsl:variable name="productNumber" select="teacommerce:GetProperty($variant, 'productNumber')" /> <!-- The product category name --> <xsl:variable name="categoryName" select="teacommerce:GetProperty($variant, 'umbHeadline', 'name() = "ProductCategory" and count(./ProductCategory) = 0')" /> <!-- The product Name --> <xsl:variable name="productName" select="teacommerce:GetProperty($variant, 'productName')" /> <!-- The product description is fetched from either the product or the first variant --> <xsl:variable name="productDescription" select="teacommerce:GetProperty($variant, 'productDescription')" />
<!-- The product stock is fetched from either the product or the first variant --> <xsl:variable name="stock" select="teacommerce:GetStock($variant)" /> <!-- The product prices is fetched in all currencies --> <xsl:variable name="prices" select="teacommerce:GetPrices($variant)" /> <xsl:variable name="priceUnFormatted" select="$prices/* [name() = $currentCurrency/@ISOCode]/@price" /> <!-- The product price with the current currency and formatted with the current culture --> <xsl:variable name="price" select="teacommerce:FormatPriceWithSpecificCulture($priceUnFormatted, $currentCurrency/@cultureName)" /> <!-- Class of this product --> <xsl:variable name="class"> <xsl:value-of select="name($variant)" /> <xsl:text> product productToUpdate</xsl:text> </xsl:variable> <!-- VARIABLES END -->
<!-- HTML START --> <div id="product" class="productToUpdate" productId="{$variant/@id}" itemscope="" itemtype="http://schema.org/Product"> <xsl:attribute name="class"> <xsl:value-of select="$class" /> </xsl:attribute> <!-- The following div#invokeXSLT is used by the update script to load the correct xslt when updating the UI --> <div class="invokeXSLT">product_product.xslt</div> <a href="{$categoryPageUrl}" id="backToCategory" class="noPrint"><xsl:value-of select="umbraco.library:GetDictionaryItem('pfBack')"/></a> <form action="/tcbase/teacommerce/SubmitForm.aspx" method="post"> <input name="ReturnUrl" type="hidden" value="" /> <input name="AddOrderLine" type="hidden" value="nodeId,quantity" />
Update content during postback
Hi..
I am experiencing problems with some of the scripts I have on the product page: tabs (using idTabs script) and the related products on bottom use this jQuery carousel.
On this page http://sub.ak-security.dk/da/shop/lygter/led-lenser-p7.aspx it seem to update the related products so it is added to the site for each postback when changing the currency in the header.
On this page http://sub.ak-security.dk/da/shop/beklaedning/a-code-t-shirt.aspx it doesn't seem to affect the related products, but the product image and has also only one image as the first example page, but it's probably because it use variants and it's only the product itself which has an image. But the change of the currency shouln't update the product image? It seems to be the same in the starterkit when updating the currency: http://starterkit.teacommerce.dk/en/products/category-a/product-a1.aspx
Is there a way to specify which content to be updated?
also I have had some problem with using these jQuery plugins, but often it's important the scripts are loaded in the correct order.
Bjarne
I can see that the related products, which is added again on postback, are only the ones with no variants.
I also have a problem with updating the currency on the related products.. inside the form tag on product page, the related products is removed on postback and outside the form tag the currency isn't updated: http://sub.ak-security.dk/da/shop/category-a/product-a1.aspx
Bjarne
is working on a reply...