Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding JS Html5 Audio Player to Description

    Was trying to eliminate other reasons for your description to go blank. ZC 1.5.0 is not considered compatible with PHP 5.4 without additional modifications. The fact that this page is now going blank and the description is going blank after the "simple" addition of what is truly just html code is unusual. If the PHP version was "recently" modified or something else modified about the site, then that could explain why now trying to add html code in the admin causes (if understood correctly) the admin description to go blank. If the issue is only a problem on the catalog side and the content on the catalog side is what is going blank, then that's an entirely different story.

    So for clarification, is the problem that the admin information gets mangled when trying to add the player, is it the catalog side, or is it both? If it involves the catalog side (and admin is okay), providing a link to the site may also help diagnose the issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    "When I save the product, the description field goes blank" - sounds more like a utf-8 issue.
    go too phpmyadmin>the products_description table, find this product and look at what the description looks like in the DB.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    May 2005
    Posts
    103
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    Well I am able to add a simple img html tag to my description so I don't think thats the case. Re: <img src="smiley.gif" alt="Smiley face" height="42" width="42"> will render fine. So does plain text, or any other simple html code.

    I tried another javascript html5 audio player sans css to see if the css call was the issue.

    Simple audio player:
    http://kolber.github.io/audiojs/

    For this, very simply I added the following scripts to my /includes/templates/template_default/common/html_header.php under the header

    <script src="/includes/templates/template_default/jscript/audio.min.js"></script>
    <script>
    audiojs.events.ready(function() {
    var as = audiojs.createAll();
    });
    </script>

    Then, in the description field for the product I added the audio call (as directed by this player)

    <audio src="/mp3/juicy.mp3" preload="auto" />

    And the script wont render anything.

    Seems about the same no matter what audio player script I try using the same method

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding JS Html5 Audio Player to Description

    Is your site in a sub-directory?

    Have you tried adding the above code but omitted the first / whenever referencing something off of your store's path?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding JS Html5 Audio Player to Description

    As for the css load, if you press f12 you should be taken to a Web diagnostic tool from your browser and be able to tell if/what css was loaded for the page. This is the same type thing someone trying to help from the forum would do in addition to performing an html validation check as broken html can also cause a problem particularly when javascript is involved.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    Well, I got it too function in my test store but I had too put the call to the audio tag after the actual description otherwise the description would not display, but it plays. I also had to futz around with paths with this script because I have my test site in a sub directory under a wordpress. I will send you a private message with the url
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  7. #7
    Join Date
    May 2005
    Posts
    103
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    Doesn't seem to matter if i use the leading / or not in the code. Even tried direct call re: http:// full url path

    Using Simple audio player:
    http://kolber.github.io/audiojs/

    <script src="/includes/templates/template_default/jscriptaudio.min.js"></script>
    <script>
    audiojs.events.ready(function() {
    var as = audiojs.createAll();
    });
    </script>

    which i currently have in my /includes/templates/template_default/common/html_header.php

    Then called by adding the following to the description field for the product

    <audio src="/path/to/file.mp3" preload="auto" />

    I got the private message seeing it working in wordpress, but this is direct zen-cart only (not WordPress). Css isn't really a concern right now because i cant seem to get any javacript player to render after adding scripts to the header of /includes/templates/template_default/common/html_header.php and then calling them through html calls in the description field for a product. It's not a problem of zencart not able to take html code in the description field (confirmed by adding an img tag and it renders).

  8. #8
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    I have no idea how you decided that was a Wordpress.... so I'll drop the url here http://dashingcatstudios.com/155_tes...&products_id=1

    Why don't you view source
    Code:
    <meta name="generator" content="shopping cart program by Zen Cart&reg;, http://www.zen-cart.com eCommerce" />
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  9. #9
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding JS Html5 Audio Player to Description

    Quote Originally Posted by chriscana View Post
    Doesn't seem to matter if i use the leading / or not in the code. Even tried direct call re: http:// full url path

    Using Simple audio player:
    http://kolber.github.io/audiojs/

    <script src="/includes/templates/template_default/jscriptaudio.min.js"></script>
    <script>
    audiojs.events.ready(function() {
    var as = audiojs.createAll();
    });
    </script>

    which i currently have in my /includes/templates/template_default/common/html_header.php

    Then called by adding the following to the description field for the product

    <audio src="/path/to/file.mp3" preload="auto" />

    I got the private message seeing it working in wordpress, but this is direct zen-cart only (not WordPress). Css isn't really a concern right now because i cant seem to get any javacript player to render after adding scripts to the header of /includes/templates/template_default/common/html_header.php and then calling them through html calls in the description field for a product. It's not a problem of zencart not able to take html code in the description field (confirmed by adding an img tag and it renders).
    This suggests that likely the load sequence of the javascript plays as an issue. What of the. Js files load before jquery does? Also, what is the content of jscript.jquery.min.js at least the header or version information?

    Next do you have a .htaccess file in the root of your store and does it limit the file types allowed to be loaded? If so does it permit this video type?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    May 2005
    Posts
    103
    Plugin Contributions
    0

    Default Re: Adding JS Html5 Audio Player to Description

    No .htaccess limits on file types.

    I am putting this at the top of the html_header.php in /includes/templates/template_default/common - putting right after meta so I believe it is loading before jquery, but also I think this is a more simple player for testing that shouldn't matter the jquery load?

    <script src="/includes/templates/template_default/jscript/audio.min.js"></script>
    <script>
    audiojs.events.ready(function() {
    var as = audiojs.createAll();
    });
    </script>

    Then in admin products description field in admin I am adding

    <audio src="/path.to/mp3/audio.mp3" preload="auto" />

    And nothing.

    barco57, where did y ou add your code to the header and which file and location?
    What code did you use in you description field? I will see if I can match since you are getting it to render in your store.

 

 

Similar Threads

  1. Audio Player to preview MP3s
    By Yolanda in forum General Questions
    Replies: 10
    Last Post: 12 Aug 2014, 02:16 PM
  2. v151 Play and pause so only one HTML5 audio element at a time plays on my website.
    By jeffmic in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 13 Sep 2013, 10:38 AM
  3. v151 HTML5 Native Audio players?
    By Yolanda in forum General Questions
    Replies: 4
    Last Post: 12 Dec 2012, 08:37 PM
  4. Video and Audio Player Suggestions
    By RossMilstein in forum General Questions
    Replies: 3
    Last Post: 31 Jan 2008, 01:32 AM
  5. Adding an audio player to ZenCart
    By chrisj in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 Dec 2006, 05:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg