Commit 70412c76fe602507543bd02c4a1afb6ad08a2075
1 parent
63e7825d
29.06.16
Showing
2 changed files
with
93 additions
and
60 deletions
Show diff stats
.htaccess
| ... | ... | @@ -105,63 +105,63 @@ AddDefaultCharset utf-8 |
| 105 | 105 | |
| 106 | 106 | # кеширование в браузере на стороне пользователя |
| 107 | 107 | |
| 108 | -<IfModule mod_expires.c> | |
| 109 | - ExpiresActive On | |
| 110 | - ExpiresDefault "access 7 days" | |
| 111 | - ExpiresByType application/javascript "access plus 1 year" | |
| 112 | - ExpiresByType text/javascript "access plus 1 year" | |
| 113 | - ExpiresByType text/css "access plus 1 year" | |
| 114 | - ExpiresByType text/html "access plus 7 day" | |
| 115 | - ExpiresByType text/x-javascript "access 1 year" | |
| 116 | - ExpiresByType image/gif "access plus 1 year" | |
| 117 | - ExpiresByType image/jpeg "access plus 1 year" | |
| 118 | - ExpiresByType image/png "access plus 1 year" | |
| 119 | - ExpiresByType image/jpg "access plus 1 year" | |
| 120 | - ExpiresByType image/x-icon "access 1 year" | |
| 121 | - ExpiresByType application/x-shockwave-flash "access 1 year" | |
| 122 | - </IfModule> | |
| 123 | -<IfModule mod_deflate.c> | |
| 124 | -AddOutputFilterByType DEFLATE text/plain | |
| 125 | -AddOutputFilterByType DEFLATE text/html | |
| 126 | -AddOutputFilterByType DEFLATE text/xml | |
| 127 | -AddOutputFilterByType DEFLATE text/css | |
| 128 | -AddOutputFilterByType DEFLATE application/xml | |
| 129 | -AddOutputFilterByType DEFLATE application/xhtml+xml | |
| 130 | -AddOutputFilterByType DEFLATE application/rss+xml | |
| 131 | -AddOutputFilterByType DEFLATE application/javascript | |
| 132 | -AddOutputFilterByType DEFLATE application/x-javascript | |
| 133 | -BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| 134 | -BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| 135 | -BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| 136 | -Header append Vary User-Agent | |
| 137 | -RewriteEngine On | |
| 138 | -AddEncoding gzip .gz | |
| 139 | -RewriteCond %{HTTP:Accept-encoding} gzip | |
| 140 | -RewriteCond %{REQUEST_FILENAME}.gz -f | |
| 141 | -RewriteRule ^(.*)$ $1.gz [QSA,L] | |
| 142 | -</IfModule> | |
| 143 | -# Cache-Control | |
| 144 | -<ifModule mod_headers.c> | |
| 145 | -# 30 дней | |
| 146 | - <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | |
| 147 | - Header set Cache-Control "max-age=2592000, public" | |
| 148 | - </filesMatch> | |
| 149 | - # 30 дней | |
| 150 | - <filesMatch "\.(css|js)$"> | |
| 151 | - Header set Cache-Control "max-age=2592000, public" | |
| 152 | - </filesMatch> | |
| 153 | - # 2 дня | |
| 154 | - <filesMatch "\.(xml|txt)$"> | |
| 155 | - Header set Cache-Control "max-age=172800, public, must-revalidate" | |
| 156 | - </filesMatch> | |
| 157 | - # 1 день | |
| 158 | - <filesMatch "\.(html|htm|php)$"> | |
| 159 | - Header set Cache-Control "max-age=172800, private, must-revalidate" | |
| 160 | - </filesMatch> | |
| 161 | -</ifModule> | |
| 162 | - | |
| 163 | -#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE | |
| 164 | -<IfModule mod_setenvif.c> | |
| 165 | -BrowserMatch "MSIE" force-no-vary | |
| 166 | -BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary | |
| 167 | -</IfModule> | |
| 168 | 108 | \ No newline at end of file |
| 109 | +#<IfModule mod_expires.c> | |
| 110 | +# ExpiresActive On | |
| 111 | +# ExpiresDefault "access 7 days" | |
| 112 | +# ExpiresByType application/javascript "access plus 1 year" | |
| 113 | +# ExpiresByType text/javascript "access plus 1 year" | |
| 114 | +# ExpiresByType text/css "access plus 1 year" | |
| 115 | +# ExpiresByType text/html "access plus 7 day" | |
| 116 | +# ExpiresByType text/x-javascript "access 1 year" | |
| 117 | +# ExpiresByType image/gif "access plus 1 year" | |
| 118 | +# ExpiresByType image/jpeg "access plus 1 year" | |
| 119 | +# ExpiresByType image/png "access plus 1 year" | |
| 120 | +# ExpiresByType image/jpg "access plus 1 year" | |
| 121 | +# ExpiresByType image/x-icon "access 1 year" | |
| 122 | +# ExpiresByType application/x-shockwave-flash "access 1 year" | |
| 123 | +# </IfModule> | |
| 124 | +#<IfModule mod_deflate.c> | |
| 125 | +#AddOutputFilterByType DEFLATE text/plain | |
| 126 | +#AddOutputFilterByType DEFLATE text/html | |
| 127 | +#AddOutputFilterByType DEFLATE text/xml | |
| 128 | +#AddOutputFilterByType DEFLATE text/css | |
| 129 | +#AddOutputFilterByType DEFLATE application/xml | |
| 130 | +#AddOutputFilterByType DEFLATE application/xhtml+xml | |
| 131 | +#AddOutputFilterByType DEFLATE application/rss+xml | |
| 132 | +#AddOutputFilterByType DEFLATE application/javascript | |
| 133 | +#AddOutputFilterByType DEFLATE application/x-javascript | |
| 134 | +#BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| 135 | +#BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| 136 | +#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| 137 | +#Header append Vary User-Agent | |
| 138 | +#RewriteEngine On | |
| 139 | +#AddEncoding gzip .gz | |
| 140 | +#RewriteCond %{HTTP:Accept-encoding} gzip | |
| 141 | +#RewriteCond %{REQUEST_FILENAME}.gz -f | |
| 142 | +#RewriteRule ^(.*)$ $1.gz [QSA,L] | |
| 143 | +#</IfModule> | |
| 144 | +## Cache-Control | |
| 145 | +#<ifModule mod_headers.c> | |
| 146 | +## 30 дней | |
| 147 | +# <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | |
| 148 | +# Header set Cache-Control "max-age=2592000, public" | |
| 149 | +# </filesMatch> | |
| 150 | +# # 30 дней | |
| 151 | +# <filesMatch "\.(css|js)$"> | |
| 152 | +# Header set Cache-Control "max-age=2592000, public" | |
| 153 | +# </filesMatch> | |
| 154 | +# # 2 дня | |
| 155 | +# <filesMatch "\.(xml|txt)$"> | |
| 156 | +# Header set Cache-Control "max-age=172800, public, must-revalidate" | |
| 157 | +# </filesMatch> | |
| 158 | +# # 1 день | |
| 159 | +# <filesMatch "\.(html|htm|php)$"> | |
| 160 | +# Header set Cache-Control "max-age=172800, private, must-revalidate" | |
| 161 | +# </filesMatch> | |
| 162 | +#</ifModule> | |
| 163 | +# | |
| 164 | +##Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE | |
| 165 | +#<IfModule mod_setenvif.c> | |
| 166 | +#BrowserMatch "MSIE" force-no-vary | |
| 167 | +#BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary | |
| 168 | +#</IfModule> | |
| 169 | 169 | \ No newline at end of file | ... | ... |
common/modules/product/views/variant/_form.php
| ... | ... | @@ -44,6 +44,39 @@ use kartik\select2\Select2; |
| 44 | 44 | ], |
| 45 | 45 | ]); ?> |
| 46 | 46 | |
| 47 | + <?= $form->field($model, 'variants')->widget(MultipleInput::className(), [ | |
| 48 | + 'columns' => [ | |
| 49 | + [ | |
| 50 | + 'name' => '', | |
| 51 | + 'type' => MultipleInputColumn::TYPE_TEXT_INPUT, | |
| 52 | + 'title' => Yii::t('product', 'Name'), | |
| 53 | + ], | |
| 54 | + [ | |
| 55 | + 'name' => 'sku', | |
| 56 | + 'type' => MultipleInputColumn::TYPE_TEXT_INPUT, | |
| 57 | + 'title' => Yii::t('product', 'SKU'), | |
| 58 | + ], | |
| 59 | + [ | |
| 60 | + 'name' => 'price', | |
| 61 | + 'type' => MultipleInputColumn::TYPE_TEXT_INPUT, | |
| 62 | + 'title' => Yii::t('product', 'Price'), | |
| 63 | + ], | |
| 64 | + [ | |
| 65 | + 'name' => 'price_old', | |
| 66 | + 'type' => MultipleInputColumn::TYPE_TEXT_INPUT, | |
| 67 | + 'title' => Yii::t('product', 'Old Price'), | |
| 68 | + ], | |
| 69 | + [ | |
| 70 | + 'name' => 'product_unit_id', | |
| 71 | + 'type' => MultipleInputColumn::TYPE_DROPDOWN, | |
| 72 | + 'title' => Yii::t('product', 'Unit'), | |
| 73 | + 'items' => ArrayHelper::map(\common\modules\product\models\ProductUnit::find()->all(), 'product_unit_id', 'name'), | |
| 74 | + ], | |
| 75 | + | |
| 76 | + ], | |
| 77 | + ]); | |
| 78 | + ?> | |
| 79 | + | |
| 47 | 80 | <?= $form->field($model, 'product_unit_id')->dropDownList( |
| 48 | 81 | ArrayHelper::map(\common\modules\product\models\ProductUnit::find()->all(), 'product_unit_id', 'name'), |
| 49 | 82 | [ | ... | ... |