I am having the same problem as the poster below regarding the QT PRO with 2gether. I am having trouble with the application_top.php since is was modified for the QT PRO. Does anyone have a working PHP for this issue or point me in the right direction?
Thanks,
Vin.
Posted 18 September 2007 - 02:01 PM
Hi guyz... same problem here..... how can we setup QTPRO with 2gether
qtpro
Quote
case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])) {
//++++ QT Pro: Begin Changed code
$attributes=array();
if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
$attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
foreach ($attrlist as $attr) {
list($oid, $oval)=explode('-',$attr);
if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
$attributes[$oid]=$oval;
}
}
if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
$attributes=$attributes + $HTTP_POST_VARS['id'];
}
}
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);
//++++ QT Pro: End Changed Code
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
2gether
Quote
//// bof: Added 2gether (contribution 3929)
case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
if (tep_get_products_stock($HTTP_POST_VARS['products_id']) > 0) $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
}
if (isset($HTTP_POST_VARS['buy_tinn_add']) && is_numeric($HTTP_POST_VARS['buy_tinn_add'])) {
if (tep_get_products_stock($HTTP_POST_VARS['buy_tinn_add']) > 0) {
$cart->add_cart($HTTP_POST_VARS['buy_tinn_add'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['buy_tinn_add'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
//// eof: Added 2gether (contribution 3929)
How make this work "2gether"?