Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #990215

    Hello,
    while inserting a few amazon product codes via iframe I noticed that the iframes did not work after the page has been saved a second time. The original amazon code looks like this:

    iframe style="width: 120px; height: 240px;" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=tf_til&ad_type=product_link&tracking_id=bzhealthymama-20&marketplace=amazon&region=US&placement=B00AQFGL3O&asins=B00AQFGL3O&linkId=445f99cfce63a9b5644914b45cd44be8&show_border=false&link_opens_in_new_window=false&price_color=333333&title_color=0066c0&bg_color=ffffff" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">
    </iframe>

    When the page is saved a second time the code gets broken and loos like this:

    <iframe style="width: 120px; height: 240px;" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=tf_til&ad_type=product_link&tracking_id=bzhealthymama-20&marketplace=amazon®ion=US&placement=B00AQFGL3O&asins=B00AQFGL3O&linkId=445f99cfce63a9b5644914b45cd44be8&show_border=false&link_opens_in_new_window=false&price_color=333333&title_color=0066c0&bg_color=ffffff" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">
    </iframe>

    The part of the iframe that says

    amazon&region=US

    gets chnaged after the second saving of the page to:

    amazon®ion=US

    and that does of course not work.

    This happens only with the Enfold Page Builder not if I use the standard WordPress builder.

    What can I do to avoid that automatic code change?

    • This topic was modified 5 years, 10 months ago by denisesl23.
    #990267

    Hi denisesl23!

    Did you try to use the code block element to embed the iframe ( screenshot: http://www.clipular.com/c/5571279189704704.png?k=mCWLt2MmgiyEVvFqRDnMQjju3hk )?

    Best regards,
    Peter

    #990275

    Yes, I tried both the code block element and the text block – both give the same result and change the code.

    #990281

    Hi,

    Ok in this case we need a workaround – please try to move the &region=US parameter to the very beginning of the query string like:

    
    <iframe style="width: 120px; height: 240px;" src="//ws-na.amazon-adsystem.com/widgets/q?region=US&ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=tf_til&ad_type=product_link&tracking_id=bzhealthymama-20&marketplace=amazon&region=US&placement=B00AQFGL3O&asins=B00AQFGL3O&linkId=445f99cfce63a9b5644914b45cd44be8&show_border=false&link_opens_in_new_window=false&price_color=333333&title_color=0066c0&bg_color=ffffff" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">
    </iframe>
    

    So basically you need to move &region=US to the ? sign, then place the & after US. It seems like javascript converts the &reg to the registered sign character. I’ll look into it but this should temporarily solve the issue.

    Best regards,
    Dude

    #990302

    Hi Dude, thank you very much, that works as a workaround. Will there be a theme update that covers this?

    #990313

    Hi,

    Yes, Günter (our dev) or I will look into it. I’m pretty sure the javascript function which creates the modal popup (window where you can insert the code/text) breaks the iframe code and converts &reg to ® but we need to investigate it a bit more. It should be fixed with the next update.

    Best regards,
    Dude

    #1261984

    Hello, I am still having the same problem. My Enfold version is 4.7.6.4 and the child theme is 4.6.1.
    Can you please help me? Thank you

    #1263271

    Hi @Jescraw,

    Sorry for the late reply!

    I believe this issue was not looked into. I just reported the issue to our devs on our GitHub.
    We will keep you updated here. In the meantime, please consider using the workaround Dude suggested here – https://kriesi.at/support/topic/enfold-pagebuilder-changes-amazon-iframe-code/#post-990281 :)

    Best regards,
    Yigit

    #1275782
    This reply has been marked as private.
    #1277142

    Hi,

    Thank you for the info.

    You could create a custom shortcode for it instead of directly embedding the iframe code in the builder. Please try this code in the functions.php file to create the custom shortcode.

    // amazon widget
    function avs_amazon_widgets_cb( $atts ) {
    	$params = shortcode_atts( array(
    		'tracking_id' => 'alevivaamazon-21',
    		'language' => 'de_DE',
    		'region' => 'DE',
    		'placement' => '',
    		'asins' => '',
    		'linkId' => ''
    	), $atts );
    
    	return "<iframe style='width:120px;height:240px;' marginwidth='0' marginheight='0' scrolling='no' frameborder='0' src='//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=DE&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id={$params['tracking_id']}&language={$params['language']}&marketplace=amazon&region={$params['region']}&placement={$params['placement']}&asins={$params['asins']}&linkId={$params['linkId']}&show_border=true&link_opens_in_new_window=true'></iframe>";
    }
    add_shortcode( 'avs_amazon_widget', 'avs_amazon_widgets_cb' );
    

    And in a code or text block, use this shortcode.

    [avs_amazon_widget tracking_id="alevivaamazon-21" language="de_DE" region="DE" placement="B0049U0DMC" asins="B0049U0DMC" linkId="b4e61f81e27ae4ef8bb010781a7069f0"]
    

    Result: https://imgur.com/2eBXflX

    You may notice that there are certain parameters in the shortcode such as the tracking_id, placement, linkId etc, which should be adjusted based on the actual value of the parameters from the amazon iframe or embed code.

    Best regards,
    Ismael

    #1277775

    Whatever you sent me is must have a major mistake because I had no more access to my site!

    your code

    #1277776

    #1277777
    #1278009

    Hi,

    Thank you for the screenshot.

    Looks like you have copied the code from your email. Please make sure to copy the code directly from this forum to avoid conversion or encoding of symbols as shown in the screenshot that you have provided above. Let us know if that helps.

    Best regards,
    Ismael

    #1279720

    Sorry, but still: NOTHING

    I copied your code from the forum, I’ve inserted it into the functions.php of the Enfold child theme (I also tried Enfold main but still no success).

    Then I changed the parameter and added the code into my page using text element (since it didn’t work, also code element). In the preview you can see the item but as soon as I upload it there is nothing but a blank area with a border.

    What do I do now? Why is this so difficult?
    Thanks in advance!

    #1280047

    Hi,

    @jescraw: The same code works fine on our end. Please open a new ticket and post the WP and FTP details in the private field so that we could implement the code above.

    Best regards,
    Ismael

    #1333135

    Almost one year later and still not working! I am really fed up with this!

    #1333487

    Hi,

    Did you use the code above? It is still working correctly on our end. Please create a new thread and post the login details in the private field so that we can add it for you. We will close this thread for now.

    Thank you for your patience.

    Best regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Enfold Pagebuilder changes amazon iframe code’ is closed to new replies.