Beispiel #1
0
 public function __construct(Order $order, $jsObjName = "", $idPrefix = "", $createProductBasement = true, $mode = self::EDIT_MODE)
 {
     $this->order = $order;
     $this->idPrefix = $idPrefix;
     $this->visibleColumns = $this->getVisibleColumns();
     $this->createProductBasement = $createProductBasement;
     $this->mode = $mode;
     $this->weightUnit = htmlspecialcharsbx(Option::get('sale', 'weight_unit', "", $this->order->getSiteId()));
     $this->weightKoef = htmlspecialcharsbx(Option::get('sale', 'weight_koef', 1, $this->order->getSiteId()));
     $this->isShowXmlId = Option::get("sale", "show_order_product_xml_id", "N") == "Y";
     if (strlen($jsObjName) > 0 && strlen($idPrefix) > 0) {
         $this->jsObjName = $jsObjName;
         $this->settingsDialog = new OrderBasketSettings(array("ID_PREFIX" => $this->idPrefix, "SETTINGS_DLG_OBJECT_NAME" => $jsObjName . ".settingsDialog", "ALL_COLUMNS" => array_merge(static::getDefaultVisibleColumns(), getAdditionalColumns()), "VISIBLE_COLUMNS" => $this->visibleColumns));
     }
 }
Beispiel #2
0
						if ($columnCode == "PROPERTY_".$propData["CODE"])
						{
							$arUserColumns[$columnCode] = $propData["NAME"];
							$count++;
							break;
						}
					}
				}
				else
					$arUserColumns[$columnCode] = GetMessage("NEW_".$columnCode);
			}
		}
		else
			$arUserColumns = $arDefaultColumns;

		$arAvailableColumns = array_merge($arDefaultColumns, getAdditionalColumns());

		// exclude already selected columns from all available columns
		foreach ($arUserColumns as $key => $value)
		{
			if (array_key_exists($key, $arAvailableColumns))
				unset($arAvailableColumns[$key]);
		}

		// include required columns into user's set of columns if they are not there yet
		if (!array_key_exists("COLUMN_NAME", $arUserColumns))
			$arUserColumns = array("COLUMN_NAME" => GetMessage("NEW_COLUMN_NAME")) + $arUserColumns;

		if (!array_key_exists("COLUMN_QUANTITY", $arUserColumns))
			$arUserColumns["COLUMN_QUANTITY"] = GetMessage("NEW_COLUMN_QUANTITY");