Exemplo n.º 1
0
                $resu .= '<tot_tva><![CDATA[' . Tools::safeOutput($TotCom['STT'] * ($TotCom['tax_rate'] / 100)) . ']]></tot_tva>';
                $resu .= '<tot_ttc><![CDATA[' . Tools::safeOutput($TotCom['STT'] + $TotCom['STT'] * $TotCom['tax_rate'] / 100) . ']]></tot_ttc>';
                $resu .= '</order_head>';
                $resu .= '<all_detail>';
            }
            $tem = 1;
            $resu .= '<order_item>';
            $resu .= '<sku><![CDATA[' . Tools::safeOutput($cr['product_supplier_reference']) . ']]></sku>';
            $resu .= '<product_name></product_name>';
            $resu .= '<qty><![CDATA[' . Tools::safeOutput($cr['product_quantity']) . ']]></qty>';
            $resu .= '</order_item>';
        }
        if ($tem > 0) {
            $resu .= '</all_detail></export_order>';
        }
        $reqExp[] = 'INSERT INTO `' . _DB_PREFIX_ . 'ec_ecopresto_export_com` (`id`,`id_order`) VALUES ("",' . (int) $com['id_order'] . ')';
        $resu .= '</gen>';
        if (isset($reqExp) && count($reqExp) > 0) {
            $send = new sendEco();
            $log = $send->sendInfo($server, $resu);
            if ($log == 1) {
                foreach ($reqExp as $req) {
                    Db::getInstance()->execute($req);
                }
            }
        }
    }
}
$catalog->UpdateUpdateDate('DATE_ORDER');
$catalog->getInfoPdt();