Skip to content

Instantly share code, notes, and snippets.

<script>
window.ES_CONFIG_PARTIAL_OVERWRITE = {
settings: {
form_type: "native"
}
}
</script>
<script>
window.ES_CONFIG_PARTIAL_OVERWRITE = {
"settings": {
"shippingConfig": {
"type": "custom",
"enabled": false
}
}
}
</script>
<script>
window.ES_CONFIG_PARTIAL_OVERWRITE = {
"settings": {
"form_type": "native",
"sticky": false
}
}
</script>
@bougsid
bougsid / gist:fa709206ef8622113c44baad6fa756c3
Created October 2, 2023 12:49
Add click to logo on status page
<script>
window.onload = function () {
var logo = document.querySelector('.logo img');
logo.addEventListener('click', function () {
window.location.href = 'https://'+Shopify.shop;
});
logo.style.cursor = 'pointer';
};
</script>
@bougsid
bougsid / gist:b5a7c21e1a9c03fe8bc3315fe176b4ae
Created October 10, 2023 09:39
Disable auto detect pixel
window.ES_AUTO_DETECT_PIXELS = false;
window.es_hook_open_popup = () => {
//Replace the following code with your pixel code
if ('object' == typeof ymq_option) {
if ('object' == typeof ymq_option.productInstance) {
ymq_option.productInstance.buildFormData().buildOtherFormData();
ymq_option.productInstance.validate.validateAll(ymq_option.productInstance.formData, true);
if (ymq_option.productInstance.validate.validateCount != 0) {
document.getElementById('ymq-box').scrollIntoView({
behavior: 'smooth'
window.es_hook_purchase_success_func = (order) => {
//You can find the order object format here: https://shopify.dev/docs/api/admin-rest/2023-07/resources/order
if (typeof fbq === "function") {
let data = {
value: order.totalPrice,
num_items: order.itemCount,
currency: window.ShopifyAnalytics.meta.currency,
};
data.content_ids = order.items?.map(item => item.product_id);
data.content_type = "product_group";
@bougsid
bougsid / gist:0093f3d4a9784cc83ec5446a99a61f42
Created October 18, 2023 20:51
window.ES_LOCALE_OVERRIDE
<script>
window.ES_LOCALE_OVERRIDE = "pt";
</script>
<style>
.es-note-group{
display: none;
}
</style>
@bougsid
bougsid / gist:4edf3db17d6664825f4f725425e4be96
Created November 12, 2023 20:23
Disable downsell on a product
<script>
window.EASYSELL_DOWNSELLS = null;
</script>