added email for registration

This commit is contained in:
gerchek 2023-08-22 14:33:34 +05:00
parent 1159060f78
commit e18574feea
7 changed files with 40 additions and 4 deletions

View File

@ -7,10 +7,10 @@ API_KEY="YoUrV3ry-S3cur3-aP1k3Y"
MEILISEARCH_URL="http://127.0.0.1:7700"
# Set the index name
INDEX_NAME="products"
INDEX_NAME="products_index"
# 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
SETTINGS_JSON='{

View File

@ -7,7 +7,7 @@ API_KEY="YoUrV3ry-S3cur3-aP1k3Y"
MEILISEARCH_URL="http://127.0.0.1:7700"
# Set the index name
INDEX_NAME="products"
INDEX_NAME="products_index"
# Get index settings using cURL
curl "$MEILISEARCH_URL/indexes/$INDEX_NAME/settings" \

View File

@ -61,9 +61,16 @@ class Registration extends Controller
public function create(CustomerSignupRequest $request){
$request->validated();
if(is_null($request->email))
{
$request->email = '';
}
$verify = core()->getConfigData('customer.settings.email.verification') ;
$data = array_merge(request()->only('first_name', 'phone'), [
'email' => $request->email,
'password' => bcrypt(request()->input('password')),
'api_token' => Str::random(80),
'is_verified' => ! $verify ,

View File

@ -275,6 +275,7 @@ return [
'city' => 'Город',
'postcode' => 'Почтовый индекс',
'phone' => 'Телефон',
'agree' => 'Согласны ли Вы на рассылку уведомлений?',
'submit' => '«Сохранить адрес»',
'success' => 'Адрес был успешно добавлен.',
'error' => 'Невозможно добавить адрес.',

View File

@ -418,6 +418,7 @@ return [
'city' => 'Şäher',
'postcode' => 'zip belgisi',
'phone' => 'Telefon',
'agree' => 'Duýduryşlary almaga razymy ?',
'submit' => 'Adresi ýada sal',
'success' => 'Adres ýada goşuldy.',
'error' => 'Adres goşulyp bilmedi'

View File

@ -27,6 +27,14 @@
<span class="control-error" v-if="errors.has('register.phone')">@{{ errors.first('register.phone') }}</span>
</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">
<span>{{ ucfirst(__('shop::app.customer.signup-form.password')) }}</span>
@ -37,6 +45,20 @@
</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="&quot;{{ ucfirst(__('shop::app.customer.signup-form.agree')) }}&quot;">
<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>
<div class="sign-up-footer">
<span>{{ ucfirst(__('shop::app.customer.signup-text.account_exists')) }} </span>
@ -80,6 +102,10 @@
first_name: '',
email: '',
agree: '',
message: null,
disable_button: false,
@ -101,6 +127,7 @@
if (result) {
axios.post('{{ route('customer.register.create') }}', {
phone: self.phone,
email: self.email,
password:self.password,
first_name:self.first_name
})

View File

@ -39,7 +39,7 @@
</div>
<div class="contacts-block-number">
<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>