Post by Wallimann » Wed Apr 20, 2011 11:46 pm

Hi everyone,
I am running an mp3 store using Opencart v 1.4.9.1
I store samples of the mp3s I sell on Soundcloud and use embedded codes to place samples on each product description.

I would love to make things flow a bit better to allow customers to sample the mp3 from the product list (instead of clicking on each products individually).

Is there a way that would allow me to place an embedded code on the list page directly?
This is what I mean by the list page:
http://www.guitarplayback.com/Jam-Track ... Jam-Tracks

In the same way, is it possible to add an "add to cart" button in the list page directly instead of going through each products page?

Guitar Backing Tracks and Video Lessons at http://www.guitarplayback.com


New member

Posts

Joined
Fri Oct 29, 2010 1:38 am
Location - Colorado

Post by xNeO » Thu Apr 21, 2011 3:21 am

I'm not sure about that, well probably there is a way, but what you can do instead if you want is, you can add a seperate panel for example and put a HTML code in there. What I mean by seperate panel and HTML code in it is. Let's say, you are selling 20 different songs, you could break the songs down and save them on your computer and then put them into like an online MP3 player? http://www.flashmp3player.org/ http://www.varal.org/media/niftyplayer/ http://www.flabell.com/flash/Flash-Mp3-Player-29 http://wpaudioplayer.com/ ... seriously there is so many online embedable mp3 players... and here's the html module for your store. http://www.opencart.com/index.php?route ... order=DESC

Hope I helped.

Adrian.

New member

Posts

Joined
Sat Apr 02, 2011 6:17 pm

Post by Wallimann » Thu Apr 21, 2011 10:12 pm

Thanks for the answer Adrian.
That's a good idea, but I'm really trying to add embedded codes under each product in the list view.
That would help users as they wouldn't have to open each products to hear it...

Guitar Backing Tracks and Video Lessons at http://www.guitarplayback.com


New member

Posts

Joined
Fri Oct 29, 2010 1:38 am
Location - Colorado

Post by lair12 » Fri Jun 24, 2011 7:16 am

Was a solution to this ever posted? I am trying to do something similar where I can have a 15 sec sound sample on the list screen for each piece of music score for sale.

New member

Posts

Joined
Thu Jun 23, 2011 2:13 am

Post by SXGuy » Fri Jun 24, 2011 3:09 pm

yes there is a way, you can use a product field you dont already need or you can add a new one by for example copying another field and adding all the data for it in the controller/model/view files as well as adding a new database entry field in the product table.

Then you can paste your link to the mp3 for that product in the field.

Then on your product view file, you would simply wrap the mp3 player code around your new variable that holds the info for your mp3 link.

for category pages its the same process.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by lair12 » Sat Jun 25, 2011 10:40 am

I understand what you doing, and agree that is what I want. Could you provide some code on how to set up the variable?

I've got a post here that you can check out: http://forum.opencart.com/viewtopic.php?f=21&t=34743 which show what I was able to come up with, but of course does not have the variable issue solved! Do you think that I can eventually put this easily in the .tpl file that controls the list view? Can you tell what exact file that would be? Is adding a product field for the mp3 data easily done (that is a great idea).

New member

Posts

Joined
Thu Jun 23, 2011 2:13 am

Post by blsuk » Mon Jul 30, 2012 6:35 pm

Hey

I'm trying to set up an MP3 store and have installed the Music Player on the product page but need it also to feature in the modules, eg. latest, featured, bestsellers etc. so that customers can sample the track without going to each individual product page.

If possible, does anyone know how to implement the Music Player code below into the module .tpl files in order for it to work the same as on the product page??

Code: Select all

<?php foreach ($product_music2 as $product_music) { ?>
      
      <b><?php echo $product_music['artist']; ?> <br /><?php echo $product_music['name']; ?><br /><br />

Preview:</b><br>
      <script type="text/javascript" src="player/audio-player.js"></script>  
      <script type="text/javascript">  
            AudioPlayer.setup("player/player.swf", {  
            width: 250, 
            bg: "b8e81c",
            volslider: "000000",
            tracker: "e3fd98",
            leftbg: "97ce10",
            rightbg: "97ce10",
            rightbghover: "b8e81c",
            initialvolume: 100
            });  
</script> 
      <p id="audioplayer_<?php echo $product_music['priority']; ?>">Music Player</p>  
      <script type="text/javascript">  
      AudioPlayer.embed("audioplayer_<?php echo $product_music['priority']; ?>", {soundFile: "music_dir/<?php echo $product_music['filename']; ?>",
      artists: "<?php echo $product_music['artist']; ?>",
      titles: "<?php echo $product_music['name']; ?>"
      });  
      </script> 
      <?php } ?>
Any help is greatly appreciated :)

Newbie

Posts

Joined
Wed Dec 08, 2010 12:25 am
Who is online

Users browsing this forum: No registered users and 38 guests