Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

E

eanna

@eanna
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Add HTML | Shopify Buy Button
    E eanna
    Jun 16, 2017, 10:42 AM

    Here is an example of the product - and the code is above in my first comment:
    https://www.thevelvetcell.com/products/american-motel-signs

    Bug Reports shopify button html html on pages embed

  • Add HTML | Shopify Buy Button
    E eanna
    Jun 14, 2017, 8:37 PM

    Hi Marius - thank you for getting back to me so quickly.

    I am happy to use a workaround - but Armin got the workaround from the code provided in the first post...but now it seems shopify uses different code...so how can I do my workaround?

    Is this something a developer could fix for me? I just need to be able to show a button/link on project pages so that buyers can purchase.

    This theme is so amazing - I hope we can make it work.

    Best
    Eanna

    Bug Reports shopify button html html on pages embed

  • Add HTML | Shopify Buy Button
    E eanna
    Jun 13, 2017, 6:49 PM

    Hi there - I'm having the exact same problem. Can you show me how you achieved your html edit?

    This is the code gives me when I create a buy button:
    "<div id='product-component-b6909048211'></div>
    <script type="text/javascript">
    /<![CDATA[/

    (function () {
    var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
    if (window.ShopifyBuy) {
    if (window.ShopifyBuy.UI) {
    ShopifyBuyInit();
    } else {
    loadScript();
    }
    } else {
    loadScript();
    }

    function loadScript() {
    var script = document.createElement('script');
    script.async = true;
    script.src = scriptURL;
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
    script.onload = ShopifyBuyInit;
    }

    function ShopifyBuyInit() {
    var client = ShopifyBuy.buildClient({
    domain: 'the-velvet-cell.myshopify.com',
    apiKey: '195dc061d6ef9847159e73e335970fd6',
    appId: '6',
    });

    ShopifyBuy.UI.onReady(client).then(function (ui) {
      ui.createComponent('product', {
        id: [6095685505],
        node: document.getElementById('product-component-b6909048211'),
        moneyFormat: '%C2%A3%7B%7Bamount%7D%7D',
        options: {
    

    "product": {
    "variantId": "all",
    "width": "240px",
    "viewData": {
    },
    "templates": {
    "description": "<div class="{{data.classes.product.description}}" data-element="product.description">{{{data.sanitizeDescription}}}</div>"
    },
    "contents": {
    "img": false,
    "imgWithCarousel": false,
    "title": false,
    "variantTitle": false,
    "price": false,
    "description": false,
    "buttonWithQuantity": false,
    "quantity": false
    },
    "styles": {
    "product": {
    "text-align": "left",
    "@media (min-width: 601px)": {
    "max-width": "100%",
    "margin-left": "0",
    "margin-bottom": "50px"
    }
    },
    "button": {
    "background-color": "#3582ac",
    "font-size": "13px",
    "padding-top": "14.5px",
    "padding-bottom": "14.5px",
    "padding-left": "10px",
    "padding-right": "10px",
    ":hover": {
    "background-color": "#30759b"
    },
    "border-radius": "5px",
    ":focus": {
    "background-color": "#30759b"
    }
    },
    "quantityInput": {
    "font-size": "13px",
    "padding-top": "14.5px",
    "padding-bottom": "14.5px"
    },
    "compareAt": {
    "font-size": "12px"
    }
    }
    },
    "cart": {
    "contents": {
    "button": true
    },
    "text": {
    "title": "Your Cart",
    "total": "Total",
    "button": "GO TO CHECKOUT"
    },
    "styles": {
    "button": {
    "background-color": "#3582ac",
    "font-size": "13px",
    "padding-top": "14.5px",
    "padding-bottom": "14.5px",
    ":hover": {
    "background-color": "#30759b"
    },
    "border-radius": "5px",
    ":focus": {
    "background-color": "#30759b"
    }
    },
    "footer": {
    "background-color": "#ffffff"
    }
    }
    },
    "modalProduct": {
    "contents": {
    "img": false,
    "imgWithCarousel": true,
    "variantTitle": false,
    "buttonWithQuantity": false,
    "quantity": false
    },
    "styles": {
    "product": {
    "@media (min-width: 601px)": {
    "max-width": "100%",
    "margin-left": "20px",
    "margin-bottom": "50px"
    }
    },
    "button": {
    "background-color": "#3582ac",
    "font-size": "13px",
    "padding-top": "14.5px",
    "padding-bottom": "14.5px",
    "padding-left": "10px",
    "padding-right": "10px",
    ":hover": {
    "background-color": "#30759b"
    },
    "border-radius": "5px",
    ":focus": {
    "background-color": "#30759b"
    }
    },
    "price": {
    "font-size": "14px"
    },
    "quantityInput": {
    "font-size": "13px",
    "padding-top": "14.5px",
    "padding-bottom": "14.5px"
    }
    }
    },
    "toggle": {
    "styles": {
    "toggle": {
    "background-color": "#3582ac",
    ":hover": {
    "background-color": "#30759b"
    },
    ":focus": {
    "background-color": "#30759b"
    }
    },
    "count": {
    "font-size": "13px"
    }
    }
    },
    "productSet": {
    "styles": {
    "products": {
    "@media (min-width: 601px)": {
    "margin-left": "-20px"
    }
    }
    }
    }
    }
    });
    });
    }
    })();
    /]]>/
    </script>"

    I cant find any "<a href="https://embed..."

    Thanks so much - I love your theme but its useless if I cant embed this!

    Bug Reports shopify button html html on pages embed

I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com

Before you post:
  1. When using a WordPress Cache plugin, disable it or clear your cache.
  2. Update Lay Theme and all Lay Theme Addons
  3. Disable all Plugins
  4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

This often solves issues you might run into

When you post:
  1. Post a link to where the problem is
  2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
  3. If the problem is difficult to explain, post screenshots / link to a video to explain it
Online Users
Y
yelmarb
about a minute ago
A
alasdair17
15 minutes ago
Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
laytheme.com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Search