Well I have this: <xsl:variable name="PageID" select="umbraco.library:Request('PageId')"/> <xsl:variable name="Page" select="umbraco.library:GetXmlNodeById($PageID)"/> And when I pass either PageID or Page this error shows:
Error occured
System.ArgumentException: The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.GetStoreId(XPathNavigator model, Boolean useCachedInformation) at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.GetSku(XPathNavigator model, Boolean useCachedInformation) at TeaCommerce.Umbraco.Web.XsltExtensions.GetStock(Int64 storeId, String productIdentifier)
I'm no t on the actual varaint page. I use the above in a Ajax call.
Get stock from variants
Hi.
This maybe an iseay one :) But how to get stock from variants using:
<xsl:variable name="stock" select="TC:GetStock( 1, '1076' )"/>
/Palle
Hi Palle
Just pass in the node id of the variant. And be sure to have the stock data type for the variant doc type.
Kind regards
Anders
Well I have this:
<xsl:variable name="PageID" select="umbraco.library:Request('PageId')"/>
<xsl:variable name="Page" select="umbraco.library:GetXmlNodeById($PageID)"/>
And when I pass either PageID or Page this error shows:
Error occured
System.ArgumentException: The model doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree
at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.GetStoreId(XPathNavigator model, Boolean useCachedInformation)
at TeaCommerce.Umbraco.Configuration.InformationExtractors.XmlNodeProductInformationExtractor.GetSku(XPathNavigator model, Boolean useCachedInformation)
at TeaCommerce.Umbraco.Web.XsltExtensions.GetStock(Int64 storeId, String productIdentifier)
I'm no t on the actual varaint page. I use the above in a Ajax call.
The PageID is a variant i the shop
Looks like the node that you ask for doesnt have a parent with a store picker at it. It need that in the Umbraco node structure.
Kind regards
Anders
is working on a reply...