Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getDesignerCollection()
- {
- $user_home = new USER();
- require_once '../../app/Mage.php';
- Mage::app();
- $i = 0;
- foreach($order as $orderData)
- {
- $orderitems = $orderData['dproduct_id'];
- $orderitemsarray = explode(",", $orderitems);
- $k = 0;
- while ($k < count($orderitemsarray))
- {
- if ($orderitemsarray[$k] != '0')
- {
- $stmtorders = $user_home->runQuery("SELECT * FROM order_details");
- $stmtorders->execute(array(
- ":dorder_id" => $orderData['entity_id']
- ));
- $roworders = $stmtorders->fetch(PDO::FETCH_ASSOC);
- if ($roworders['dproduct_id'] == '')
- {
- $dorderStatus = "Unpaid";
- }
- else
- {
- $dorderStatus = $roworders['dpaid_status'];
- }
- $responce[] = array(
- $orderData->getIncrementId() ,
- $orderData->getIncrementId() ,
- $orderitemsarray[$k],
- $dorderStatus
- );
- }
- $k++;
- $i++;
- }
- }
- echo json_encode($responce);
- }
- while ($roworders = $stmtorders->fetch(PDO::FETCH_ASSOC))
- {
- if ($roworders['dproduct_id'] == '')
- {
- $dorderStatus = "Unpaid";
- }
- else
- {
- $dorderStatus = $roworders['dpaid_status'];
- }
- }
- while ($roworders = $stmtorders->fetch(PDO::FETCH_ASSOC))
- {
- if ($roworders['dproduct_id'] == '')
- {
- $dorderStatus = "Unpaid"; }
- else
- {
- $dorderStatus = $roworders['dpaid_status'];
- }
- $responce[] = array( $dorderStatus );
- }
- $k++;
- $i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement