'Nazwa', 'name' => 'name', 'id' => 'name', 'value' => $this -> promotion['name'] ] ); ?> 'Aktywna', 'name' => 'status', 'checked' => $this -> promotion['status'] == 1 ? true : false ] ); ?> 'Łącz z kuponami rabatowymi', 'name' => 'include_coupon', 'checked' => $this -> promotion['include_coupon'] == 1 ? true : false ] ); ?> 'Uwzględnij produkty przecenione', 'name' => 'include_product_promo', 'checked' => $this -> promotion['include_product_promo'] == 1 ? true : false ] ); ?> 'Warunki promocji', 'id' => 'condition_type', 'name' => 'condition_type', 'values' => \shop\Promotion::$condition_type, 'value' => $this -> promotion['condition_type'], ] ); ?> 'Typ rabatu', 'id' => 'discount_type', 'name' => 'discount_type', 'values' => \shop\Promotion::$discount_type, 'value' => $this -> promotion['discount_type'], ] ); ?> 'Min. ilość produktów z danej kategorii', 'class' => 'int-format', 'name' => 'min_product_count', 'id' => 'min_product_count', 'value' => $this -> promotion['min_product_count'] ] );?> 'Cena najtańszego produktu', 'class' => 'number-format', 'name' => 'price_cheapest_product', 'id' => 'price_cheapest_product', 'value' => $this -> promotion['price_cheapest_product'] ] ); ?> 'Wartość', 'class' => 'number-format', 'name' => 'amount', 'id' => 'amount', 'value' => $this -> promotion['amount'] ] ); ?> 'Data do', 'class' => 'date', 'name' => 'date_to', 'id' => 'date_to', 'value' => $this -> promotion['date_to'] ] ); ?>
id = 'promotion-edit'; $grid -> gdb_opt = $gdb; $grid -> include_plugins = true; $grid -> title = $this -> promotion['id'] ? 'Edycja promocji: ' . $this -> promotion['name'] . '' : 'Nowa promocja'; $grid -> fields = [ [ 'db' => 'id', 'type' => 'hidden', 'value' => $this -> promotion['id'] ] ]; $grid -> actions = [ 'save' => [ 'url' => '/admin/shop_promotion/save/', 'back_url' => '/admin/shop_promotion/view_list/' ], 'cancel' => [ 'url' => '/admin/shop_promotion/view_list/' ] ]; $grid -> external_code = $out; $grid -> persist_edit = true; $grid -> id_param = 'id'; echo $grid -> draw(); ?>