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
window.dp_calc.subscribe(function(calc) { | |
if (!calc.input_fields) { | |
return | |
} | |
if(calc.input_fields.max_largeur && calc.input_fields.max_hauteur){ | |
const max_largeur = calc.input_fields.max_largeur.value; | |
const max_hauteur = calc.input_fields.max_hauteur.value; | |
window.updateField('largeur', { |
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
document.addEventListener('DOMContentLoaded', function () { | |
var designer = document.getElementById('dsn-product-footer') | |
if (designer) { | |
var section = designer.closest('section') | |
section.insertAdjacentElement('afterend', designer) | |
} | |
}) |
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
if (result.resultCode == Activity.RESULT_OK && result.data != null) { | |
val uriList = mutableListOf<Uri>() | |
if (result.data?.clipData != null) { | |
for (i in 0 until result.data?.clipData?.itemCount!!) { | |
uriList.add(result.data?.clipData?.getItemAt(i)?.uri!!) | |
} | |
} else { | |
uriList.add(result.data?.data!!) | |
} |
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 | |
$unit_price = Product::getPriceStatic( | |
$id_product, | |
false, | |
$id_product_attribute, | |
6, | |
null, | |
false, | |
true, |
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 | |
// Attach module to hook | |
$this->registerHook('actionCartDuplicate'); | |
// Run custom logic when the hook is triggered | |
public function hookActionCartDuplicate($params) | |
{ | |
$id_cart_old = $params['oldCartId']; | |
$id_cart_new = $params['newCartId']; |
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
# update id_module because it has changed after the new installation | |
UPDATE `pr_customized_data` | |
SET `id_module` = (SELECT `id_module` FROM `pr_module` WHERE `name` = 'dynamicproduct') | |
WHERE `id_module` = 96 | |
# many rows are missing from the dynamicproduct_input table. To find the orders that have data | |
SELECT o.id_order, i.id_input, c.id_cart FROM `pr_cart` c | |
JOIN `pr_orders` o ON o.id_cart = c.id_cart |
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
CREATE TABLE IF NOT EXISTS `ps_tunisoft_customization_field` | |
( | |
`id_customization_field` int(11) NOT NULL, | |
`id_module` int(11) NOT NULL, | |
PRIMARY KEY (`id_customization_field`, `id_module`) | |
) ENGINE = InnoDb | |
DEFAULT CHARSET = utf8; |
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
window.dsn_stores.design.subscribe(function (design_data) { | |
Object.values(design_data.containers).forEach((container) => { | |
Object.values(container.items).forEach((item) => { | |
item.subscribe((item_data) => { | |
console.log(item_data) | |
}) | |
}) | |
}) | |
}) |
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 | |
/* Path | |
--> /src/Adapter/Presenter/Product/ProductLazyArray.php | |
*/ | |
// Change | |
$this->product['has_discount'] = (0 != $product['reduction']); |
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 | |
// reverse group discount | |
if (isset($reverse_discount)) { | |
$reverse_discount = 1; | |
$group_reduction = (float)\Group::getReduction(Context::getContext()->customer->id); | |
if ($group_reduction > 0) { | |
$reverse_discount = 1 / (1 - $group_reduction / 100); | |
} |
NewerOlder