Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

MP3 or WMA streaming audio for products?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-12-2005, 11:27 AM
 
eerobat eerobat is offline
 

Member
  
Join Date: Mar 2005
Posts: 10
 

Default 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
__________________
Current X-Cart Gold Version Number: 4.4.1
Reply With Quote
  #2  
Old 04-12-2005, 11:33 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-28-2005, 02:37 PM
 
jayzee jayzee is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 53
 

Default 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
__________________
Hi I\'m using x-cart 4.0 and 4.1
Reply With Quote
  #4  
Old 04-28-2005, 02:42 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

What version of X-Cart are you using? Please put it in your signature.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-28-2005, 03:45 PM
 
eerobat eerobat is offline
 

Member
  
Join Date: Mar 2005
Posts: 10
 

Default

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.
__________________
Current X-Cart Gold Version Number: 4.4.1
Reply With Quote
  #6  
Old 04-28-2005, 04:02 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Please do, it may help other people in the future.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-28-2005, 07:04 PM
 
eerobat eerobat is offline
 

Member
  
Join Date: Mar 2005
Posts: 10
 

Default

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
__________________
Current X-Cart Gold Version Number: 4.4.1
Reply With Quote
  #8  
Old 04-29-2005, 06:45 AM
 
jayzee jayzee is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 53
 

Default

thanks for that, it sorted my problem out

__________________
Hi I\'m using x-cart 4.0 and 4.1
Reply With Quote
  #9  
Old 07-12-2005, 03:40 AM
 
interstellarsounds interstellarsounds is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 32
 

Default

Help, I can't find this file:

2. Open '<xcart_root_dir>/files/.htaccess' file
__________________
v4.0.18
Reply With Quote
  #10  
Old 07-12-2005, 03:48 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:01 PM.

   

 
X-Cart forums © 2001-2020