View Single Post
  #1  
Old 08-01-2006, 10:16 PM
danielcompton danielcompton is offline
 
Join Date: Jul 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Calling PHP data from Oscommerce

Hi

Can any help me please?

I have setup Vbulletin and have the vertical navigation menu installed.

I also have a Oscommerce PHP eshop

what I want to do is call the php scripts so then run on vbullentin

Example on my oscommerce store there is a code that runs called whats_new.php and this randomlly shows products in my store..

I want to code this into my forum, so on the vertical menu I have added it randomally shows products on my store and when clicked takes users to that product on there store.


any ideas please?

this is the whats_new.php code from oscommerce.

------------
<?php
/*
$Id: whats_new.php,v 1.1 2004/06/08 14:23:19 Simon Hodgson Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
?>
<!-- whats_new //-->
<tr>
<td>
<?php
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);

$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

new infoBoxHeading($info_box_contents,false,false,tep_ href_link(FILENAME_PRODUCTS_NEW),true,'right',"inf oBoxheadingRight");

if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price);

new infoBox($info_box_contents,false,false,true,'right ',"infoBoxContentsRight");
?>
</td>
</tr>
<!-- whats_new_eof //-->
<?php
}
?>
--------------------------------

this is the code on my menu on vbullentin that fills the navigation menu. I want to somehow get the whats_new code running in the below...


-------------
<tr>
<td class="thead">
Navigation
</td>
</tr>
<tr>
<td class="alt1">
<a href="http://www.hakmob.com/forum">Forums</a></td>
</tr>
<tr>
<td class="alt2">
<a href="http://www.hakmob.com">Shop</a></td>
</tr>
<tr>
<td class="alt1">
<a href="#">Gallery</a></td>
</tr>
<tr>
<td class="alt2">
<a href="arcade.php">Arcade</a></td>
</tr>
<tr>
<td class="alt1">
<a href="donate.php">Donate</a></td>
</tr>
-----------------------------------------------------

Would appreicate some help on this

thanks
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01210 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete