cilecek Posted March 1, 2009 Share Posted March 1, 2009 Cauky,mam problem s pridavanim zbozi do kosiku. Pokud chci pridat zbozi do kosiku z "doporucujeme" nebo ze stranky se seznamem produktu a produkt ma ruzne atributy a skladem je ho 0ks, vyhodi to tenhle error:TECHNICAL ERROR: unable to add the product.Details:Error thrown: [object XMLHttpRequest]Text status: parsererrorDela to jenom AJAX kosik, kdyz vypnu AJAX tak to funguje. Po celym dni prohlizeni fora i googleni nejsem schopen najit reseni, i kdyz tu urcite nekde je Predem dik za pomoc, milan Link to comment Share on other sites More sharing options...
Vohkadeh Posted May 16, 2009 Share Posted May 16, 2009 Ahoj,problém je v souboru classes/product.phpřádek 321: $sql = 'SELECT `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` WHERE `default_on` = 1 AND `quantity` > 0 AND `id_product` = '.intval($id_product); $result = Db::getInstance()->getRow($sql); if (!$result) $result = Db::getInstance()->getRow(' SELECT `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` WHERE `quantity` > 0 AND `id_product` = '.intval($id_product)); return $result['id_product_attribute']; nahradit $sql = 'SELECT `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` WHERE `default_on` = 1 '.(intval($minimumQuantity) > 0 ? 'AND `quantity` >= '.intval($minimumQuantity).' ' : '').'AND `id_product` = '.intval($id_product); $result = Db::getInstance()->getRow($sql); if (!$result) $result = Db::getInstance()->getRow(' SELECT `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` WHERE '.(intval($minimumQuantity) > 0 ? '`quantity` >= '.intval($minimumQuantity).' AND ' : '').'`id_product` = '.intval($id_product)); if (!$result) $result = Db::getInstance()->getRow(' SELECT `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` WHERE `id_product` = '.intval($id_product)); return $result['id_product_attribute']; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now