#1840 Paketlere komisyon oranı eklenmesi

This commit is contained in:
Diatrex 2020-07-29 17:44:23 +03:00
parent 62ce99fa98
commit 5a74488eb8
3 changed files with 18 additions and 3 deletions

View File

@ -216,7 +216,18 @@ $(document).ready(function () {
price = parseInt(price.replace(/\./g, '')); price = parseInt(price.replace(/\./g, ''));
let decimal = parseInt($(parent).find('.decimal-price').val()); let decimal = parseInt($(parent).find('.decimal-price').val());
$(parent).find('input[type=number]').val(parseFloat(price + "." + decimal)); const newPrice = parseFloat(price + "." + decimal)
let priceInput = $(parent).find('input[type=number]')
priceInput.val(newPrice);
if (priceInput[0].name === 'price') {
const event = new CustomEvent('priceChangedEvent', {
detail: {
newPrice
}
})
document.querySelector('#price').dispatchEvent(event)
}
}); });
// Add dynamic option creation // Add dynamic option creation

View File

@ -293,4 +293,7 @@ return [
// Select cat // Select cat
'select_category_step_by_step' => 'Select Category Step by Step', 'select_category_step_by_step' => 'Select Category Step by Step',
// New create page
'options' => 'Options',
]; ];

View File

@ -58,7 +58,8 @@
{{ form.fields.slug|raw }} {{ form.fields.slug|raw }}
</div> </div>
</div> </div>
{{ addBlock('new-ad/fields',{'adv':adv})|raw }}
{{ addBlock('new-ad/fields', {'adv': adv})|raw }}
<div class="row form-group select-price{{ setting_value('visiosoft.module.advs::hide_standard_price_field') ? ' d-none' }}"> <div class="row form-group select-price{{ setting_value('visiosoft.module.advs::hide_standard_price_field') ? ' d-none' }}">
<label class="col-sm-2 col-xs-12"> <label class="col-sm-2 col-xs-12">
@ -118,7 +119,7 @@
<div class="row form-group select-options"> <div class="row form-group select-options">
<label for="selectOptions" class="col-sm-2"> <label for="selectOptions" class="col-sm-2">
Options {{ trans('visiosoft.module.advs::field.options') }}
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<select id="selectOptions" class="form-control options-tags" multiple="multiple" <select id="selectOptions" class="form-control options-tags" multiple="multiple"