Results 1 to 10 of 42

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Google Trusted Stores program

    Can somebody please kindly provide how they have managed to implement this two codes:

    Google Trusted Stores Badge Code
    Code:
    <!-- BEGIN: Google Trusted Store -->
    <script type="text/javascript">
      var gts = gts || [];
    
      gts.push(["id", "MASKED"]); This one is self explanatory
      gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]); - NEED HELP
      gts.push(["google_base_subaccount_id", "ITEM_GOOGLE_SHOPPING_ACCOUNT_ID"]); - This one is self explanatory
      gts.push(["google_base_country", "ITEM_GOOGLE_SHOPPING_COUNTRY"]); This one is self explanatory
      gts.push(["google_base_language", "ITEM_GOOGLE_SHOPPING_LANGUAGE"]); This one is self explanatory
    
      (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 -->
    Order Confirmation Module Code:
    Code:
    <!-- START Trusted Stores Order -->
    <div id="gts-order" style="display:none;">
    
      <!-- start order and merchant information -->
      <span id="gts-o-id">MERCHANT_ORDER_ID</span>
      <span id="gts-o-domain">MERCHANT_ORDER_DOMAIN</span> This one is self explanatory
      <span id="gts-o-email">CUSTOMER_EMAIL</span>
      <span id="gts-o-country">CUSTOMER_COUNTRY</span>
      <span id="gts-o-currency">CURRENCY</span> This one is self explanatory
      <span id="gts-o-total">ORDER_TOTAL</span>
      <span id="gts-o-discounts">ORDER_DISCOUNTS</span>
      <span id="gts-o-shipping-total">ORDER_SHIPPING</span>
      <span id="gts-o-tax-total">ORDER_TAX</span>
      <span id="gts-o-est-ship-date">ORDER_EST_SHIP_DATE</span>
      <span id="gts-o-has-preorder">HAS_BACKORDER_PREORDER</span>
      <span id="gts-o-has-digital">HAS_DIGITAL_GOODS</span>
      <!-- end order and merchant information -->
    
      <!-- start repeated item specific information -->
      <!-- item example: this area repeated for each item in the order -->
      <span class="gts-item">
        <span class="gts-i-name">ITEM_NAME</span>
        <span class="gts-i-price">ITEM_PRICE</span>
        <span class="gts-i-quantity">ITEM_QUANTITY</span>
        <span class="gts-i-prodsearch-id">ITEM_GOOGLE_SHOPPING_ID</span> This one is self explanatory
        <span class="gts-i-prodsearch-store-id">ITEM_GOOGLE_SHOPPING_ACCOUNT_ID</span> This one is self explanatory
        <span class="gts-i-prodsearch-country">ITEM_GOOGLE_SHOPPING_COUNTRY</span> This one is self explanatory
        <span class="gts-i-prodsearch-language">ITEM_GOOGLE_SHOPPING_LANGUAGE</span> This one is self explanatory
      </span>
      <!-- end item 1 example -->
      <!-- end repeated item specific information -->
    
    </div>
    <!-- END Trusted Stores -->
    I will greatly appreciate if someone can please provide help with generating the variables above.

  2. #2
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

    Default Re: Google Trusted Stores program

    We are happy with the new google program.....being able to set our own ad budget - for years free but they do work for it so why not?

    BUT...what is the advantage of the Google Trusted Stores program? With the code google obtains info on every transaction. Will this eventually lead to a percentage of each sale? Too many hands in the pot already for us and we've been going now for over a decade without it....so we'll pass for now.

  3. #3
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Google Trusted Stores program

    Does anyone know how to conditionally show this code
    HTML Code:
    <?php echo $products_model; ?>
    ONLY when it's a product page otherwise to leave the value blank. Thanks!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Google Trusted Stores program

    Quote Originally Posted by BlessIsaacola View Post
    Does anyone know how to conditionally show this code
    HTML Code:
    <?php echo $products_model; ?>
    ONLY when it's a product page otherwise to leave the value blank. Thanks!
    I'm not sure I understand the question. Is this specifically related to the Google Trusted Stores topics being discussed above?

    Also, if you're not on a product-page, then $products_model would already be blank, and thus nothing would display. So, it's moot.

    I think there's a lot more "context" behind your question, and that's needed information before a proper answer can be given to the real issue you're trying to address.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Google Trusted Stores program

    Quote Originally Posted by DrByte View Post
    I'm not sure I understand the question. Is this specifically related to the Google Trusted Stores topics being discussed above?

    Also, if you're not on a product-page, then $products_model would already be blank, and thus nothing would display. So, it's moot.

    I think there's a lot more "context" behind your question, and that's needed information before a proper answer can be given to the real issue you're trying to address.
    Thanks for your response DrByte! Yes my question was in relation to the Google Trusted Store only. I am trying to pass a variable for this:
    HTML Code:
    gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]);
    We used the model_id from our site currently for google shopping id (which is why I am trying to figure out how to pass it with the code I posted).

    Thanks!

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Google Trusted Stores program

    You asked about how to do something "only" if it's on the product page.
    This PHP code will handle that condition:

    Code:
    <?php if ($current_page_base == FILENAME_PRODUCT_INFO) { ?>
       //put your custom html/script code here
    <?php } ?>
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Google Trusted Stores program

    Quote Originally Posted by DrByte View Post
    You asked about how to do something "only" if it's on the product page.
    This PHP code will handle that condition:

    Code:
    <?php if ($current_page_base == FILENAME_PRODUCT_INFO) { ?>
       //put your custom html/script code here
    <?php } ?>
    Thanks for the prompt response and code. Does FILENAME_PRODUCT_INFO in the above code means this will only work when on regular product page but not on product pages that use product type: music?

    Thanks!

 

 

Similar Threads

  1. v151 Google Trusted Site Plugin
    By Semenek in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 21 Nov 2015, 05:46 PM
  2. v151 Google Trusted Site
    By WWWD in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Mar 2013, 06:04 PM
  3. 2 stores stores, 1 backend and database?
    By globallink in forum General Questions
    Replies: 2
    Last Post: 27 Nov 2008, 07:56 AM
  4. Replies: 2
    Last Post: 18 Jul 2008, 01:30 PM

Posting Permissions

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