Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 20 of 20

Thread: [BOUNTY: $50] Google Trusted Stores XML Package - Can you help?

  1. #1
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default [BOUNTY: $50] Google Trusted Stores XML Package - Can you help?

    Hi guys, I originally posted this item here (Link) and figured this was a better location for an XML Package.

    Fist the concept code to implement Google Trusted Stores, it is a modification of don.irwin's code he posted here (Link).. and my concept code dosn't work, but I am offering a bounty of $50 to your paypal account to help make this work. The problem (other than errors galore because I am no XML expert) is finding the productid when landing on a product page:

    Yesterday, I installed this package and realized the same type of XML package could be used for "Google trusted stores" implementation.

    So here is the Idea:
    (bare with me as I pulled the concept from a couple of posts here on the forum):

    We need to create an Xml Package (like don.irwin) and register it with the template.master in the skin template directory, so that the template can do all the heavy lifting on all the pages of your store.

    The key features of the XML Package:

    1- The main code of the don.irwin's analytics package is modified is below with the Google trusted store info. The code is a concept that I have been kicking around, and will not work at this time. The following would require two account codes provided by Google. First the Trusted Store id represented by 4 X's in the code (XXXX) and the Google merchant account ID, represented by 7 X's in the code (XXXXXXX). Also, you need to put in your domain, instead of mine in the code. The question marks in the code (???????) should contain the ProductId when landing on a product page, but are blank when not on a product page:

    PLEASE DO NOT USE CONCEPT CODE, IT WILL PRODUCE ERRORS AT THIS TIME:

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="TrustedStore" debug="false" includeentityhelper="false">
      <query name="Order" rowElementName="OrderInfo">
        <sql>
          <![CDATA[
          select o.*, (case when o.AffiliateID = 0
    then 'None' else (select a.Name from dbo.Affiliate a  with (NOLOCK) where a.AffiliateID = o.AffiliateID) end) as AffiliateName From dbo.orders o with (NOLOCK)
    where o.ordernumber = @ordernum
           ]]>
        </sql>
        <queryparam paramname="@ordernum" paramtype="request" requestparamname="ordernumber" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
      </query>
      <query name="OrderItems" rowElementName="Item">
        <sql>
          <![CDATA[
              SELECT  s.ShoppingCartRecID, 
                      s.OrderNumber, 
                      s.ProductID, 
                      s.VariantID, 
                      s.Quantity, 
                      s.ChosenColor, 
                      s.ChosenSize, 
                      s.OrderedProductName, 
                      s.OrderedProductVariantName, 
                      s.OrderedProductSKU, 
                      s.OrderedProductPrice, 
                      s.OrderedProductRegularPrice, 
                      s.OrderedProductSalePrice, 
                      s.OrderedProductExtendedPrice, 
                      s.OrderedProductQuantityDiscountName, 
                      s.OrderedProductQuantityDiscountID, 
                      s.OrderedProductQuantityDiscountPercent, 
                      s.IsShipSeparately, 
                      s.IsDownload, 
                      s.FreeShipping, 
                      s.TextOption, 
                      s.ShippingMethod, 
                      s.Notes, 
                      s.ExtensionData, 
                      s.CustomerEntersPrice, 
                      s.GiftRegistryForCustomerID, 
                      s.ShippingAddressID, 
                      s.ShippingDetail, 
                      s.SizeOptionPrompt, 
                      s.ColorOptionPrompt, 
                      s.TextOptionPrompt, 
                      s.IsTaxable, 
                      s.TaxClassID, 
                      s.TaxRate,
                      ISNULL(s.IsAKit, 0) AS IsAKit, 
                      ISNULL(s.IsAPack, 0) AS IsAPack, 
                      ISNULL(s.IsSystem, 0) AS IsSystem
              FROM dbo.Orders_ShoppingCart s WITH (NOLOCK) 
              WHERE s.ordernumber = @ordernum
              ORDER by s.ShippingAddressID
                ]]>
        </sql>
        <queryparam paramname="@ordernum" paramtype="request" requestparamname="ordernumber" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
      </query>
    
      <PackageTransform>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
          <xsl:output method="html" omit-xml-declaration="yes"/>
          <xsl:variable name="OrderNumber" select="/root/Order/OrderInfo/OrderNumber" />
          <xsl:template match="/">
            <!-- BEGIN: Google Trusted Store -->
            <!-- the code below needs to be run on all pages -->
    		<script type="text/javascript">
    		  var gts = gts || [];
    		  gts.push(["id", "XXXX"]);
    		  gts.push(["google_base_offer_id", "???????"]);
      		  gts.push(["google_base_subaccount_id", "XXXXXXX"]);
      		  gts.push(["google_base_country", "US"]);
      		  gts.push(["google_base_language", "en"]);
      		  
      		    (function() {
    		    var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    		    var gts = document.createElement("script");
    		    gts.type = "text/javascript";
    		    gts.async = true;
    		    gts.src = scheme + "www.googlecommerce.com/trustedstores/gtmp_compiled.js";
    		    var s = document.getElementsByTagName("script")[0];
    		    s.parentNode.insertBefore(gts, s);
    		  })();
            </script>
    		<!-- END: Google Trusted Store -->
      
      		<!-- START Trusted Stores Order -->
      		<!-- the code below needs to be run only when on the order confirmation page -->
      		
      		<xsl:if test="/root/Runtime/PageName = 'orderconfirmation.aspx'">
    		<div id="gts-order" style="display:none;">
    		
    		  <!-- start order and merchant information -->
    		  <span id="gts-o-id"><xsl:value-of select="$OrderNumber" /></span>
    		  <span id="gts-o-domain">www.revgenetics.com</span>
    		  <span id="gts-o-email"><xsl:value-of select="/root/Order/OrderInfo/Email" /></span>
    		  <span id="gts-o-country"><xsl:value-of select="/root/Order/OrderInfo/BillingCountry" /></span>
    		  <span id="gts-o-currency">USD</span>
    		  <span id="gts-o-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderTotal, '0.00')" /></span>
    		  <span id="gts-o-discounts">0.00</span>
    		  <span id="gts-o-shipping-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderShippingCosts, '0.00')" /></span>
    		  <span id="gts-o-tax-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderTax, '0.00')" /></span>
    		  <script type="text/javascript">
    		  	var d1=new Date();
    		  	dl.setDate(dl.getDate() + 7);
    		  	document.write("<span id="gts-o-est-ship-date">"+d1.toString('yyyy-MM-dd')+"</span>");
    		  //<span id="gts-o-est-ship-date">d1.toString('yyyy-MM-dd');</span>
              </script>
    		  <span id="gts-o-has-preorder">N</span>
    		  <span id="gts-o-has-digital">N</span>
    		  <!-- end order and merchant information -->
    		  
                <xsl:apply-templates select="/root/OrderItems/Item" />
              </xsl:if>
          </xsl:template>
    
     		 <!-- start repeated item specific information -->
          <xsl:template match="Item">
     		<xsl:if test="/root/Runtime/PageName = 'orderconfirmation.aspx'">
     		
     	    <!-- the code below needs to be run only when on the order confirmation page -->
     
    		  <span class="gts-item">
    		    <span class="gts-i-name"><xsl:value-of select="OrderedProductName" /></span>
    		    <span class="gts-i-price"><xsl:value-of select="OrderedProductPrice" /></span>
    		    <span class="gts-i-quantity"><xsl:value-of select="Quantity" /></span>
    		    <span class="gts-i-prodsearch-id"><xsl:value-of select="ProductID" /></span>
    		    <span class="gts-i-prodsearch-store-id">XXXXXXX</span>
    		    <span class="gts-i-prodsearch-country">US</span>
    		    <span class="gts-i-prodsearch-language">en</span>
    		  </span>
    		 
            
              </xsl:if>
                <!-- end repeated item specific information -->
          </xsl:template>
        </xsl:stylesheet>
      </PackageTransform>
    </package>
    2- The key posts to create the template are don.irwin's post () that can do most of the work by modifiing the output. The code above represents my chicken scratch of the modifications. As for the ProductID represented in the code by my questions marks (??????), I am not sure how to query the product page for the product id to help complete the code.

    At this point, I would like to ask for help to complete this Xml Package. Don.Irwin and others, can you take a look to see if some of the concept code can be used?

    MUCH appreciated guys! Oh, and I will put a BOUNTY of $50, if you can modify this and make it work like don.irwin's code. So if you post a solution, and it works... send me your paypal email, and you get $50. Maybe others can add to the bounty, if they find the solution saves them hours and headaches.

    Thanks
    A

    The solution need to be posted on this thread, to receive the bounty, this helps everyone else benefit from it.
    Last edited by usascholar; 06-13-2012 at 07:17 AM.

  2. #2
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    No takers yet?

    I surely don't want to pay myself $50... and have a clean XML Package instead of a Frankenstein one.

    Ok, so far I am putting this piece of code into my simple product xml package, but I really want something cleaner, and done everywhere through the template.master:

    Code:
              <div>
    	          <!-- BEGIN: Google Trusted Store -->
    	  	  <script type="text/javascript">
    	  	  var gts = gts || [];
    	  	  
    	  	  gts.push(["id", "XXXX"]);
    	  	  gts.push(["google_base_offer_id", "<xsl:value-of select="aspdnsf:GetMLValue(ProductID)" disable-output-escaping="yes"/>"]);
    	  	  gts.push(["google_base_subaccount_id", "XXXXXXX"]);
    	  	  gts.push(["google_base_country", "US"]);
    	  	  gts.push(["google_base_language", "en"]);
    	  	  
    	  	  (function() {
    	  	  var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    	  	  var gts = document.createElement("script");
    	  	  gts.type = "text/javascript";
    	  	  gts.async = true;
    	  	  gts.src = scheme + "www.googlecommerce.com/trustedstores/gtmp_compiled.js";
    	  	  var s = document.getElementsByTagName("script")[0];
    	  	  s.parentNode.insertBefore(gts, s);
    	  	  })();
    	  	  </script>
    	  	  <!-- END: Google Trusted Store -->
              </div>
    Now... trying to make the other code work.... hmmm..

    A

  3. #3
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Well....

    I tried the following code and it says
    Error in XmlPackage(.Load), Package=[rev.trustedstore.xml.config], Msg=[Exception='<', hexadecimal value 0x3C, is an invalid attribute character. Line 66, position 44.<br/>]

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="TrustedStore" debug="false" includeentityhelper="false">
      <query name="Order" rowElementName="OrderInfo">
        <sql>
          <![CDATA[
          select o.*, (case when o.AffiliateID = 0
    then 'None' else (select a.Name from dbo.Affiliate a  with (NOLOCK) where a.AffiliateID = o.AffiliateID) end) as AffiliateName From dbo.orders o with (NOLOCK)
    where o.ordernumber = @ordernum
           ]]>
        </sql>
        <queryparam paramname="@ordernum" paramtype="request" requestparamname="ordernumber" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
      </query>
      <query name="OrderItems" rowElementName="Item">
        <sql>
          <![CDATA[
              SELECT  s.ShoppingCartRecID, 
                      s.OrderNumber, 
                      s.ProductID, 
                      s.VariantID, 
                      s.Quantity, 
                      s.ChosenColor, 
                      s.ChosenSize, 
                      s.OrderedProductName, 
                      s.OrderedProductVariantName, 
                      s.OrderedProductSKU, 
                      s.OrderedProductPrice, 
                      s.OrderedProductRegularPrice, 
                      s.OrderedProductSalePrice, 
                      s.OrderedProductExtendedPrice, 
                      s.OrderedProductQuantityDiscountName, 
                      s.OrderedProductQuantityDiscountID, 
                      s.OrderedProductQuantityDiscountPercent, 
                      s.IsShipSeparately, 
                      s.IsDownload, 
                      s.FreeShipping, 
                      s.TextOption, 
                      s.ShippingMethod, 
                      s.Notes, 
                      s.ExtensionData, 
                      s.CustomerEntersPrice, 
                      s.GiftRegistryForCustomerID, 
                      s.ShippingAddressID, 
                      s.ShippingDetail, 
                      s.SizeOptionPrompt, 
                      s.ColorOptionPrompt, 
                      s.TextOptionPrompt, 
                      s.IsTaxable, 
                      s.TaxClassID, 
                      s.TaxRate,
                      ISNULL(s.IsAKit, 0) AS IsAKit, 
                      ISNULL(s.IsAPack, 0) AS IsAPack, 
                      ISNULL(s.IsSystem, 0) AS IsSystem
              FROM dbo.Orders_ShoppingCart s WITH (NOLOCK) 
              WHERE s.ordernumber = @ordernum
              ORDER by s.ShippingAddressID
                ]]>
        </sql>
        <queryparam paramname="@ordernum" paramtype="request" requestparamname="ordernumber" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
      </query>
    
      <PackageTransform>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
          <xsl:output method="html" omit-xml-declaration="yes"/>
          <xsl:variable name="OrderNumber" select="/root/Order/OrderInfo/OrderNumber" />
          <xsl:template match="/">
          <xsl:if test="/root/Runtime/PageName <> 'orderconfirmation.aspx'">
            <!-- BEGIN: Google Trusted Store -->
    		<script type="text/javascript">
    		  var gts = gts || [];
    		  gts.push(["id", "XXXX"]);
    		  gts.push(["google_base_offer_id", "<xsl:value-of select="aspdnsf:GetMLValue(ProductID)" disable-output-escaping="yes"/>"]);
      		  gts.push(["google_base_subaccount_id", "XXXXXXX"]);
      		  gts.push(["google_base_country", "US"]);
      		  gts.push(["google_base_language", "en"]);
      		  
      		    (function() {
    		    var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    		    var gts = document.createElement("script");
    		    gts.type = "text/javascript";
    		    gts.async = true;
    		    gts.src = scheme + "www.googlecommerce.com/trustedstores/gtmp_compiled.js";
    		    var s = document.getElementsByTagName("script")[0];
    		    s.parentNode.insertBefore(gts, s);
    		  })();
            </script>
    		<!-- END: Google Trusted Store -->
         </xsl:if>
         <xsl:if test="/root/Runtime/PageName = 'orderconfirmation.aspx'">
            <!-- BEGIN: Google Trusted Store -->
    		<script type="text/javascript">
    		  var gts = gts || [];
    		  gts.push(["id", "9810"]);
    		  gts.push(["google_base_offer_id", "<xsl:value-of select="aspdnsf:GetMLValue(ProductID)" disable-output-escaping="yes"/>"]);
      		  gts.push(["google_base_subaccount_id", "1565646"]);
      		  gts.push(["google_base_country", "US"]);
      		  gts.push(["google_base_language", "en"]);
      		  
      		    (function() {
    		    var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    		    var gts = document.createElement("script");
    		    gts.type = "text/javascript";
    		    gts.async = true;
    		    gts.src = scheme + "www.googlecommerce.com/trustedstores/gtmp_compiled.js";
    		    var s = document.getElementsByTagName("script")[0];
    		    s.parentNode.insertBefore(gts, s);
    		  })();
            </script>
    		<!-- END: Google Trusted Store -->
      		<!-- START Trusted Stores Order -->
    		<div id="gts-order" style="display:none;">
    		
    		  <!-- start order and merchant information -->
    		  <span id="gts-o-id"><xsl:value-of select="$OrderNumber" /></span>
    		  <span id="gts-o-domain">www.revgenetics.com</span>
    		  <span id="gts-o-email"><xsl:value-of select="/root/Order/OrderInfo/Email" /></span>
    		  <span id="gts-o-country"><xsl:value-of select="/root/Order/OrderInfo/BillingCountry" /></span>
    		  <span id="gts-o-currency">USD</span>
    		  <span id="gts-o-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderTotal, '0.00')" /></span>
    		  <span id="gts-o-discounts">0.00</span>
    		  <span id="gts-o-shipping-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderShippingCosts, '0.00')" /></span>
    		  <span id="gts-o-tax-total"><xsl:value-of select="format-number(/root/Order/OrderInfo/OrderTax, '0.00')" /></span>
    		  <script type="text/javascript">
    		  	var d1=new Date();
    		  	dl.setDate(dl.getDate() + 7);
    		  	document.write("<span id="gts-o-est-ship-date">"+d1.toString('yyyy-MM-dd')+"</span>");
    		  //<span id="gts-o-est-ship-date">d1.toString('yyyy-MM-dd');</span>
              </script>
    		  <span id="gts-o-has-preorder">N</span>
    		  <span id="gts-o-has-digital">N</span>
    		  <!-- end order and merchant information -->
    		  
                <xsl:apply-templates select="/root/OrderItems/Item" />
              </xsl:if>
          </xsl:template>
    
          <xsl:template match="Item">
     		<xsl:if test="/root/Runtime/PageName = 'orderconfirmation.aspx'">
     		
     		<span class="gts-item">
    		    <span class="gts-i-name"><xsl:value-of select="OrderedProductName" /></span>
    		    <span class="gts-i-price"><xsl:value-of select="OrderedProductPrice" /></span>
    		    <span class="gts-i-quantity"><xsl:value-of select="Quantity" /></span>
    		    <span class="gts-i-prodsearch-id"><xsl:value-of select="ProductID" /></span>
    		    <span class="gts-i-prodsearch-store-id">XXXXXXX</span>
    		    <span class="gts-i-prodsearch-country">US</span>
    		    <span class="gts-i-prodsearch-language">en</span>
    		 </span>
    		          
              </xsl:if>
          </xsl:template>
        </xsl:stylesheet>
      </PackageTransform>
    </package>

    Any hints?

    A

  4. #4
    jsimacek is offline Senior Member
    Join Date
    Dec 2008
    Location
    Phoenix, AZ
    Posts
    373

    Default

    Hmm, it sounds like you are outputting some invalid character into the XML somewhere. What is line 66 referring to?
    Jan Simacek - Compunix, LLC
    AspDotNetStorefront trusted Devnet Partner and Reseller since 2005

    AspDotNetStorefront Mods and Add-Ons at http://www.ecommercecartmods.com/
    - Searching, Filtering and Sorting (like cSearch, Dealer Locator, Price Ranges, Blog)
    - Reports (like Cart Abandonment and Net Sales)
    - Customer Experience (like Question/Answers)
    - Site and Data Management (like Entity Product Mapper, Bulk Updaters, Make/Model/Year filters)

  5. #5
    cengen is offline Member
    Join Date
    Mar 2009
    Posts
    78

    Default another plausible method

    less on xsl and more on registered dll. I got this working on MultiStore 9.2.0.0 and it allows for logic to be embedded in an external dll with little hooks in ADNSF.

    http://forums.aspdotnetstorefront.co...9130#post29130

    Just another way to potentially get to the finish line...

    Still, I know AspDotNetStorefront is working on a solution to this issue. They will help us on this soon, I am sure.

    - Charlie

  6. #6
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Well,

    it appears no one really tried to help, I am a bit disappointed since the XDA forums (Google Android Forums) are teaming with folks trying to help each other out for free and for bountys.

    At this time I am retracting my $50 bounty, as my implementation is working.

    I have fixed and reworked my concept code, and have named my XML Package: rev.trustedstore.xml.config package

    It seems to work fine. Except on the product pages, where I have the other code above. I personally don't like it in two places at once... but it is working, and I learned a little XSLT in the process.

    My order confirmation page shows the "google trusted store" code nicely, and now I just need to wait for my 1000 transactions...and confirmation from google that the code has been implemented correctly on the ADNSF site.

    After Google get's back to me (and says it ok) I may release it here.

    Cheers
    A

  7. #7
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Looks like Google checked the store...and I need to make some changes to my SSIS code on my SQL Server for the Cancel and shipping feeds.
    (I love rackspace hosting, they have all the SQL toys)

    They now seem to be working just fine, and are scheduled nightly.

    Let's see what Google says after the latest change.

    Cheers

  8. #8
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default


    Wow I finally got to this point with Google. They just emailed me nice email below... wish me luck with my XMLPackage!:


    "Your account is now in the monitoring and data validation phase of the application process. We'll review your business's eligibility for the program for a minimum of 28 days and at least 250 trackable orders. The Google Trusted Store badge will not be visible on your site while we verify your store's qualifications for the program. During this time, we may offer customers who purchase from your site the option to opt in to a survey about their order experience with your store.

    If your store qualifies to become a Google Trusted Store, we will contact you to confirm when the badge will show up on your site.

    If you believe you have an incorrect or incomplete integration with the program, please correct this as soon as possible, as any integration errors will lead to a delay in our ability to qualify your store."

  9. #9
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    usascholar,

    From someone who has went through this and can see the light at the end of the tunnel, can I get a summary overview.

    1. The JS needs implemented on all pages?
    2. The confirmation pages gets the JS, but also gets a bunch of html with all the products the customer ordered?
    3. A daily feed needs uploaded to google with shipping and cancellation info?

    Once those three are done, you are then in a review phase?

    For the JS on product pages, what product id are you using? Product detail pages would be easy, but on a page with multiple products which one is "prominent"?

    Does that about sum it up?

  10. #10
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Hi,

    For Google Trust Stores:

    1- The code they provide is supposed to be on all pages, even on non product pages, kind of like analytics code. My solution was to use an XMLPackage, and some code I added to product pages XMLPackage. The confirmation page would have the total of items purchased, much like Irwin's code for analytics.

    2- Two daily feeds need to be uploaded to google. (you can schedule an FTP upload in googles "Merchant Center" or provide them a link to a file that is updated daily). The easiest is probably a delimited file you generate daily on your server, and then give google access to. Shipping and Cancellation feeds. In my case I have a SQL query that is exported to a text file by an SSIS package nightly. I have given Google access to these, and they pick them up a couple hours after my files get generated. I am sure you can do an XML webservice and provide Google a url, but I prefer my SSIS tools. (although you can probably schedule and use SQL Scripter if you dont have SSIS "http://www.sqlscripter.com/", this is a ridiculous simple and powerful tool if you have ever done any SQL). I know of multi-billion dollar companies who use it on a daily basis. (I know, I used to work at one of them)

    3- Product ID: is the same one you use when providing a feed to google base. I usually provide the "Default" variant product id on a product page. This code is separate code I entered in my "simpleproduct" xmlpackage that displays products.

    4- After it looks good, tell google that you are ready to be reviewed.

    It takes 1-3 weeks before you get an email back. I think they are overloaded with requests.

    Cheers

  11. #11
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    With regards to your #3, I looked at your site and you have the javascript on the page twice. You have it with your product id and then towards the bottom you have it again without the product id.

    This isnt causing you any issues?

  12. #12
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Not according to Google.
    They haven't said I couldn't do it in that manner. I believe the reason is because it's really for internal tracking purposes, and the one that is important is the javascript at the end of the purchase.


  13. #13
    pkdenver is offline Junior Member
    Join Date
    Dec 2011
    Posts
    2

    Thumbs up Thanks for posting this.

    Thanks a bunch for posting this if for nothing else shedding some light on the details involved in implementing Google's data needs for trusted stores. It is disappointing to see the lack of contribution here although I don't think too many people have the Google Trusted Store specification in their hands to add much.

  14. #14
    PowerProducts is offline Member
    Join Date
    Oct 2010
    Location
    Spokane, WA
    Posts
    40

    Default

    We just finished implementing the code to make the trusted store account work. We should have it running on our site very soon. They have been monitoring it for about a month and a half now. It was not simple at all, a LOT of work! Google still does not have debugging tools to make it much simpler, everything is via email and so 1-2 days to see if a simple change worked. Still, their support was very kind. This definately is not a $50 dollar job, more like a $500+.
    Currently running 9.3 Multistore on 5 sites.

  15. #15
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    How did ya implement the feeds?

    A

  16. #16
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Ive got my feeds written, but have not yet submitted them.


    I implemented mine like this.

    I created a feed page (somefeedname.aspx)

    The code in the page simply executes the sql and creates the tab delimited file, then ftp's the file to the google site.

    ive done this same pattern for some other processes I need. I use a cron job to schedule their execution. My google shopping feed works this way and gets uploaded daily. I have an amazon feed this way that uploads inventory every hour and downloads orders every hour.

  17. #17
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    usascholar,

    On my pages when the JS is on there multiple pages google fails me with the error

    "
    Javascript is implemented more than once on the page
    How to Fix: The Trusted Stores JavaScript code must be implemented exactly once on each page. Remove all but one of the implementations of the Trusted Stores JavaScript code on this page.
    "

    It also doesnt like the js on my home pages because there is no product there.
    "Google Shopping Item ID is missing"

  18. #18
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Started using Google Feed Recently, for other reasons (not google trusted stores)... However the problem remains with individual product pages. Either they don't have the product ID on the product pages generated at all (it's optional, so google feed pros don't care about it unless you consider a consulting fee), or you implement google trsuted store code in the product XMLpackage and you have two google entries in your product page ... that I recently found out google doesnt like.

    Best thing to do if you want to do this right with product IDs is:

    0- Add the google code on the product XMLpackage, so that product IDs are available.
    1- Add the trusted code to the regular site skin template.master as previously mentioned in this thread.
    2- Add a new product.template without the trusted stores code (basically a copy of the template.master without the google trusted code.
    3- Modify your showproduct.aspx.vb or showproduct.aspx.cs file. The OverrideTemplate Function should simply return the name of your new "product.template" for your products, you can comment all the other functionality out.

    Sucker works perfectly.

    Cheers


  19. #19
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Today...

    I got the Google Trusted Store Badge on our store. So yes, this works well.

    Cheers
    A

  20. #20
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Default

    Guys,


    why did you delete my complete code from this post?
    I also see other posts with code deleted.

    Sad

    A