This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.subscribe(dpTopics.RESULT_CALCULATED, (_, data) => { | |
// This function is called after calculating the price & weight | |
// data.input_fields contains all the fields values: data.input_fields[field_name].value | |
console.log(data.input_fields['nombre_de_montant'].value); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// first read the tax rate of the current product | |
/** @var $module DynamicProduct */ | |
$tax_rate = $module->calculator->getTax($id_product); | |
// then remove it from the calculation result | |
$result = $result / (1 + $tax_rate/100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.dp-hide-qty .product-quantity-touchspin { | |
display: none; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File path: [prestashop root folder]/controllers/admin/AdminTranslationsController.php | |
// Replace this line (number 1256) | |
$regex = '/->l\((\')'._PS_TRANS_PATTERN_.'\'(, ?\'(.+)\')?(, ?(.+))?\)/U'; | |
// By this line | |
$regex = '/->l\(\s*(\')' . _PS_TRANS_PATTERN_ . '\'(\s*,\s*?\'(.+)\')?(\s*,\s*?(.+))?\s*\)/Ums'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.dsn-item-image .ui-resizable-s, | |
.dsn-item-image .ui-resizable-e { | |
display: none !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LiveReloadPlugin = require("webpack-livereload-plugin"); | |
const md5File = require("md5-file"); | |
LiveReloadPlugin.prototype.done = function done(stats) { | |
this.fileHashes = this.fileHashes || {}; | |
const fileHashes = {}; | |
for (let file of Object.keys(stats.compilation.assets)) { | |
fileHashes[file] = md5File.sync(stats.compilation.assets[file].existsAt); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('.dsn-product-variants').addClass('product-detail-primary') | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.dsn-product-variants .custom-select { | |
background-color: #ececec; | |
color: #000 !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select.dp_dropdown { | |
height: auto !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cloneDeep from "lodash.clonedeep"; | |
import isEqual from "lodash.isequal"; | |
export class Distinct { | |
constructor() { | |
this.lastValue = null; | |
} | |
subscribe(data) { |