1
0
mirror of synced 2024-11-25 23:06:08 +03:00

order final fixes

This commit is contained in:
Grisha Pomadchin 2013-10-09 19:29:07 +04:00
parent 59ed1b87cc
commit 3623a8e134
2 changed files with 5 additions and 9 deletions

View File

@ -301,18 +301,13 @@ class ICrmOrderActions
$dateStart = COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, null); $dateStart = COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, null);
var_dump($dateStart);
$orderHistory = $api->orderHistory($dateStart); $orderHistory = $api->orderHistory($dateStart);
var_dump($orderHistory);
if($dateStart) if($dateStart)
$dateStart = new \DateTime($dateStart); $dateStart = new \DateTime($dateStart);
// pushing existing orders // pushing existing orders
foreach ($orderHistory as $order) { foreach ($orderHistory as $order) {
var_dump($order['externalId']);
if(!isset($order['externalId']) && !$order['externalId']) { if(!isset($order['externalId']) && !$order['externalId']) {
@ -498,7 +493,6 @@ class ICrmOrderActions
implode(" ", $contactName), $order['externalId']); implode(" ", $contactName), $order['externalId']);
foreach($order['items'] as $item) { foreach($order['items'] as $item) {
var_dump($item);
// del from basket // del from basket
if(isset($item['deleted']) && $item['deleted']) { if(isset($item['deleted']) && $item['deleted']) {
$p = CSaleBasket::GetList( $p = CSaleBasket::GetList(

View File

@ -505,9 +505,11 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
<?php foreach($arResult['paymentGroupList'] as $orderStatusGroup): if(!empty($orderStatusGroup['statuses'])) : ?> <?php foreach($arResult['paymentGroupList'] as $orderStatusGroup): if(!empty($orderStatusGroup['statuses'])) : ?>
<optgroup label="<?php echo $orderStatusGroup['name']; ?>"> <optgroup label="<?php echo $orderStatusGroup['name']; ?>">
<?php foreach($orderStatusGroup['statuses'] as $payment): ?> <?php foreach($orderStatusGroup['statuses'] as $payment): ?>
<?php if(isset($arResult['paymentList'][$payment])): ?>
<option value="<?php echo $arResult['paymentList'][$payment]['code']; ?>" <?php if ($optionsPayStatuses[$bitrixPaymentStatus['ID']] == $arResult['paymentList'][$payment]['code']) echo 'selected'; ?>> <option value="<?php echo $arResult['paymentList'][$payment]['code']; ?>" <?php if ($optionsPayStatuses[$bitrixPaymentStatus['ID']] == $arResult['paymentList'][$payment]['code']) echo 'selected'; ?>>
<?php echo $APPLICATION->ConvertCharset($arResult['paymentList'][$payment]['name'], 'utf-8', SITE_CHARSET); ?> <?php echo $APPLICATION->ConvertCharset($arResult['paymentList'][$payment]['name'], 'utf-8', SITE_CHARSET); ?>
</option> </option>
<?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</optgroup> </optgroup>
<?php endif; endforeach; ?> <?php endif; endforeach; ?>