Hi,
We're using a 'music add on' with a sample preview option.
Clicking the preview button will open a popup screen and play the sample with the client media player etc:
http://www.dlsounds.com/music/index....=index&cPath=1
the music addon calls a popup.php
But in stead of the popup we want to use a mp3 flash player button.
like this:
http://www.songservice.it/index.php?main_page=index
In tpl_preview_default.php i found this code:
Any idea how to adjust the code to get it working?Code://$song_mp3='<a href= "index.php?main_page=product_music_info&products_id='.(int)$products_id.'&products_preview='.$preview.'">mp3'.'</a>'; //$song_mp3G='<a href= "index.php?main_page=product_music_info&products_id='.(int)$products_id.'&products_preview='.$preview_mp3G.'">mp3+G'.'</a>'; //$song_wmv='<a href= "index.php?main_page=product_music_info&products_id='.(int)$products_id.'&products_preview='.$preview_wmv.'">WMV'.'</a>'; if($preview_songs2->fields['products_attributes_mp3_preview']) { $preview=$preview_songs2->fields['products_attributes_mp3_preview']; $path = 'previews/'.$preview; $song = $preview; $song_mp3 = '<a href="javascript:popupWindow(\'popup.php?song='.$song.'&path='.$path.'\')">MP3</a>'; } if($preview_songs2->fields['products_attributes_mp3G_preview']) { $preview_mp3G=$preview_songs2->fields['products_attributes_mp3G_preview']; $path = 'previews/'.$preview_mp3G; $song = $preview_mp3G; $song_mp3G = '<a href="javascript:popupWindow(\'popup.php?song='.$song.'&path='.$path.'\')">mp3G</a>'; } if($preview_songs2->fields['products_attributes_wmv_preview']) { $preview_wmv=$preview_songs2->fields['products_attributes_wmv_preview']; $path = 'previews/'.$preview_wmv; $song = $preview_wmv; $song_wmv = '<a href="javascript:popupWindow(\'popup.php?song='.$song.'&path='.$path.'\')"><img src="includes/templates/classic/images/sound_preview.png" width="27" height="26" alt="preview" /></a>'; } //'$_GET['main_page']' $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_id), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $products_id) . '">' . BUTTON_IMAGE_MORE_INFO . '</a>'; //$lc_button = '<a href="' . zen_href_link('index', 'action=buy_now&products_id=5' ) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; //$lc_button = '<a href="' . zen_href_link('product_music_info', 'number_of_uploads=0&action=add_product&products_id='.$products_id ) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'.zen_draw_hidden_field('products_id', $products_id).zen_draw_hidden_field('cart_quantity', '1'); $lc_button = zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $products_id), 'post', 'enctype="multipart/form-data"') . '<input type="hidden" name="cart_quantity" value="' . (zen_get_buy_now_qty($products_id)) . '" maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', $products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>'; $the_button=$lc_button; //echo $products_link; $add_to_cart= zen_get_buy_now_button($products_id, $the_button, $products_link) . zen_get_products_quantity_min_units_display($products_id); //echo $the_button; //echo zen_get_products_quantity_min_units_display($products_id)."********"; //echo $add_to_cart; //$add_to_cart='<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_id) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; //echo $_GET['main_page']; $name=$preview_songs2->fields['products_name']; //echo '<table class="'.$class_name.'" border="0" width="100%" cellspacing="0" cellpadding="0"><tr ><td width="50">'.$track_id.'</td><td width="150"><a href= "index.php?main_page=preview&title='.$name.'">'.$name.'</a></td><td width="130">'.'<a href= "index.php?main_page=preview&artistid='.$artist_id.'">'.$artist.'</a>'.'</td><td width="40">'.$track_duration.'</td><td width="100">'.$song_mp3.' '.$song_mp3G.' '.$song_wmv.'</td><td width="95">'.$add_to_cart.'</td></tr></table>'; echo '<table class="'.$class_name.'" border="0" width="100%" cellspacing="0" cellpadding="0"> <tr > <td width="30">'.$products_id.'</td> <td width="130"><a href= "'.zen_href_link('preview','title='.$name).'">'.$name.'</a></td> <td width="120">'.'<a href= "'.zen_href_link('preview','artistid='.$artist_id).'">'.$artist.'</a></td> <td width="50">'.$song_wmv.'</td> <td width="75">'.$the_button.'</td> </tr> </table>'; } $preview_songs2->moveNext(); } //advanced_search_result //US end ?>
Many thanks
Pascal



