private static function _updateItem($product_id, $data, $id_ebay_profile, $ebay, $date, $id_attribute = 0) { if ($ebay->reviseFixedPriceItem($data)) { EbayProduct::updateByIdProductRef($data['itemID'], array('date_upd' => pSQL($date))); } // if product not on eBay as we expected we add it if ($ebay->errorCode == 291) { // We delete from DB and Add it on eBay EbayProduct::deleteByIdProductRef($data['itemID']); EbaySynchronizer::_addItem($product_id, $data, $id_ebay_profile, $ebay, $date, $id_attribute); } return $ebay; }