Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
jolilola

bundled products and QTPro

Recommended Posts

Hello,

 

I'm frensh and i speak little english but i have a problem whith the contrib bundled products because i 've installed QTPro.

I do to modifie the code:

 

177	if (STOCK_CHECK == 'true') {
178	  echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
179	}

 

by

 

if (STOCK_CHECK == 'true') {
   $bundle_status_query = tep_db_query("SELECT products_bundle FROM " . TABLE_PRODUCTS . " where products_id = " . tep_get_prid($order->products[$i]['id']));
   $bundle_status = tep_db_fetch_array($bundle_status_query);

   if ($bundle_status['products_bundle'] == "yes") {
	 $bundle_stock_query = tep_db_query("SELECT pb.subproduct_id, p.products_quantity, pd.products_name from " . TABLE_PRODUCTS_BUNDLES . " pb LEFT JOIN products p on p.products_id=pb.subproduct_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id=pd.products_id where pb.bundle_id = '" . tep_get_prid($order->products[$i]['id']) . "' and pd.language_id = '1'");
	 while ($bundle_stock = tep_db_fetch_array($bundle_stock_query)) {
	   if ($bundle_stock['products_quantity'] <= 0 && STOCK_ALLOW_CHECKOUT != true) {
		 echo '<br><b><font color="red">' . $bundle_stock['products_name'] . ' is out of stock</font></b>';
		 $any_out_of_stock = true;
	   } else if ($bundle_stock['products_quantity'] <= 0 && STOCK_ALLOW_CHECKOUT == true) {
		 echo '<br>Extra 2 days delivery for item ' . $bundle_stock['products_name'];
	   } 
	 }
   } else {
	  if (STOCK_ALLOW_CHECKOUT != true) { // item is barred from checkout when stock is too low
		if ($stock = tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']) ){
		  $any_out_of_stock = true;
		}
		echo $stock;
	  } 
   }
}

 

but my code is:

if (STOCK_CHECK == 'true') {

//++++ QT Pro: Begin Changed code

echo $check_stock[$i];

//++++ QT Pro: End Changed Code

}[code]

 

thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×