I am unable to use the media manager built into zencart for audio previews due to the way my site is setup.
I have an html5 audio javascript player that I would like to use in the description field of individual products.
The directions for the player say
Add the following to the head
<head.>
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.cleanaudioplayer.js"></script>
<link href="/path/to/player.css" rel="stylesheet">
</head.>
and use the following code to call up the player
<div class="mediatec-cleanaudioplayer">
<ul data-theme="">
<li data-title="" data-artist="" data-type="" data-url="" data-free=""></li>
<li data-title="" data-artist="" data-type="" data-url="" data-free=""></li>
</ul>
</div>
Here is what I did:
Put jquery.cleanaudioplayer.js into includes / templates / <my template> / jscript
changed name to jscript_cleanaudioplayer.js (this directory needs this naming convention?)
Put the player.css in includes / templates / <my template> / css
changed name to stylesheet_player.css (this directory needs this naming convention?)
Didn't do anything witth jquery.min.js
because I believe jquery is already running (it was already in jscript directory)
I added the header code
<script src=/includes/template/<my template>/jscript/jscript_tcleanaudioplayer.js"></script>
<link href="=/includes/template/<my template>/css/stylesheet_player.css">
to includes / templates / <theme> / common / both the tpl_header.php and html_header.php
Also tried putting in the template_default / common / tpl_header.php and html_header.php files
(Wasn't sure if this was needed because I thought all css and jscript was loaded if named correctly and in appropriate directories?)
Added the following code to the description field of my product (filling in appropriate calls)
<div class="mediatec-cleanaudioplayer">
<ul data-theme="">
<li data-title="" data-artist="" data-type="" data-url="" data-free=""></li>
<li data-title="" data-artist="" data-type="" data-url="" data-free=""></li>
</ul>
</div>
When I save the product, the description field goes blank and no player appears. Even if there is existing text above the div class call in the description field, hitting save clears out entire description filed and render it blank when I try adding the code.
Any ideas?


Reply With Quote
