Ajustes antes de produccion

This commit is contained in:
2026-10-22 00:07:21 -06:00
parent f9666c4088
commit 1be9d16c83
124 changed files with 3540 additions and 772 deletions
+34
View File
@@ -0,0 +1,34 @@
{%- comment -%}
Google Customer Reviews badge (seller rating). Loads on the first user interaction
so it doesn't affect initial page performance. Configure in Theme settings › Google Customer Reviews.
{%- endcomment -%}
{%- if settings.gcr_badge_enabled and settings.gcr_merchant_id != blank -%}
{%- unless request.design_mode -%}
<script nolazy>
(function () {
var CFG = {
merchant_id: {{ settings.gcr_merchant_id | strip | plus: 0 }},
position: {{ settings.gcr_badge_position | default: 'BOTTOM_LEFT' | json }},
region: {{ settings.gcr_region | default: 'MX' | upcase | json }}
};
var EVENTS = ['scroll', 'touchstart', 'pointerdown', 'mousemove', 'keydown', 'wheel'];
var done = false;
function inject() {
var s = document.createElement('script');
s.id = 'merchantWidgetScript';
s.src = 'https://www.gstatic.com/shopping/merchant/merchantwidget.js';
s.defer = true;
s.setAttribute('nolazy', '');
s.onload = function () { if (window.merchantwidget) window.merchantwidget.start(CFG); };
document.body.appendChild(s);
}
function go() {
if (done) return; done = true;
EVENTS.forEach(function (ev) { window.removeEventListener(ev, go, { passive: true }); });
if (document.readyState === 'complete') inject(); else window.addEventListener('load', inject, { once: true });
}
EVENTS.forEach(function (ev) { window.addEventListener(ev, go, { passive: true }); });
})();
</script>
{%- endunless -%}
{%- endif -%}