![]() |
MP3 or WMA streaming audio for products?
My site sells CD's and I would like to have some audio samples for each CD or preferable multiple Audio tracks for each.
I have two questions/problems: 1) I read the manual and it says to add an extra field and put the line: <A href="http://www.samplesite.com/preview/sample.avi">Preview<A> in the extra field. I did this and it just shows the text "Preview" on the live site and there is no link. What I did, was uploaded via ftp my MP3 called 10.mp3 to the folder www.mysite.com/store/files/audiosamples/10.mp3, then I put in the line above as: <A href="http://www.mysitee.com/store/files/audiosamples/10.mp3">Preview <A> and it does not link. What is the problem? Could it be permissions? 2) My second question, might be a little easier. If I want to add another audio sample for the same product, can I just add another extra field and put the link, and it would work, right? :?: Thanks! Unix |
You have your code wrong. This would be the proper way to code a link:
Preview Notice the closing </a> tag. You were missing the slash. |
cant get html code to work
Hi,
I have tried to do this but everytime only the word preview is saved and the html code is lost. why is this happening, its almost as though it is programed to strip all html from the input |
What version of X-Cart are you using? Please put it in your signature.
|
My issue was fixed after I edited the htaccess file. That file has to be modified to access MP3, WMA files or whatever music files you need. After I edited the htaccess file, the html link stayed right where it should in the extra fields and it worked great.
If you want to see how my htaccess file was edited, I can post if you like. |
Please do, it may help other people in the future.
|
By default X-Cart removes all HTML tags from extra fields for security reasons.
If you want to add link to your extra fields, please perform following steps : 1. Open '<xcart_root_dir>/provider/product_modify.php' file and replace : --- $trusted_post_variables = array("product_lng","product_new_descr","product_n ew_full_descr","descr","fulldescr","posted_data"," js_code","javascript_code"); --- with --- $trusted_post_variables = array("product_lng","product_new_descr","product_n ew_full_descr","descr","fulldescr","posted_data"," js_code","javascript_code","efields"); --- 2. Open '<xcart_root_dir>/files/.htaccess' file and replace : --- <FilesMatch "\.(gif|jpe?g|png|GIF|JPE?G|PNG)$"> Allow from all </FilesMatch> Deny from all --- with --- <FilesMatch "\.(gif|jpe?g|png|GIF|JPE?G|PNG|mp3|MP3|m3u|M3U)$" > Allow from all </FilesMatch> Deny from all |
thanks for that, it sorted my problem out
:D |
Help, I can't find this file:
2. Open '<xcart_root_dir>/files/.htaccess' file |
Make sure you have the correct filters applied to your FTP program (if that is how you are browsing the files) so that you can see that type of file. -a is the correct filter.
|
thanks for your reply. however, i cannot get the filter to work. i have tried searching for the filename using the search utility, but i'm not sure of the exact filename i am searching for? is the file just called ".htaccess"? all that exists in the 'files' folder is another folder 'master', which when i click on it is empty. i have tried searching for *.htaccess but nothing is produced in the search result.
/htdocs/files/master |
The .htaccess file is just a simple text file. You can create it using notepad/wordpad and just upload it to the correct directory. You'll need to rename it on the server to .htaccess.
|
Many thanks Balinor, that has solved my problem. :D
|
I'm brand new to X-Cart, doing work on a store that sells products for which there can be an arbitrary number of MP3 or other demos. The example in the manual makes it seem like I would need to add a number of extra fields to handle however many demos a given product might have. Am I misunderstanding that?
Another approach I thought might work would be to copy the detailed images bits of X-Cart to make a general "media file" module. Has anyone done something like that? Thanks, Stefan |
All times are GMT -8. The time now is 11:33 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.