kronnyq Posted December 14, 2004 Share Posted December 14, 2004 Is there any way I can include a php file in a Products description...the script returns text based on the passed string and I need to get it to display when a product is viewed. Can it be done? I normal php include didn't work. Link to comment Share on other sites More sharing options...
iwik Posted December 14, 2004 Share Posted December 14, 2004 did you include it within php tags? eg <?php echo $product_name ?> Link to comment Share on other sites More sharing options...
boxtel Posted December 14, 2004 Share Posted December 14, 2004 Is there any way I can include a php file in a Products description...the script returns text based on the passed string and I need to get it to display when a product is viewed. Can it be done? I normal php include didn't work. <{POST_SNAPBACK}> just show what you want to do Treasurer MFC Link to comment Share on other sites More sharing options...
kronnyq Posted December 14, 2004 Author Share Posted December 14, 2004 just show what you want to do <{POST_SNAPBACK}> I need to be able to include output from a separate php file in products listing. <?php include='http://mysite.com/mtype.php?h'; ?> is not working Link to comment Share on other sites More sharing options...
iwik Posted December 14, 2004 Share Posted December 14, 2004 would this work? <?php include('http://mysite.com/mtype.php?h'); ?> Link to comment Share on other sites More sharing options...
kronnyq Posted December 14, 2004 Author Share Posted December 14, 2004 Nope didn't work either. Viewing the source of the product page reveals <?php include('http://mysite.com/mtype.php?h'); ?>, why isn't it rendering? Link to comment Share on other sites More sharing options...
Guest Posted December 14, 2004 Share Posted December 14, 2004 <?php include('http://mysite.com/mtype.php?h'); ?> .php?h has an "?" I'm not sure that yuou can include a query on a php file (.php?) Whay don't you include a .txt or html file? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 14, 2004 Share Posted December 14, 2004 Tips & Tricks: $variables in the product descript, Using $variables in the product_info.php http://www.oscommerce.com/forums/index.php?showtopic=70099 Possibly applicable too (also section Tips & Tricks): http://www.oscommerce.com/forums/index.php?showtopic=48806 Link to comment Share on other sites More sharing options...
kronnyq Posted December 14, 2004 Author Share Posted December 14, 2004 There's no way to do this? I really don't want to have to make 20 seperate TXT files to have to include, the script I wrote returns the needed data based on a query. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.