Your label is our profession

Warning labels

getCollection()->addAttributeToFilter('created_at', array('from' => $cs,'to' => $ce))->addAttributeToSelect('grand_total'); $sales2 = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('created_at', array('from' => $ps,'to' => $pe))->addAttributeToSelect('grand_total'); $currentSales = $sales->count(); $previousSales = $sales2->count(); $currentTurnover = 0; foreach($sales as $order) { $currentTurnover += $order->getGrand_total(); } $previousTurnover = 0; foreach($sales2 as $order2) { $previousTurnover += $order2->getGrand_total(); } /* Push current day's sales versus yesterday's sales to the relevant widget */ $values = '{"api_key":"4183df3054264e53f476976a6337afe3","data":{"item":[{"text":"","value":'.$currentSales.'},{"text":"","value":'.$previousSales.'}]}}'; curl_setopt_array($ch = curl_init(), array( CURLOPT_URL => "https://push.geckoboard.com/v1/send/128269-749bf578-575c-4953-a973-3f4cc555f2e1", CURLOPT_POSTFIELDS => $values, ) ); curl_exec($ch); curl_close($ch); ?>