- Created main module file `customfeaturetab.php` to manage product tabs based on feature values. - Implemented database installation and uninstallation methods to create necessary tables. - Added admin controller files for handling redirects and admin functionalities. - Introduced AJAX functionality in `admin.js` for dynamic feature value selection based on selected features. - Included temporary query script for testing feature values. - Added language support for the module with Polish translations. - Created necessary view files and JavaScript files for module functionality. - Added logo image for the module.
24 lines
958 B
PHP
24 lines
958 B
PHP
<?php
|
|
// Temporary query script - DELETE AFTER USE
|
|
include_once dirname(__FILE__) . '/../../config/config.inc.php';
|
|
|
|
$sql = "SELECT p.id_product, pl.name AS product_name, fl.name AS feature_name, fvl.value AS feature_value
|
|
FROM ps_feature_product fp
|
|
JOIN ps_feature_lang fl ON fp.id_feature = fl.id_feature AND fl.id_lang = 1
|
|
JOIN ps_feature_value_lang fvl ON fp.id_feature_value = fvl.id_feature_value AND fvl.id_lang = 1
|
|
JOIN ps_product p ON fp.id_product = p.id_product
|
|
JOIN ps_product_lang pl ON p.id_product = pl.id_product AND pl.id_lang = 1
|
|
WHERE fl.name = 'Seria' AND fvl.value = 'Simon 10'
|
|
ORDER BY p.id_product
|
|
LIMIT 20";
|
|
|
|
header('Content-Type: text/plain; charset=utf-8');
|
|
$results = Db::getInstance()->executeS($sql);
|
|
if ($results) {
|
|
foreach ($results as $row) {
|
|
echo $row['id_product'] . ' | ' . $row['product_name'] . ' | ' . $row['feature_name'] . ' -> ' . $row['feature_value'] . "\n";
|
|
}
|
|
} else {
|
|
echo "Brak wynikow\n";
|
|
}
|