Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #570635

    Hey all, I’m simply trying to add this Amazon search code to my sidebar –

    <script type=”text/javascript”>
    amzn_assoc_placement = “adunit0”;
    amzn_assoc_tracking_id = “djqcom-20”;
    amzn_assoc_ad_mode = “search”;
    amzn_assoc_ad_type = “smart”;
    amzn_assoc_marketplace = “amazon”;
    amzn_assoc_region = “US”;
    amzn_assoc_textlinks = “”;
    amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
    amzn_assoc_default_search_phrase = “”;
    </script>
    <script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>

    It isn’t displaying though. I know script tags in the “Text” widget are an issue but plugins like
    Javascript Html and Text Adder don’t help either. In this case should I edit Enfold’s sidebar.php file?

    #570656

    Hey DJQuad!

    You should be able to just add it to a text widget. That is the only code your supposed to use?

    Regards,
    Elliott

    #570850

    Yes, I added this as a test. Note the -‘s I before and after:


    <script type=”text/javascript”>
    amzn_assoc_placement = “adunit0”;
    amzn_assoc_tracking_id = “djqcom-20”;
    amzn_assoc_ad_mode = “search”;
    amzn_assoc_ad_type = “smart”;
    amzn_assoc_marketplace = “amazon”;
    amzn_assoc_region = “US”;
    amzn_assoc_textlinks = “”;
    amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
    amzn_assoc_default_search_phrase = “”;
    </script>
    <script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>

    Here’s the rendered HTML:

    <h3 class=”widgettitle”>Amazon Search</h3>
    <div class=”textwidget”>-
    <script type=”text/javascript”>
    amzn_assoc_placement = “adunit0”;
    amzn_assoc_tracking_id = “djqcom-20”;
    amzn_assoc_ad_mode = “search”;
    amzn_assoc_ad_type = “smart”;
    amzn_assoc_marketplace = “amazon”;
    amzn_assoc_region = “US”;
    amzn_assoc_textlinks = “”;
    amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
    amzn_assoc_default_search_phrase = “”;
    </script>
    <script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>
    -</div>

    You can see this on the sidebar at http://seriousgaming.tv.pd9hosting.com/amazon. The main content does contains the search box, but the sidebar does not.

    #571140

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #571519

    Below. Thanks!

    #571910

    Hi,

    Does amazon have any support for these kinds of matters? I think they would be able to help you out better to be honest. You’re getting this error on the page though:

    Failed to load resource: net::ERR_BLOCKED_BY_CLIENT http://z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US

    Not sure why though unfortunately.

    Best regards,
    Rikard

    #572291

    No, they said to contact you. :(

    #573397

    Hi!

    What happens in the default theme?

    Regards,
    Elliott

    #574010

    It works with Twenty Fifteen.

    #574937

    Hi!

    We tested the below code in the default theme the code is generating nothing this is not an issue with enfold theme.
    please provide a screenshot of the working code so we can take a look at what the generated code look like on the default theme.

    You could also try some plugins related to Amazon https://wordpress.org/plugins/search.php?q=amazon+search please note that these plugins are not supported by enfold.

    I believe this is incomplete or incorrect code.

    
    <script type=”text/javascript”>
    amzn_assoc_placement = “adunit0”;
    amzn_assoc_tracking_id = “djqcom-20”;
    amzn_assoc_ad_mode = “search”;
    amzn_assoc_ad_type = “smart”;
    amzn_assoc_marketplace = “amazon”;
    amzn_assoc_region = “US”;
    amzn_assoc_textlinks = “”;
    amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
    amzn_assoc_default_search_phrase = “”;
    </script>
    <script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>
    

    Best regards,
    Vinay

    #575956

    p

    • This reply was modified 8 years, 9 months ago by DJQuad.
    #575959

    Here’s the search in Twenty Fifteen
    Amazon in Twenty Fifteen

    Here’s it’s missing in Enfold
    Amazon in Enfold

    #577761

    Hey!

    Do you have adblock or similar enabled by any chance?

    Best regards,
    Josue

    #578006

    Nope, It’s disabled, and I see the ads.

    #579596

    Hey!

    unfortunately not every plugin and/or script is compatible with every theme. We can’t do much about it here, as it would require a huge amount of time to make it compatible for you. You would need to hire a freelance developer for this job.

    Regards,
    Andy

    #580669

    Since Enfold breaks a simple script and Twenty Fifteen does not, will hardcoding it in sidebar.php work?

    #580724

    For some reason the main search container is being hidden by CSS (when using Enfold) so i tried adding this to Quick CSS and the search bar is now visible:

    div#amzn-native-ad-0 {
        display: block !important;
        width: 100% !important;
    }
    

    Regards,
    Josue

    #581319

    It’s not displaying on the left sidebar under “AMAZON SEARCH” on http://seriousgaming.tv.pd9hosting.com/amazon

    #581807

    Hey!

    Try adding this code to the Quick CSS:

    .amzn-native-container  {
        display: block !important;
        width: 100% !important;
    }

    Cheers! 
    Josue

    #582981

    Getting closer! Under the search looks a little funky, like it’s not wide enough, even though it’s set to 100%.

    #583080

    Hi!

    Yeah that part is a bit buggy, i’d suggest disabling the search contents with CSS as the search opens on a new window:

    .amzn-native-content {
        display: none;
    }

    Best regards,
    Josue

    #583694

    Looks like it will work. Thanks!

Viewing 22 posts - 1 through 22 (of 22 total)
  • The topic ‘Script tag in sidebar’ is closed to new replies.