Hi All

Just ported another mod for oscmax users but still not ready need help on application_top.php file I a have tried to intergrate the code but been unsucessfull for coder this would take couple of minutes here is the code below which needs to be intergrated.

Original code block
Code:
// customer adds a product from the products page// customer adds a product from the products page
// BOF: MOD - QT Pro
//    case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//                              $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']);

      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'])) {
        $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);
// EOF: MOD - QT Pro
            }
			 
        tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
        break;
New Code block needs to be added to above code
Code:
// customer adds a product from the products page
   case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

                              // No offer is made or direct offers are disabled
                              // so the default price is accepted
                              $offeracceptable = true;
                              // Addition for Make An Offer
                              if (MAO_ACCEPT_OFFER_DIRECTLY == 'true') {
					if (!$HTTP_POST_VARS['newpriceoffer'] == '') {
						$offeracceptable = mao_check_offer($HTTP_POST_VARS['newpriceoffer'], $HTTP_POST_VARS['products_id']);
						if ($offeracceptable == true) {
							if (!tep_session_is_registered('mao_accepted_offer')) {
								$mao_accepted_offer = array();
								$mao_accepted = array('productid' => $HTTP_POST_VARS['products_id'],'newprice' => $HTTP_POST_VARS['newpriceoffer'],'initialvaluta' => $currency);
								array_push($mao_accepted_offer, $mao_accepted);
								tep_session_register('mao_accepted_offer');
							} else {
								$mao_accepted = array('productid' => $HTTP_POST_VARS['products_id'],'newprice' => $HTTP_POST_VARS['newpriceoffer'],'initialvaluta' => $currency);
								array_push($mao_accepted_offer, $mao_accepted);
							}
						}
					}
				}
				if ($offeracceptable == true) {
					tep_session_unregister('mao_low_offer');
					$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']);
				} else {
					tep_session_register('mao_low_offer');
				}
                           }
                           tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                           break;