Home>Support>Pasting Javascript into a Wiget (Page builder)

Pasting Javascript into a Wiget (Page builder)

Hi,

I’m trying to embed some Shopify button’s in my pagebuilder layout – with the HTML/Text widget I paste in my Shopify embed code that includes some HTML and a bit of Javascript ( tags) at the end.

However, when I save the page and preview it live, I don’t see my Shopify button… just ‘);”
– this leads me to think it’s not executing/recognising the javascript properly within the widget / page.

I tried installing an advanced text edit widget but it does the same thing. Is there any way to paste code with javascript into a widget in page builder and get it to read it execute properly? Do I need to enable something?

I hope someone can advise.

Thanks

B

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi B

    Can you compare the result of pasting the same code into a Text widget in a regular widget area vs Page Builder and let us know the result?

    Thanks

  2. 8 years, 11 months ago brez

    Hi Andrew,

    The shopify button embed code works when pasted into the text widget in a sidebar. so it must be a pagebuilder related issue? Is there a function I need to implement for it to work in pagebuilder widget? or wrap my code in something to get it work in a pagebuilder widget?

    thanks for your help!

  3. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    We do currently have a bug open with a similar issue related to eBay scripts. If it’s the same challenge there isn’t thing I can do from Support but log the bug for the guys to check out. We do have this on our radar if it’s the same challenge.

    Can you post the code so I can confirm. The code needed to wrap code snippets is below the comment field below.

    Have you perhaps checked out a widget option to insert the same button?

  4. 8 years, 11 months ago brez

    Hi Andrew,

    Yeh I tried a couple of other widgets to see and got the same results – like enhanced text/jss/css widget

    Here’s the shopify button code: Is this incompatible?

    B

    <div data-embed_type="product" data-shop="risotto.myshopify.com" data-product_name="APRIL: GRAPHIC PRINT" data-product_handle="april-graphic-print" data-has_image="true" data-display_size="compact" data-redirect_to="cart" data-buy_button_text="Add to cart" data-button_background_color="ff5c73" data-button_text_color="ffffff"></div>
    <script type="text/javascript">
    document.getElementById('ShopifyEmbedScript') || document.write('<script type="text/javascript" src="https://widgets.shopifyapps.com/assets/widgets/embed/client.js" id="ShopifyEmbedScript"><\/script>');
    </script>
    <noscript><a href="https://risotto.myshopify.com/cart/8536188291:1" target="_blank">Buy APRIL: GRAPHIC PRINT</a></noscript>
  5. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    I ran those some tests with this eBay thread the other week. Also with the Enhanced Text Widget. I’m seeing the same challenges with the above JS. Unfortunately, for now, all I can do is add these notes to the existing bug report I have open. Thanks for all the efforts.

  6. 8 years, 11 months ago brez

    Hi Andrew,

    I appreciate your speedy reply. Thanks.

    Is there anyway I can keep up to date with any bug fixes? Just install any updates via WordPress plugins?

    The plugin is awesome by the way.

    B

  7. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for your understanding and support. The best method we have for some of news/notification with regard to bug fixed would be to check the changelog after each update:

    https://wordpress.org/plugins/siteorigin-panels/changelog/

    Thanks for reporting this.

  8. 8 years, 11 months ago alexeck

    I’m having the same problem. Paste a bit of JS into a text widget and it disappears.

    The script I’m inputting is simply:

    <script type="text/javascript" src="http://app.getresponse.com/view_webform.js?wid=10390402&u=1bwo"></script>

    It would be useful if there was a pure “code” widget.

    • 8 years, 11 months ago Andrew Misplon
      Hi, I Work Here

      Hi Alexeck

      We’ve just resolved this in an update to the SiteOrigin Widgets Bundle > SiteOrigin Editor widget. The fix will be included in the next release of the Widgets Bundle, so, not live yet.

      For now, you could use either the core Text widget or the Visual Editor widget powered by Black Studio:

      https://wordpress.org/plugins/black-studio-tinymce-widget/

      Thanks for your feedback :)

  9. 8 years, 11 months ago alexeck

    Thanks!

  10. 8 years, 10 months ago Miguel Angel Calabria

    Hi Andrew! I’m having the same problem and I was waiting for the Widgets Bundle update and it is still not working. Is there anything that can be changed in the buy button so that it becomes compatible with the widgets? ( I love Page Builder and it just makes things so much easier that I would love to not have to use the text editor! hahahahahahaha)

  11. 8 years, 10 months ago alexeck

    The easiest fix is just to use the generic WordPress text widget. Works fine.

  12. 8 years, 8 months ago Plasma-Process

    Hi Andrew, and Brez,

    I have this issue as well, and I started to switch to another Page builder, but I was having a hard time with the new Plug in as the Site Origin Page builder is so easy to use.

    I do have a work around that you can see on the following pages:

    http://www.plasma-process.com/oxford-instruments/
    http://www.plasma-process.com/plasma-therm/

    What I did is paste the E-bay code into a new post, and then used “”Add Posts to Pages” Plug in by Arsham Mirshah at

    https://www.webmechanix.com/resources/wordpress-plugins/add-posts-to-pages/

    Then you can use the [add_posts category=”category-slug” tag=”tag-slug” show=”5″ h=”2″ full=”false” readmore=”Read more link text” img=”false”] command in a simple Text widget.

    I use a category of the page, and then a tag called “e-Bay”

    I hope this is useful.

    Mike Etcher….

  13. 8 years, 2 months ago Kristin Reinbach

    Hi there,

    hm, strange thing….

    I am trying to use the Shopify widget on several pages of mine.

    Here it works in the meanwhile – I’ve used site origin – and then the shopify plugin:
    http://krysalis-consult.com/innovation-doit-innovation-framework-4free/ (at the bottom)

    I am trying to do the same here:
    http://club-of-happy-lifepreneurs.de/shop-e-books-co/
    – and tried all the other option (core text widget, tiny mce) – nothing worked so far.

    If I use the shopify embeds directly, everything is fine – but then of course I can’t build such a nice grid as would be possible with siteorigin.

    Can anyone tell where’s the difference?

    Any ideas welcome – and maybe this could help to solve the problem the others here had, too…

    Best

    Kristin

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More