This file contains 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 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 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 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 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 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); | |
} |
This file contains 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 od.* FROM ps_order_detail od | |
LEFT JOIN ps_dynamicproduct_input di ON di.id_customization = od.id_customization | |
LEFT JOIN ps_dynamicproduct_input_field dif ON dif.id_input = di.id_input AND dif.type = 8 #dropdown type | |
LEFT JOIN ps_dynamicproduct_dropdown_option ddo ON ddo.id_field = dif.id_field AND ddo.sku = '10x10' | |
LEFT JOIN ps_orders o ON o.id_order = od.id_order | |
WHERE o.date_add BETWEEN '2024-04-24 14:04:49' AND '2024-04-25 14:04:49' |
This file contains 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 | |
/** @var int $id_product */ | |
/** @var float $product_price */ | |
use DynamicProduct\classes\DynamicTools; | |
use DynamicProduct\classes\module\DynamicCalculator; | |
if (isset($reverse_discount)) { |
This file contains 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 | |
/** @var int $id_product */ | |
/** @var float $product_price */ | |
use DynamicProduct\classes\DynamicTools; | |
use DynamicProduct\classes\module\DynamicCalculator; | |
if(isset($vat)) { |
This file contains 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
{ | |
"logo_field": "upload_pms_finder", | |
"color_count_field": "nb_colors", | |
"color_table": "yarn_colortable.csv", | |
"default_image": "https://yeslogo.eu/themes/at_movic/assets/img/modules/leoslideshow/slider1920x900_embroidery_medium.jpg", | |
"max_colors": 5, | |
"nb_closest_yarns": 3 | |
} |
NewerOlder