Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 46

Thread: xmlpackage to add Facebook 'Like' buttons & OG tags with bonus rel-canonical support

  1. #31
    Join Date
    Sep 2005
    Posts
    213

    Default

    I am testing on the simple product XML
    Hope its ok to post it here.
    HTML Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Simple Product" debug="false" includeentityhelper="true">
    
    	<!-- ###################################################################################################### -->
    	<!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.					                -->
    	<!-- http://www.aspdotnetstorefront.com														                -->
    	<!-- For details on this license please visit  the product homepage at the URL above.		                -->
    	<!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
    	<!--                                                                                                        -->
    	<!-- ###################################################################################################### -->
    
        <query name="Products" rowElementName="Product" runif="showproduct">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_ProductInfo @ProductID, @CustomerLevelID, 1, 0, @affiliateID
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@affiliateID"     paramtype="system"  requestparamname="AffiliateID"     sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
    
        <query name="Products" rowElementName="Product" runif="edit">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_EditOrderProduct @ShoppingCartRecID, @CustomerLevelID
                ]]>
            </sql>
            <queryparam paramname="@ShoppingCartRecID" paramtype="request" requestparamname="CartRecID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID"   paramtype="system"  requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
        <PackageTransform>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf" xmlns:fb="http://www.facebook.com/2008/fbml">
    
                <xsl:output method="html" omit-xml-declaration="yes" />
    			<xsl:param name="pLink" select="aspdnsf:ProductLink(ProductID, SEName, 0)" />
    			<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="XmlPackageName" select="/root/System/XmlPackageName" />
    			
    
    
                <xsl:param name="SecID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/sectionid) &gt; 0"><xsl:value-of select="/root/QueryString/sectionid" /></xsl:when>
                    	<xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
    			
                </xsl:param>
                
                
                <xsl:param name="CatID">
                    <xsl:choose>
                    	<xsl:when test="count(/root/QueryString/categoryid) &gt; 0"><xsl:value-of select="/root/QueryString/categoryid" /></xsl:when>
                    	<xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:template match="/">
                    <xsl:comment>Copyright 1995-2009 AspDotNetStorefront.com</xsl:comment>
                    <xsl:choose>
                        <xsl:when test="count(root/Products/Product) &gt; 1">
                            <xsl:for-each select="/root/Products/Product[position()=1]">
                                <xsl:call-template name="MultiVariant"/>
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:apply-templates select="/root/Products/Product" />
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    
    
            <!-- this could obviously be expanded to properly handle multi-variant products -->
                <xsl:template name="MultiVariant">
    
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$pName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
    
                    <table border="0" width="100%" cellpadding="4" cellspacing="0">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 0, $AltText)" disable-output-escaping="yes" />
                            </td>
                            <td align="left" valign="top" width="100%">
                                <div>
    							
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="100%" align="left" valign="middle">
                                                <span class="ProductNameText">
                                                    <xsl:value-of select="$pName" disable-output-escaping="yes" />
    												
                                                </span>
                                            </td>
                                            <td align="right" valign="Middle">
                                                <xsl:if test="boolean(/root/Runtime/showproduct)">
                                                <nobr>
                                                    <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                </nobr>
                                                </xsl:if>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div>
                                    <br />
                                </div>
                                <div>
                                    <b>
                                        <font color="red">
                                            Display of multi-variant products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" />
                                        </font>
                                    </b>
                                </div>
                            </td>
                        </tr>
                    </table>
    
                </xsl:template>
    
    
                <xsl:template match="Product">
    
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(SalesPromptName)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="aspdnsf:GetMLValue(SEAltText)=''"><xsl:value-of select="aspdnsf:GetMLValue(Name)" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="aspdnsf:GetMLValue(SEAltText)" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
                    <xsl:choose>
                        <xsl:when test="IsAKit=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr>
                                    <td align="left" valign="top">                                    
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><b><font color="red">Display of Kit Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" /></font></b></div>
                                    </td>
                                </tr>
                            </table>
                        </xsl:when>
                        <xsl:when test="IsAPack=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr><td align="left" valign="top">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><b><font color="red">Display of Pack Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" /></font></b></div>
                                    </td>
                                </tr>
                            </table>
    						
                        </xsl:when>
                        <xsl:otherwise>
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr><td align="left" valign="top">
    							
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td><div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: '', status: true, cookie: true, xfbml: true});
      };
      (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol + '//connect.facebook.net/en_GB/all.js';
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>
    <div style="width:450px">
    <fb:like href="http://australia.continentalclothing.jp/{$pLink}" show_faces="false" width="450" font="verdana"></fb:like><br />
    </div>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                        <br/>
                                                        <xsl:value-of select="aspdnsf:EmailProductToFriend(ProductID, $CatID)" disable-output-escaping="yes"/>
                                                        <br/>
                                                        <xsl:value-of select="aspdnsf:ProductSpecsLink(ProductID, SpecsInline, SpecTitle, SKU, SpecCall)" disable-output-escaping="yes" />
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
    
                                                      <xsl:if test="aspdnsf:AppConfigBool('PayPal.Promo.Enabled')='true'">
                                                        <xsl:if test="Price &lt;= aspdnsf:AppConfig('PayPal.Promo.CartMaximum') and Price &gt;= aspdnsf:AppConfig('PayPal.Promo.CartMinimum')">
                                                          <p>
                                                            <a target="_blank">
                                                              <xsl:attribute name="href">
                                                                <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.LearnMoreURL')"/>
                                                              </xsl:attribute>
                                                              <img>
                                                                <xsl:attribute name="src">
                                                                  <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.BannerURL')"/>
                                                                </xsl:attribute>
                                                              </img>
                                                            </a>
                                                          </p>
                                                        </xsl:if>
                                                      </xsl:if>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><xsl:value-of select="$pDescription" disable-output-escaping="yes"/></div>
                                        <div><br /></div>
    									<xsl:choose>
    										<!-- 
                                              Showing of inventory table also goes through the rules of DisplayOutOfStock appconfig if enabled..
                                            -->
    										<xsl:when test="aspdnsf:AppConfigBool('ShowInventoryTable')='true'">
    											<div>
    												<xsl:value-of select="aspdnsf:ShowInventoryTable(ProductID, VariantID)" disable-output-escaping="yes" />
    											</div>
    										</xsl:when>
    										<xsl:otherwise>
    											<xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
    												<div>
    														<xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID, 'Product')" disable-output-escaping="yes" />
    												</div>
    											</xsl:if>
    										</xsl:otherwise>
    									</xsl:choose>
    				                    <xsl:if test="number(CustomerEntersPrice)=0">
                                            <div>
                                                <span>
                                                    <xsl:attribute name="id">VariantPrice_<xsl:value-of select="VariantID"/></xsl:attribute>
                                                    <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes" />
                                                </span>
                                            </div>
                                            <br />
                    				    </xsl:if>
                                        <div>
                                            <xsl:value-of select="aspdnsf:ShowQuantityDiscountTable(ProductID)" disable-output-escaping="yes"/><br/>
                                            <xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 1)" disable-output-escaping="yes"/>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <xsl:if test="boolean(/root/Runtime/showproduct)">
                            <xsl:value-of select="aspdnsf:RelatedProducts(ProductID)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:RecentlyViewed(ProductID)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:ShowUpsellProducts(ProductID)" disable-output-escaping="yes"/>
    							          <xsl:value-of select="aspdnsf:AlsoBought(ProductID, VariantID)" disable-output-escaping="yes"/>
    							          <xsl:value-of select="aspdnsf:ProductSpecs(ProductID, 1, SpecsInline, SpecCall, 400)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>
                            </xsl:if>
                        </xsl:otherwise>
                    </xsl:choose>
    
                </xsl:template>
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>
    http://australia.continentalclothing...d-t-shirt.aspx

    Thank you
    Last edited by tito; 01-16-2012 at 03:52 AM.
    Gordon

    8.1.1

  2. #32
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    873

    Default

    Here you go :-


    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Simple Product" debug="false" includeentityhelper="true">
    
    	<!-- ###################################################################################################### -->
    	<!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.					                -->
    	<!-- http://www.aspdotnetstorefront.com														                -->
    	<!-- For details on this license please visit  the product homepage at the URL above.		                -->
    	<!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
    	<!--                                                                                                        -->
    	<!-- ###################################################################################################### -->
    
        <query name="Products" rowElementName="Product" runif="showproduct">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_ProductInfo @ProductID, @CustomerLevelID, 1, 0, @affiliateID
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@affiliateID"     paramtype="system"  requestparamname="AffiliateID"     sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
    
        <query name="Products" rowElementName="Product" runif="edit">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_EditOrderProduct @ShoppingCartRecID, @CustomerLevelID
                ]]>
            </sql>
            <queryparam paramname="@ShoppingCartRecID" paramtype="request" requestparamname="CartRecID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID"   paramtype="system"  requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
        <PackageTransform>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf" xmlns:fb="http://www.facebook.com/2008/fbml">
    
                <xsl:output method="html" omit-xml-declaration="yes" />
    			
    			<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="XmlPackageName" select="/root/System/XmlPackageName" />
    			
    
    
                <xsl:param name="SecID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/sectionid) &gt; 0"><xsl:value-of select="/root/QueryString/sectionid" /></xsl:when>
                    	<xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
    			
                </xsl:param>
                
                
                <xsl:param name="CatID">
                    <xsl:choose>
                    	<xsl:when test="count(/root/QueryString/categoryid) &gt; 0"><xsl:value-of select="/root/QueryString/categoryid" /></xsl:when>
                    	<xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:template match="/">
                    <xsl:comment>Copyright 1995-2009 AspDotNetStorefront.com</xsl:comment>
                    <xsl:choose>
                        <xsl:when test="count(root/Products/Product) &gt; 1">
                            <xsl:for-each select="/root/Products/Product[position()=1]">
                                <xsl:call-template name="MultiVariant"/>
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:apply-templates select="/root/Products/Product" />
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    
    
            <!-- this could obviously be expanded to properly handle multi-variant products -->
                <xsl:template name="MultiVariant">
    
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$pName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
    
                    <table border="0" width="100%" cellpadding="4" cellspacing="0">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 0, $AltText)" disable-output-escaping="yes" />
                            </td>
                            <td align="left" valign="top" width="100%">
                                <div>
    							
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="100%" align="left" valign="middle">
                                                <span class="ProductNameText">
                                                    <xsl:value-of select="$pName" disable-output-escaping="yes" />
    												
                                                </span>
                                            </td>
                                            <td align="right" valign="Middle">
                                                <xsl:if test="boolean(/root/Runtime/showproduct)">
                                                <nobr>
                                                    <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                </nobr>
                                                </xsl:if>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div>
                                    <br />
                                </div>
                                <div>
                                    <b>
                                        <font color="red">
                                            Display of multi-variant products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" />
                                        </font>
                                    </b>
                                </div>
                            </td>
                        </tr>
                    </table>
    
                </xsl:template>
    
    
                <xsl:template match="Product">
    				<xsl:param name="pLink" select="aspdnsf:ProductLink(ProductID, SEName, 0)" />
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(SalesPromptName)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="aspdnsf:GetMLValue(SEAltText)=''"><xsl:value-of select="aspdnsf:GetMLValue(Name)" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="aspdnsf:GetMLValue(SEAltText)" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
                    <xsl:choose>
                        <xsl:when test="IsAKit=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr>
                                    <td align="left" valign="top">                                    
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><b><font color="red">Display of Kit Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" /></font></b></div>
                                    </td>
                                </tr>
                            </table>
                        </xsl:when>
                        <xsl:when test="IsAPack=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr><td align="left" valign="top">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><b><font color="red">Display of Pack Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" /></font></b></div>
                                    </td>
                                </tr>
                            </table>
    						
                        </xsl:when>
                        <xsl:otherwise>
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr><td align="left" valign="top">
    							
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
                                    </td><div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: '', status: true, cookie: true, xfbml: true});
      };
      (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol + '//connect.facebook.net/en_GB/all.js';
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>
    <div style="width:450px">
    <fb:like href="http://australia.continentalclothing.jp/{$pLink}" show_faces="false" width="450" font="verdana"></fb:like><br />
    </div>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText"><xsl:value-of select="$pName" disable-output-escaping="yes" /></span>
                                                        <br/>
                                                        <xsl:value-of select="aspdnsf:EmailProductToFriend(ProductID, $CatID)" disable-output-escaping="yes"/>
                                                        <br/>
                                                        <xsl:value-of select="aspdnsf:ProductSpecsLink(ProductID, SpecsInline, SpecTitle, SKU, SpecCall)" disable-output-escaping="yes" />
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
    
                                                      <xsl:if test="aspdnsf:AppConfigBool('PayPal.Promo.Enabled')='true'">
                                                        <xsl:if test="Price &lt;= aspdnsf:AppConfig('PayPal.Promo.CartMaximum') and Price &gt;= aspdnsf:AppConfig('PayPal.Promo.CartMinimum')">
                                                          <p>
                                                            <a target="_blank">
                                                              <xsl:attribute name="href">
                                                                <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.LearnMoreURL')"/>
                                                              </xsl:attribute>
                                                              <img>
                                                                <xsl:attribute name="src">
                                                                  <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.BannerURL')"/>
                                                                </xsl:attribute>
                                                              </img>
                                                            </a>
                                                          </p>
                                                        </xsl:if>
                                                      </xsl:if>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div><br /></div>
                                        <div><xsl:value-of select="$pDescription" disable-output-escaping="yes"/></div>
                                        <div><br /></div>
    									<xsl:choose>
    										<!-- 
                                              Showing of inventory table also goes through the rules of DisplayOutOfStock appconfig if enabled..
                                            -->
    										<xsl:when test="aspdnsf:AppConfigBool('ShowInventoryTable')='true'">
    											<div>
    												<xsl:value-of select="aspdnsf:ShowInventoryTable(ProductID, VariantID)" disable-output-escaping="yes" />
    											</div>
    										</xsl:when>
    										<xsl:otherwise>
    											<xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
    												<div>
    														<xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID, 'Product')" disable-output-escaping="yes" />
    												</div>
    											</xsl:if>
    										</xsl:otherwise>
    									</xsl:choose>
    				                    <xsl:if test="number(CustomerEntersPrice)=0">
                                            <div>
                                                <span>
                                                    <xsl:attribute name="id">VariantPrice_<xsl:value-of select="VariantID"/></xsl:attribute>
                                                    <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes" />
                                                </span>
                                            </div>
                                            <br />
                    				    </xsl:if>
                                        <div>
                                            <xsl:value-of select="aspdnsf:ShowQuantityDiscountTable(ProductID)" disable-output-escaping="yes"/><br/>
                                            <xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 1)" disable-output-escaping="yes"/>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <xsl:if test="boolean(/root/Runtime/showproduct)">
                            <xsl:value-of select="aspdnsf:RelatedProducts(ProductID)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:RecentlyViewed(ProductID)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:ShowUpsellProducts(ProductID)" disable-output-escaping="yes"/>
    							          <xsl:value-of select="aspdnsf:AlsoBought(ProductID, VariantID)" disable-output-escaping="yes"/>
    							          <xsl:value-of select="aspdnsf:ProductSpecs(ProductID, 1, SpecsInline, SpecCall, 400)" disable-output-escaping="yes"/>
                            <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>
                            </xsl:if>
                        </xsl:otherwise>
                    </xsl:choose>
    
                </xsl:template>
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>

    TTFN

    BFG

  3. #33
    Join Date
    Sep 2005
    Posts
    213

    Smile WAW thats amazing

    Thank you very much BFG9000
    VERY KIND OF YOU..

    CHEERS

    May i ask what was the change/problem..
    Am trying to compare the old with the new but can't find anything...
    Last edited by tito; 01-16-2012 at 06:27 PM.
    Gordon

    8.1.1

  4. #34
    Join Date
    Sep 2005
    Posts
    213

    Default

    Just figured it out .. seems like it was the location of

    <xslaram name="pLink" select="aspdnsf:ProductLink(ProductID, SEName, 0)" />

    that made error ..
    THANK YOU
    Gordon

    8.1.1

  5. #35
    Join Date
    Sep 2005
    Posts
    213

    Default

    I am using Imagenameoveride
    example http://australia.continentalclothing...edium/EP40.jpg

    what code do i change in the XML
    Is this the code i need to edit ..

    HTML Code:
    !-- start of setting the image link for product pages -->
    			<xsl:param name="image_link">
    				<xsl:choose>
    <xsl:when test="/root/System/PageName = 'showproduct.aspx' and boolean(/root/QueryString/productid)"><xsl:value-of select="$site"/>images/Product/medium/<xsl:value-of select="/root/QueryString/productid"/>.jpg</xsl:when>
    					<xsl:otherwise>0</xsl:otherwise>
    				</xsl:choose>
    			</xsl:param>
    <!-- end of setting the image link for product pages -->

    Quote Originally Posted by BFG 9000 View Post
    Ahh I see.

    The product image for that is actually named WWKNSW130010NUD.jp rather then 26387.jpg - I guess you're using imagenameoverride?

    If so - you'll need to tweak the xmlpackage to allow for that.


    TTFN

    BFG
    Gordon

    8.1.1

  6. #36
    Join Date
    Apr 2009
    Posts
    19

    Default

    I thought I had this all working, but apparently not…

    When I click the like button and start entering a comment I notice a red message next to the button that reads ‘Error’. When I click on it I get redirected to FB and receive the message
    ‘There was an error retrieving data for http://www.cubookstore.com/p-4853-1-...-finger.aspx.’

    As far as I can tell it’s all working accept the image does not get displayed in the FB feed. I did get the image to work when I first tried BFG’s instructions, but can’t get it back. I have been running my changes through here http://developers.facebook.com/tools/debug but the errors don’t make sense to me. It’s saying there is no og:url, og:type, or og:title, but I can see them all in the page source. It also says it can’t scrape the page.

    The one difference I notice is when I change my link from http:// to https:// in the debugger I get a totally different message but the image still does not appear. It also seems like I get different response depending if the product has been liked or not.

    any help or suggestions would be greatly appreciated.

    Thank you,
    Eric
    7.1.0.0

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Simple Product" debug="false" includeentityhelper="true">
    
        <!-- ###################################################################################################### -->
        <!-- Copyright AspDotNetStorefront.com, 1995-2008.  All Rights Reserved.					                -->
        <!-- http://www.aspdotnetstorefront.com														                -->
        <!-- For details on this license please visit  the product homepage at the URL above.		                -->
        <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
        <!--                                                                                                        -->
        <!-- ###################################################################################################### -->
    
        <query name="Products" rowElementName="Product" runif="showproduct">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_ProductInfo @ProductID, @CustomerLevelID, 1, 0, @affiliateID
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@affiliateID"     paramtype="system"  requestparamname="AffiliateID"     sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
    
        <query name="Products" rowElementName="Product" runif="edit">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_EditOrderProduct @ShoppingCartRecID, @CustomerLevelID
                ]]>
            </sql>
            <queryparam paramname="@ShoppingCartRecID" paramtype="request" requestparamname="CartRecID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID"   paramtype="system"  requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
    
        <PackageTransform>
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf" xmlns:fb="http://www.facebook.com/2008/fbml">
                <xsl:output method="html" omit-xml-declaration="yes" />
    
                <xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="XmlPackageName" select="/root/System/XmlPackageName" />
                <xsl:param name="SecID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/sectionid) &gt; 0">
                            <xsl:value-of select="/root/QueryString/sectionid" />
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
    
                <xsl:param name="CatID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/categoryid) &gt; 0">
                            <xsl:value-of select="/root/QueryString/categoryid" />
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:template match="/">
                    <xsl:comment>Copyright 1995-2008 AspDotNetStorefront.com</xsl:comment>
                    <xsl:choose>
                        <xsl:when test="count(root/Products/Product) &gt; 1">
                            <xsl:for-each select="/root/Products/Product[position()=1]">
                                <xsl:call-template name="MultiVariant"/>
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:apply-templates select="/root/Products/Product" />
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    
    
                <!-- this could obviously be expanded to properly handle multi-variant products -->
                <xsl:template name="MultiVariant">
    
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
    
    
    
                    <table border="0" width="100%" cellpadding="4" cellspacing="0">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:value-of select="aspdnsf:LookupImage(ProductID, 'product', 'medium', 1)" disable-output-escaping="yes"/>
                            </td>
                            <td align="left" valign="top" width="100%">
                                <div>
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="100%" align="left" valign="middle">
                                                <span class="ProductNameText">
                                                    <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                                </span>
                                            </td>
                                            <td align="right" valign="Middle">
                                                <xsl:if test="boolean(/root/Runtime/showproduct)">
                                                    <nobr>
                                                        <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                    </nobr>
                                                </xsl:if>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div>
                                    <br />
                                </div>
                                <div>
                                    <b>
                                        <font color="red">
                                            Display of multi-variant products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" />
                                        </font>
                                    </b>
                                </div>
                            </td>
                        </tr>
                    </table>
    
                </xsl:template>
    
    
                <xsl:template match="Product">
                    <!--FB like & comments link start-->
                    <xsl:param name="pLink" select="aspdnsf:ProductLink(ProductID, SEName, 0)"></xsl:param>
                    <!--FB like & comments link end-->
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(SalesPromptName)"></xsl:param>
    
                    <xsl:choose>
                        <xsl:when test="IsAKit=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr>
                                    <td align="left" valign="top">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText">
                                                            <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                                        </span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div>
                                            <br />
                                        </div>
                                        <div>
                                            <b>
                                                <font color="red">
                                                    Display of Kit Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" />
                                                </font>
                                            </b>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </xsl:when>
                        <xsl:when test="IsAPack=1">
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr>
                                    <td align="left" valign="top">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="100%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <span class="ProductNameText">
                                                            <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                                        </span>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div>
                                            <br />
                                        </div>
                                        <div>
                                            <b>
                                                <font color="red">
                                                    Display of Pack Products is not supported by this XmlPackage.<br /><br />XmlPackage=<xsl:value-of select="$XmlPackageName" />
                                                </font>
                                            </b>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </xsl:when>
    
    
    
    
                        <xsl:otherwise>
                            <table border="0" width="100%" cellpadding="4" cellspacing="0">
                                <tr>
                                    <td align="right" valign="top" width="50%">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1)" disable-output-escaping="yes"/>
                                    </td>
                                    <td align="left" valign="top" width="50%">
                                        <div>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100%" align="left" valign="middle">
                                                        <br/>
                                                        <br/>
                                                        <span class="ProductNameText">
                                                            <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                                        </span>
                                                        <br/>
                                                        <span>
                                                            SKU# <xsl:value-of select="SKU" disable-output-escaping="yes" />
                                                        </span>
                                                        <br/>
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, $CatID, $SecID)" disable-output-escaping="yes" />
                                                            <xsl:value-of select="aspdnsf:EmailProductToFriend(ProductID, $CatID)" disable-output-escaping="yes"/>
                                                        </nobr>
                                                    </td>
                                                    <td align="right" valign="Middle">
                                                        <nobr>
                                                            <xsl:value-of select="aspdnsf:ProductNavLinks(ProductID, /root/Runtime/EntityID, /root/Runtime/EntityName, /root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/SEName, 0, 1, 1)" disable-output-escaping="yes" />
                                                        </nobr>
    
                                                        <xsl:if test="aspdnsf:AppConfigBool('PayPal.Promo.Enabled')='true'">
                                                            <xsl:if test="Price &lt;= aspdnsf:AppConfig('PayPal.Promo.CartMaximum') and Price &gt;= aspdnsf:AppConfig('PayPal.Promo.CartMinimum')">
                                                                <p>
                                                                    <a target="_blank">
                                                                        <xsl:attribute name="href">
                                                                            <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.LearnMoreURL')"/>
                                                                        </xsl:attribute>
                                                                        <img>
                                                                            <xsl:attribute name="src">
                                                                                <xsl:value-of select="aspdnsf:AppConfig('PayPal.Promo.BannerURL')"/>
                                                                            </xsl:attribute>
                                                                        </img>
                                                                    </a>
                                                                </p>
                                                            </xsl:if>
                                                        </xsl:if>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div>
                                            <br />
                                        </div>
                                        <xsl:if test="aspdnsf:AppConfigBool('ShowInventoryTable')='true'">
                                            <div>
                                                <xsl:value-of select="aspdnsf:ShowInventoryTable(ProductID, VariantID)" disable-output-escaping="yes" />
                                            </div>
                                        </xsl:if>
                                        <xsl:if test="number(CustomerEntersPrice)=0">
                                            <div id="price">
                                                <span>
                                                    <xsl:attribute name="id">
                                                        VariantPrice_<xsl:value-of select="VariantID"/>
                                                    </xsl:attribute>
                                                    <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes" />
                                                </span>
                                            </div>
                                            <br />
                                        </xsl:if>
                                        <div>
                                            <xsl:value-of select="aspdnsf:ShowQuantityDiscountTable(ProductID)" disable-output-escaping="yes"/>
                                            <br/>
                                            <xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 1)" disable-output-escaping="yes"/>
                                        </div>
    
                                        <!--facebook like start-->
                                        <div id="fb-root"></div>
                                        <script>
                                            window.fbAsyncInit = function() {
                                            FB.init({appId: '141703142604248',status: true, cookie: true,
                                            xfbml: true});
                                            };
                                            (function() {
                                            var e = document.createElement('script'); e.async = true;
                                            e.src = document.location.protocol +
                                            '//connect.facebook.net/en_US/all.js';
                                            document.getElementById('fb-root').appendChild(e);
                                            }());
                                        </script>
                                        <div style="padding:25px 0px 10px 0px;">
                                            <fb:like href="http://www.cubookstore.com/{$pLink}" show_faces="false" width="100%" font="verdana"></fb:like>
                                        </div>
                                        <!--facebook like end-->
                                    </td>
                                </tr>
                            </table>
    
    
                            <br/>
                            <table id="ProductDescription" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <div class="contentHeaders">FEATURES</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="description">
                                            <br />
                                            <xsl:value-of select="$pDescription" disable-output-escaping="yes"/>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <xsl:if test="boolean(/root/Runtime/showproduct)">
                                <xsl:value-of select="aspdnsf:RelatedProducts(ProductID)" disable-output-escaping="yes"/>
                                <xsl:value-of select="aspdnsf:ShowUpsellProducts(ProductID)" disable-output-escaping="yes"/>
                                <xsl:value-of select="aspdnsf:ProductSpecs(ProductID, 1, SpecsInline, SpecCall, 400)" disable-output-escaping="yes"/>
                                <!--  START REMOVES RATING IMAGES BUT NOT TEXT AND STARS-->
                                <br/>
                                <script>
                                    $(document).ready(function(){
                                    $("#rating-hider table table table:first").remove();
                                    });
                                </script>
                                <div id="rating-hider">
                                    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>
                                </div>
                                <!-- END REMOVES RATING IMAGES BUT NOT TEXT AND STARS-->
    
                            </xsl:if>
                        </xsl:otherwise>
                    </xsl:choose>
    
    
                </xsl:template>
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>

  7. #37
    Join Date
    Oct 2011
    Posts
    2

    Default Using this method with a secure domain

    So i'm getting a security warning out of Chrome. Everything works great, otherwise. Any ideas on how we can make this play nice with https domains?

    Thanks
    Alan

  8. #38
    Join Date
    Sep 2005
    Posts
    213

    Default

    I have been try to change this, to work with SKU rather then productId for days now but no luck.... Any body knows what i can do
    Sorry to keep asking...


    Quote Originally Posted by tito View Post
    I am using Imagenameoveride
    example http://australia.continentalclothing...edium/EP40.jpg

    what code do i change in the XML
    Is this the code i need to edit ..

    HTML Code:
    !-- start of setting the image link for product pages -->
    			<xsl:param name="image_link">
    				<xsl:choose>
    <xsl:when test="/root/System/PageName = 'showproduct.aspx' and boolean(/root/QueryString/productid)"><xsl:value-of select="$site"/>images/Product/medium/<xsl:value-of select="/root/QueryString/productid"/>.jpg</xsl:when>
    					<xsl:otherwise>0</xsl:otherwise>
    				</xsl:choose>
    			</xsl:param>
    <!-- end of setting the image link for product pages -->
    Gordon

    8.1.1

  9. #39
    Join Date
    Mar 2006
    Location
    United Kingdom
    Posts
    207

    Default

    Installed the code all fine and checked.

    Getting this error though...

    The app ID "334281766603203" specified within the "fb:app_id" meta tag was invalid.

    The facebook dev object debugger says this is the error

    Object Invalid Value Object at URL 'http://www.thefreemason.com/p-486-craft-master-mason-apron.aspx' of type 'product' is invalid because the given value '333934179971295' for property 'fb:admins' could not be parsed as type 'fbid'.

    Any ideas ?
    8.0.1.4 W2008R2 64-bit MSSQL2005

  10. #40
    Join Date
    Apr 2006
    Location
    Phoenix AZ
    Posts
    81

    Default

    use your own id for fb:abmin - https://developers.facebook.com/docs/reference/api/

    Quote Originally Posted by mikemurphy View Post
    Installed the code all fine and checked.

    Getting this error though...

    The app ID "334281766603203" specified within the "fb:app_id" meta tag was invalid.

    The facebook dev object debugger says this is the error

    Object Invalid Value Object at URL 'http://www.thefreemason.com/p-486-craft-master-mason-apron.aspx' of type 'product' is invalid because the given value '333934179971295' for property 'fb:admins' could not be parsed as type 'fbid'.

    Any ideas ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •