Adding MP3 file to Product Description
Hi,
I have a website that sells musical instruments. I would like to set up the site so that, when viewing each product, there is an MP3 file of the musical instrument being played. Customers will have the ability to stop, start and pause the recording.
Does anyone know how I can add an MP3 file to each individual product? I know there's ways of setting up downloadable products but this isn't what I'm trying to do.
Any help appreciated.
Many thanks,
Gary :smile:
Re: Adding MP3 file to Product Description
You have two options:
1. find a third-party tool (probably flash-based) that lets the customer start/stop/rewind/fwd a given audio clip, and embed the HTML for that tool into the product's description
2. use the built-in media-manager to tie audio previews to your products. This is normally only available to "music" products, but could be adapted to other product types if needed ... regardless of whether the product is a downloadable music product.
https://www.zen-cart.com/tutorials/i...hp?article=119
Re: Adding MP3 file to Product Description
Hi DrByte,
Thanks for the reply. I think I'll go with option 2. I have a small problem trying to implement this though. Through media manager I can only assign the MP3's to 'Product-Music' products. Now, all my files are 'Product-General'.
Is there any way I can add these sound files to general products?
Thanks again.
Re: Adding MP3 file to Product Description
Quote:
Originally Posted by
HandcraftedUK
Thanks for the reply. I think I'll go with option 2. I have a small problem trying to implement this though. Through media manager I can only assign the MP3's to 'Product-Music' products. Now, all my files are 'Product-General'.
Is there any way I can add these sound files to general products?
Those are part of the "minor modifications" I was referring to...
I thought the pulldown (mistakenly) allowed all products to be selected-from.
I'll have to get back to you on this ... have to run out for a couple hours.
Re: Adding MP3 file to Product Description
Re: Adding MP3 file to Product Description
Quote:
Originally Posted by
DrByte
I thought the pulldown (mistakenly) allowed all products to be selected-from.
yes, it does.
So, go and set up a few clips, and assign them to a product or two.
Then make the template edit from my next post:
Re: Adding MP3 file to Product Description
To allow media-manager components to be displayed on regular product-info products, copy the media-manager code from the music template to the general product template:
Copy this FROM:
/includes/templates/template_default/templates/tpl_product_music_info_display.php
Code:
<!--bof Media Manager -->
<div id="mediaManager" class="productMusic"><?php
/**
* display the products related media clips
*/
require($template->get_template_dir('/tpl_modules_media_manager.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_media_manager.php'); ?>
<br class="clearBoth" /></div>
<!--eof Media Manager -->
<br class="clearBoth" />
and add it to your product template:
/includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
perhaps above the line saying"<!--bof Additional Product Images -->", like this:
Code:
<!--bof Media Manager -->
<div id="mediaManager" class="productMusic"><?php
/**
* display the products related media clips
*/
require($template->get_template_dir('/tpl_modules_media_manager.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_media_manager.php'); ?>
<br class="clearBoth" /></div>
<!--eof Media Manager -->
<br class="clearBoth" />
<!--bof Additional Product Images -->
Re: Adding MP3 file to Product Description
Thanks so much for that. I'm going to get all my sound files together and try this all out within the next couple of weeks.
On an unrelated topic, I have to say a massive thank you to all the Zencart team. I've been running my website for over a year now and am making really good profits. Without this package it would have taken a lot more money (and time) to get everything together.
I'm showing my appreciation by making regular monthly donations from now on. I just hope that those with successful zen sites show their gratitude also.
Blimey, that sounded sycophantic but it really wasn't supposed to! :blush:
Re: Adding MP3 file to Product Description
LOL -- we're glad the software is doing what it's intended to do!!
Thanks for sharing and giving back. It helps the whole project and community keep rolling onward and upward!
Re: Adding MP3 file to Product Description
Hi DrByte,
Sorry about the slow reply, took me ages to get round to doing this. I've got a problem with it though.
I'll give you a snippet of the code i've got in templates/MYTEMPLATE/templates/tpl_product_info_display.php
Quote:
<!--bof Additional Product Images -->
<?php
/**
* display the products additional images
*/
require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<!--eof Additional Product Images -->
<!--bof Media Manager -->
<div id="mediaManager" class="productMusic"><?php
/**
* display the products related media clips
*/
require($template->get_template_dir('/tpl_modules_media_manager.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_media_manager.php'); ?>
<br class="clearBoth" /></div>
<!--eof Media Manager -->
<br class="clearBoth" />
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->
However the result isn't right! If you visit http://www.handcrafteduk.com/40cmpai...rum-p-174.html you can see what's wrong.
Any ideas how I can fix it?
Thanks again,
Gary :smile: