Merge remote-tracking branch 'origin/elektronika' into elektronika
This commit is contained in:
commit
a8040c25e5
|
|
@ -7,10 +7,10 @@ API_KEY="YoUrV3ry-S3cur3-aP1k3Y"
|
||||||
MEILISEARCH_URL="http://127.0.0.1:7700"
|
MEILISEARCH_URL="http://127.0.0.1:7700"
|
||||||
|
|
||||||
# Set the index name
|
# Set the index name
|
||||||
INDEX_NAME="products"
|
INDEX_NAME="products_index"
|
||||||
|
|
||||||
# Set the attribute you want to make sortable
|
# Set the attribute you want to make sortable
|
||||||
SORTABLE_ATTRIBUTE='"id","created_at","name","price","min_price"'
|
SORTABLE_ATTRIBUTE='"created_at","min_price","name"'
|
||||||
|
|
||||||
# Create JSON payload for settings update
|
# Create JSON payload for settings update
|
||||||
SETTINGS_JSON='{
|
SETTINGS_JSON='{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ API_KEY="YoUrV3ry-S3cur3-aP1k3Y"
|
||||||
MEILISEARCH_URL="http://127.0.0.1:7700"
|
MEILISEARCH_URL="http://127.0.0.1:7700"
|
||||||
|
|
||||||
# Set the index name
|
# Set the index name
|
||||||
INDEX_NAME="products"
|
INDEX_NAME="products_index"
|
||||||
|
|
||||||
# Get index settings using cURL
|
# Get index settings using cURL
|
||||||
curl "$MEILISEARCH_URL/indexes/$INDEX_NAME/settings" \
|
curl "$MEILISEARCH_URL/indexes/$INDEX_NAME/settings" \
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace TPS\API\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use TPS\API\Http\Resources\Core\Slider;
|
use TPS\API\Http\Resources\Core\Slider;
|
||||||
use TPS\Shop\Repositories\SliderRepository;
|
use TPS\Shop\Repositories\SliderRepository;
|
||||||
|
use TPS\API\Http\Resources\Catalog\Product as ProductResource;
|
||||||
use Webkul\RestApi\Http\Controllers\V1\Shop\ShopController;
|
use Webkul\RestApi\Http\Controllers\V1\Shop\ShopController;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
class Sliders extends ShopController
|
class Sliders extends ShopController
|
||||||
|
|
@ -48,4 +49,11 @@ class Sliders extends ShopController
|
||||||
|
|
||||||
return $this->getResourceCollection($results);
|
return $this->getResourceCollection($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function weeklyOffers()
|
||||||
|
{
|
||||||
|
$products = $this->getRepositoryInstance()->getWeeklyOffers();
|
||||||
|
$productsArray = ProductResource::collection($products);
|
||||||
|
return response()->json(['data' => $productsArray]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ Route::group(['prefix' => 'api','middleware' => ['locale', 'currency']], functio
|
||||||
Route::get('channels',[Channels::class, 'index']);
|
Route::get('channels',[Channels::class, 'index']);
|
||||||
Route::get('contacts',[CMS::class,'contacts']);
|
Route::get('contacts',[CMS::class,'contacts']);
|
||||||
Route::get('sliders',[Sliders::class, 'allResources']);
|
Route::get('sliders',[Sliders::class, 'allResources']);
|
||||||
|
Route::get('weeklyOffers',[Sliders::class, 'weeklyOffers']);
|
||||||
/**
|
/**
|
||||||
* category routes
|
* category routes
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,16 @@ class Registration extends Controller
|
||||||
public function create(CustomerSignupRequest $request){
|
public function create(CustomerSignupRequest $request){
|
||||||
$request->validated();
|
$request->validated();
|
||||||
|
|
||||||
|
if(is_null($request->email))
|
||||||
|
{
|
||||||
|
$request->email = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$verify = core()->getConfigData('customer.settings.email.verification') ;
|
$verify = core()->getConfigData('customer.settings.email.verification') ;
|
||||||
|
|
||||||
$data = array_merge(request()->only('first_name', 'phone'), [
|
$data = array_merge(request()->only('first_name', 'phone'), [
|
||||||
|
'email' => $request->email,
|
||||||
'password' => bcrypt(request()->input('password')),
|
'password' => bcrypt(request()->input('password')),
|
||||||
'api_token' => Str::random(80),
|
'api_token' => Str::random(80),
|
||||||
'is_verified' => ! $verify ,
|
'is_verified' => ! $verify ,
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,27 @@ class SliderRepository extends SliderRepo
|
||||||
->orderBy('sort_order', 'ASC')
|
->orderBy('sort_order', 'ASC')
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getWeeklyOffers()
|
||||||
|
{
|
||||||
|
$results = app(ProductFlatRepository::class)->scopeQuery(function ($query) {
|
||||||
|
|
||||||
|
$locale = core()->getRequestedLocaleCode();
|
||||||
|
|
||||||
|
$qb = $query->distinct()
|
||||||
|
->where('channel', core()->getCurrentChannelCode())
|
||||||
|
->where('product_flat.locale', $locale)
|
||||||
|
->whereNotNull('special_price')
|
||||||
|
->whereNotNull('special_price_to')
|
||||||
|
->whereNotNull('special_price_from')
|
||||||
|
->whereDate('special_price_from','<=',Carbon::today())
|
||||||
|
->whereDate('special_price_to','>=',Carbon::today())
|
||||||
|
->limit(8);
|
||||||
|
|
||||||
|
return $qb->inRandomOrder();
|
||||||
|
|
||||||
|
})->get();
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,6 +48,7 @@ return [
|
||||||
'service' => 'Сервисный центр',
|
'service' => 'Сервисный центр',
|
||||||
'refund' => 'Обмен и возврат товара',
|
'refund' => 'Обмен и возврат товара',
|
||||||
'help' => 'Помощь по сайту',
|
'help' => 'Помощь по сайту',
|
||||||
|
'ordering' => 'Как оформить заказ',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -275,6 +276,7 @@ return [
|
||||||
'city' => 'Город',
|
'city' => 'Город',
|
||||||
'postcode' => 'Почтовый индекс',
|
'postcode' => 'Почтовый индекс',
|
||||||
'phone' => 'Телефон',
|
'phone' => 'Телефон',
|
||||||
|
'agree' => 'Согласны ли Вы на рассылку уведомлений?',
|
||||||
'submit' => '«Сохранить адрес»',
|
'submit' => '«Сохранить адрес»',
|
||||||
'success' => 'Адрес был успешно добавлен.',
|
'success' => 'Адрес был успешно добавлен.',
|
||||||
'error' => 'Невозможно добавить адрес.',
|
'error' => 'Невозможно добавить адрес.',
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@ return [
|
||||||
'service' => 'Hyzmat',
|
'service' => 'Hyzmat',
|
||||||
'refund' => 'Çalyşmak we gaýtarmak',
|
'refund' => 'Çalyşmak we gaýtarmak',
|
||||||
'help' => 'Kömek',
|
'help' => 'Kömek',
|
||||||
|
'ordering' => 'Nädip sargyt etmeli',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -418,6 +419,7 @@ return [
|
||||||
'city' => 'Şäher',
|
'city' => 'Şäher',
|
||||||
'postcode' => 'zip belgisi',
|
'postcode' => 'zip belgisi',
|
||||||
'phone' => 'Telefon',
|
'phone' => 'Telefon',
|
||||||
|
'agree' => 'Bildirişleri almaga razymy ?',
|
||||||
'submit' => 'Adresi ýada sal',
|
'submit' => 'Adresi ýada sal',
|
||||||
'success' => 'Adres ýada goşuldy.',
|
'success' => 'Adres ýada goşuldy.',
|
||||||
'error' => 'Adres goşulyp bilmedi'
|
'error' => 'Adres goşulyp bilmedi'
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,14 @@
|
||||||
<span class="control-error" v-if="errors.has('register.phone')">@{{ errors.first('register.phone') }}</span>
|
<span class="control-error" v-if="errors.has('register.phone')">@{{ errors.first('register.phone') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sign-up-input">
|
||||||
|
<span>{{ ucfirst(__('shop::app.customer.signup-form.email') )}}</span>
|
||||||
|
<div class="dif-input">
|
||||||
|
<input type="email" name="email" v-model="email">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="sign-up-input">
|
<div class="sign-up-input">
|
||||||
<span>{{ ucfirst(__('shop::app.customer.signup-form.password')) }}</span>
|
<span>{{ ucfirst(__('shop::app.customer.signup-form.password')) }}</span>
|
||||||
|
|
@ -37,6 +45,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="agree">
|
||||||
|
<div class="agree-input">
|
||||||
|
<input id="agree" type="checkbox" name="agree" v-model="agree" v-validate="'required'"
|
||||||
|
data-vv-as=""{{ ucfirst(__('shop::app.customer.signup-form.agree')) }}"">
|
||||||
|
<label for="agree" style="margin: 0 0 0 15px">{{ ucfirst(__('shop::app.customer.account.address.create.agree')) }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="agree-error" style="display: flex;justify-content: center;">
|
||||||
|
<span class="control-error" v-if="errors.has('register.agree')" style="">@{{ errors.first('register.agree') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="log-in" :disabled="disable_button" >{{ ucfirst(__('shop::app.customer.signup-form.button_title')) }}</button>
|
<button type="submit" class="log-in" :disabled="disable_button" >{{ ucfirst(__('shop::app.customer.signup-form.button_title')) }}</button>
|
||||||
<div class="sign-up-footer">
|
<div class="sign-up-footer">
|
||||||
<span>{{ ucfirst(__('shop::app.customer.signup-text.account_exists')) }} </span>
|
<span>{{ ucfirst(__('shop::app.customer.signup-text.account_exists')) }} </span>
|
||||||
|
|
@ -80,6 +102,10 @@
|
||||||
|
|
||||||
first_name: '',
|
first_name: '',
|
||||||
|
|
||||||
|
email: '',
|
||||||
|
|
||||||
|
agree: '',
|
||||||
|
|
||||||
message: null,
|
message: null,
|
||||||
|
|
||||||
disable_button: false,
|
disable_button: false,
|
||||||
|
|
@ -101,6 +127,7 @@
|
||||||
if (result) {
|
if (result) {
|
||||||
axios.post('{{ route('customer.register.create') }}', {
|
axios.post('{{ route('customer.register.create') }}', {
|
||||||
phone: self.phone,
|
phone: self.phone,
|
||||||
|
email: self.email,
|
||||||
password:self.password,
|
password:self.password,
|
||||||
first_name:self.first_name
|
first_name:self.first_name
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="contacts-block-number">
|
<div class="contacts-block-number">
|
||||||
<span class="contacts-block-dim-text">{{__('shop::app.checkout.onepage.email')}} : </span>
|
<span class="contacts-block-dim-text">{{__('shop::app.checkout.onepage.email')}} : </span>
|
||||||
<a href="javascript:void(0)" class="contacts-block-bright-text" data-address="{{str_replace("@","#",core()->getConfigData('emails.configure.email_settings.shop_email_from'))}}">Send here</a>
|
<a href="mailto: contact1@tehnikadunyasi.com" class="contacts-block-bright-text" data-address="{{str_replace("@","#",core()->getConfigData('emails.configure.email_settings.shop_email_from'))}}">contact1@tehnikadunyasi.com</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="service-li skewed">
|
<li class="service-li skewed">
|
||||||
<a href="{{route('shop.cms.page',['slug' => 'komek'])}}">
|
<a href="{{route('shop.cms.page',['slug' => 'ordering'])}}">
|
||||||
<span class="link-text displaced-text">{{__('shop::app.header.help')}}</span>
|
<span class="link-text displaced-text">{{__('shop::app.header.ordering')}}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue