Forums / General Questions / customizing product list for audio preview

customizing product list for audio preview

Locked

Views: 1,238

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 Jan 2010, 4:30 AM
#1
jmnyc avatar

jmnyc

New Zenner

Join Date:
Jan 2010
Posts:
2
Plugin Contributions:
0

customizing product list for audio preview

hey everyone - my thanks in advance for any insights...

I'm new to PHP but pretty proficient with zencart - working on a lazy customization for an online music store. I've utilized media manager to add audio clips to each track, but want those preview buttons to show in the product list view as well.

i've already made a simple mod to the product_list page that modifies the manufacturer_name field to instead show an audio preview button. the problem is i want that button to link to the audio clip already associated with the product id.

here's the relevant code:

media manager modification (works on the product info page in the media manager box) :

<div class="mediaTypeLink"><a target="player" href="<?php echo zen_href_link(DIR_WS_MEDIA . $za_clip['clip_filename'], '', 'NONSSL', false, true, true); ?>" <?php echo '<span class="mediaClipFilename">' . '<img src="http://www.xxx.com/zencart/playbutton.jpg" height="20" width="20"</img>' . '</span>' . (!empty($za_clip['clip_type']) ? '<span class="mediaClipType"> (' . $za_clip['clip_type'] . ')</span>' : ''); ?></a></div>

here's the product list page line of code:

$lc_text = '<a target="player" href="' . zen_href_link(FDIR_WS_MEDIA . $za_clip['clip_filename'], '', 'NONSSL', false, true, true) . '">' . '<img src="http://www.xxx.com/zencart/playbutton.jpg" height="20" width="20"</img>' . '</a>';

I'm getting the button but not the link. i'm no script expert but it looks to me like they're in two different formats, based on the quotes. what am I missing? All I want is for the product list to show the product, buy now button, model number, title, and preview button. if anyone can help, i'd be deeply greatful. keep in mind i'm a novice at best when it comes to code. i understand the logic but not the syntax.

cheers

21 Jan 2010, 5:58 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: customizing product list for audio preview

Scroll down to foot of this page...lists previous threads of similar nature to your own...i.e.
http://www.zen-cart.com/forum/showthread.php?t=114538

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

22 Jan 2010, 4:35 AM
#3
jmnyc avatar

jmnyc

New Zenner

Join Date:
Jan 2010
Posts:
2
Plugin Contributions:
0

Re: customizing product list for audio preview

thanks misty!

Unfortunately, I think I already worked around the issue raised in thread. I've been working on it all day - I think I've almost got it, but there's something wrong with this syntax that's not adding the $za_clip[clip_filename'] to the link. it's probably a misplaced quote or something in the syntax. The only other thing I can think is that I have to define the variable again on this page, in which case I'm not sure how to.

$za_clip['clip_filename'] is defined in media_manager.php and works in the media manager module on the product info page just fine but won't link here.

in this code, everything works but the filename:

$lc_text = '<a target="player" href="' . zen_href_link('media/' . $za_clip['clip_filename'], '', 'NONSSL', false, true, true) . '">' . '<img src="http://www.xxx.com/zencart/playbutton.jpg" height="20" width="20"</img>' . '</a>';

any ideas? thanks again btw