Ejemplo n.º 1
0
 public function bootstrap($app)
 {
     Hook::register('stronglab\\checkout\\components\\hooks\\CartButton', 'CART_BUTTON', 10);
     Hook::register('stronglab\\checkout\\components\\hooks\\CartPane', 'END_BODY', 10);
 }
Ejemplo n.º 2
0
    <?php 
if ($categories = Categories::getDropDown()) {
    ?>

        <?php 
    echo $form->field($model, 'categories')->widget(MultiSelect::classname(), ['options' => ['multiple' => 'multiple', 'encode' => false], 'data' => $categories]);
    ?>
    <?php 
}
?>
    <?php 
echo $form->field($model, 'upload_files[]')->widget(FileInput::classname(), ['options' => ['multiple' => true], 'pluginOptions' => ['uploadUrl' => \yii\helpers\Url::toRoute(['/catalog/products/upload']), 'uploadExtraData' => ['model_id' => $model->id, 'category' => 'products'], 'showUpload' => false, 'initialPreviewShowDelete' => true, 'maxFileCount' => 10, 'layoutTemplates' => ['actionUpload' => ''], 'initialPreview' => $a(), 'initialPreviewConfig' => $b(), 'overwriteInitial' => false, 'allowedFileTypes' => ['image']]]);
?>

    <?php 
echo Hook::render($model, 'PRODUCT_FORM');
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Добавить' : 'Редактировать', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'id' => 'submit-product']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>

<?php