View Full Version : Passing Field names
notset4life
4-2-04, 05:15 PM
I would like to add Music demos to my product info page.
When the play button is clicked, a box opens and starts to play the MIDI or mp3.
the code within the popup is, let's say:
<bgsound SRC="mymusic.mid" loop="true" autostart="true" hidden="true" width="145" height="55">
Can anyone explain how to code it, the filename is passed to the code I created a new field in products called products_demo, which contains the MIDI or MP3 filename. I need that passed to along to where is says "mymusic.mid" in product_info.php.
I would appreciate any help on this.
Vin
The way I would approach this is to do the query on the product ID to get the file name info, and then use that to create a link on the product info page. I'm away from my home system right now so can't offer sample code, but if you look, for example, at the existing code that constructs the small product image with a link to the larger one, you may get the idea.
notset4life
4-2-04, 09:27 PM
I have it figured out for the most part.
thanks
dirtysouthrapco
4-7-04, 06:00 PM
Hello, There is actually a similar contribution for this, not exactly what your looking for but still thought id post as its related...
http://www.oscommerce.com/community/contributions,643/category,all/search,juke
Jamison
I'm building a site or I should say redesigning a site for a friend of mine om Yahoo merchants acount.
I really hate it but I need to hangin there, this is what need to be done
in the database there is a product url it is used to pass the url of the product page from the database. so that means one html page for each product. there are about 300-400 products. SSI is not a option on yahoo but PHP is, so I need to pass the id= parameter to the single product page
on the products page http://www.goldmonster.net/testproducts.html
here is a sample of the code they are using
<a target="_blank" href="<!--#ystore_catalog id="XXX" field="product-url" -->">
<img border="0" src="<!--#ystore_catalog id="XXX" field="image" -->" width="200" alt="<!--#ystore_catalog id="XXX" field="name" -->"></a></p>
in the XXX.html file this is a sample:
<!--#ystore_catalog id="XXX" field="name" -->
I need to pass XXX to this field and also pass it to the template product page and replace XXX in XXX.html
The code I can get the id field is <!--#ystore_catalog id="XXX" field=id -->
that will give me XXX being the product #
Please give examples I'm a beginner and have no php, java, experience.
I would like to keep the pages html so if a snip of php code will work
or the product template would have to be php that would not be a problem seeing that there will be only one page. all the products pages are html.
thanks
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.