Jamie2006 Posted May 22, 2008 Share Posted May 22, 2008 Hi, I installed osc ms2 rc2 with qtpro4.5, customerpriceonly and now I wanted to install 5202. I got the quantity box on the wright place but can´t seem to get it filled with the stock from the pad_single_dropdown, the one selected. It allready was a hell of a Job to get it so far like this but now my knowledge ends. Could someone help me with this ? Gr Jamie Quote Link to comment Share on other sites More sharing options...
Jamie2006 Posted May 22, 2008 Author Share Posted May 22, 2008 (edited) Here is some extra data to make a solution I hope ;) Coding for Product_info: <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table cellpadding="0" cellspacing="0" class="box_width_cont product"> <?php //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); } //Display a table with which attributecombinations is on stock to the customer? if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif; //++++ QT Pro: End Changed Code } ?> </table> Coding in pad_single_dropdown: $combname=substr($combname,2).':'; $out.="<tr>\n"; $out.=' <td align="left" class=main><b>'.$combname."</b></td>\n <td class=main>"; $out.=tep_draw_pull_down_menu('attrcomb', $combinations, $combinations[$selected_combination]['id']); $out.=' <td align="left" class=main><b>'. TEXT_PRODUCT_QUANTITY ."</b></td>\n <td class=main>"; $out.=tep_draw_pull_down_menu('quantity',$products_quantity_array,1); $out.="</td>\n"; $out.="</tr>\n"; } $out.=$this->_draw_out_of_stock_message_js($attributes); return $out; } What I need is following : In this quantity dropdown box I need the quantity of attributes-stock in an array, not the product stock. I have no idea how to fill this with that data, should there be a new function or just some query, if query where should I put it. Should I use something like this : $products_stock_query=tep_db_query("SELECT products_stock_attributes, products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id=" . (int)$HTTP_GET_VARS['products_id'] ." ORDER BY products_stock_attributes"); I just don't know,please help. Thnx Jamie Edited May 22, 2008 by Jamie2006 Quote Link to comment Share on other sites More sharing options...
Jamie2006 Posted May 24, 2008 Author Share Posted May 24, 2008 really no one with an answer ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.