Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/**
* For the full copyright and license information, please view the
* docs/licenses/LICENSE.txt file that was distributed with this source code.
*/
const {$} = window;
/**
* Responsible for 'display tax in cart' option presentation.
*/
export default class DisplayInCartOptionHandler {
constructor() {
this.handle();
$('.js-enable-tax').on('change', () => this.handle());
}
/**
* If tax is disabled, then display tax in shopping cart option must be disabled.
*
* @private
*/
private handle(): void {
const enabledVal = $('.js-enable-tax:checked').val();
const isTaxEnabled = parseInt(<string>enabledVal, 10);
$('.js-display-in-cart').prop('disabled', !isTaxEnabled);
}
}

View File

@@ -0,0 +1,38 @@
/**
* For the full copyright and license information, please view the
* docs/licenses/LICENSE.txt file that was distributed with this source code.
*/
import TaxMap from '@pages/tax/tax-map';
import DisplayInCartOptionHandler from '@pages/tax/display-in-cart-option-handler';
const {$} = window;
$(() => {
const taxGrid = new window.prestashop.component.Grid('tax');
taxGrid.addExtension(new window.prestashop.component.GridExtensions.ExportToSqlManagerExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.ReloadListExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.SortingExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.FiltersResetExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.ColumnTogglingExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.SubmitRowActionExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.SubmitBulkActionExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.BulkActionCheckboxExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.FiltersSubmitButtonEnablerExtension());
taxGrid.addExtension(new window.prestashop.component.GridExtensions.LinkRowActionExtension());
new DisplayInCartOptionHandler();
window.prestashop.component.initComponents(
[
'MultistoreConfigField',
'TranslatableInput',
],
);
$(TaxMap.optionsForm.useEcoTax).on('change', (event) => {
const useEcoTax = Number($(event.currentTarget).val());
$(TaxMap.optionsForm.rowEcoTaxRuleGroup).toggleClass('d-none', useEcoTax === 0);
});
});

View File

@@ -0,0 +1,11 @@
/**
* For the full copyright and license information, please view the
* docs/licenses/LICENSE.txt file that was distributed with this source code.
*/
export default {
optionsForm: {
useEcoTax: 'input[name="form[use_eco_tax]"]',
rowEcoTaxRuleGroup: '.editEcoTaxRuleGroup',
},
};