Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

QTPro 4.5 with Quantity Box 5202


Recommended Posts

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

Link to comment
Share on other sites

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 by Jamie2006
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...