Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Create Link by Calling Up Product ID

Create Link by Calling Up Product ID

Locked

Views: 1,352

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
3 Aug 2008, 1:48 AM
#1
vivaknievel avatar

vivaknievel

New Zenner

Join Date:
Mar 2007
Location:
Los Angeles, CA
Posts:
45
Plugin Contributions:
0

Create Link by Calling Up Product ID

Hello, all!

I'm hoping someone might be able to point me in the right direction...

I'm trying to create a link, that involves product ids, but am stuck on getting the php syntax correct. I plan to create folders for each product id that has audio previews, and then call up the correct track to display next to each individual track/attribute, within a table.

Here's what I have:

<a href="javascript:void();" onclick="MM_openBrWindow('<?php echo DIR_WS_MEDIA . $za_clip['clip_filename'];?>Track_2.mp3','','width=300,height=50')"><img src="images/listen.gif" width="24" height="15" border="0" /></a>
```This results in a link to <http://www>.myzenstore.com/media/Track_2.mp3

But what I'm trying to get is <http://www>.myzenstore.com/media/[product_id]/Track_2.mp3

I can't quite get the right php function to call up the product id for the page a customer is on.  Does anyone have any tips?

If I am successful, I will share my music store preview modification with all Zen Users.

Thanks very much!

Jaye
3 Aug 2008, 3:15 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Create Link by Calling Up Product ID

The current product number can be determined by the $_GET['products_id'] variable in PHP.

3 Aug 2008, 6:55 AM
#3
vivaknievel avatar

vivaknievel

New Zenner

Join Date:
Mar 2007
Location:
Los Angeles, CA
Posts:
45
Plugin Contributions:
0

Re: Create Link by Calling Up Product ID

Thank you so much, DrByte! I now have something working.

Now, I'll re-trace my steps and try to write up some sort of doc/zip packages to upload in the Downloads section. I have a couple of different versions that might be useful to the music downloads stores. :)