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 | |
// The path to the /override/modules folder in your custom module | |
$module_path = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $this->name . | |
DIRECTORY_SEPARATOR . 'override' . DIRECTORY_SEPARATOR . 'modules'; | |
// The path to the PrestaShop override folder | |
$override_path = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'override' . DIRECTORY_SEPARATOR . 'modules'; | |
// Add an entry to the array for all of the overrides that you want to be copied to the override folder: | |
$files = array( |
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 | |
$module = Module::getInstanceByName('module_name'); | |
$module->functionName(); |
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 | |
// SQL SELECT | |
// Simple SELECT | |
$sql = 'SELECT `id_authorization_role` FROM `' . _DB_PREFIX_ . 'authorization_role` t WHERE ' . implode(' OR ', $whereClauses); | |
// Or SELECT with INNER JOIN | |
$sql = 'SELECT * FROM ' . _DB_PREFIX_ . 'orders o | |
INNER JOIN ' . _DB_PREFIX_ . 'order_detail od | |
ON o.id_order = od.id_order | |
WHERE od.product_id = '. $var | |
); |
NewerOlder