﻿
<link rel="import" href="../../polymer/polymer.html" />
<link rel="import" href="../../iron-ajax/iron-ajax.html" />

<dom-module id="p4m-get-html">

    <template>
        <link rel="stylesheet" href="{{cssUrl}}" />
        <div id="content">
        </div>
        <iron-ajax id="ajax"
                   method="GET"
                   handle-as="text"
                   content-type="text/html"
                   on-response="_handleResponse"
                   url="{{contentUrl}}"
                   auto
                   headers='{"Accept": "text/*"}'
                   debounce-duration="300">
        </iron-ajax>
    </template>

    <script>

        Polymer({
            is: "p4m-get-html",

            properties: {
                cssUrl: {
                    type: String,                   
                },
                contentUrl: {
                    type: String,
                },
                content: {
                    type: String
                }

            },
            listeners: {

            },
            ready: function()
            {

            },
            _handleResponse: function (data) {
                this.$.content.innerHTML = data.detail.response;
            }
        });
    </script>
</dom-module>
﻿
<link rel="import" href="../../polymer/polymer.html" />
<link rel="import" href="../../iron-ajax/iron-ajax.html" />

<dom-module id="p4m-get-html">

    <template>
        <link rel="stylesheet" href="{{cssUrl}}" />
        <div id="content">
        </div>
        <iron-ajax id="ajax"
                   method="GET"
                   handle-as="text"
                   content-type="text/html"
                   on-response="_handleResponse"
                   url="{{contentUrl}}"
                   auto
                   headers='{"Accept": "text/*"}'
                   debounce-duration="300">
        </iron-ajax>
    </template>

    <script>

        Polymer({
            is: "p4m-get-html",

            properties: {
                cssUrl: {
                    type: String,                   
                },
                contentUrl: {
                    type: String,
                },
                content: {
                    type: String
                },
                retailer: {
                    type: String,
                    value: 'us'
                }
            },
            listeners: {

            },
            ready: function()
            {

            },
            _handleResponse: function (data) {
                var s = data.detail.response;
                s = s.replace('{{retailer}}', this.retailer ? this.retailer : 'us');
                this.$.content.innerHTML = s;
            }
        });
    </script>
</dom-module>
Add retailer to Thank You message - not working properly in the PHP
Add retailer to Thank You message - not working properly in the PHP
