Files
interblue.pl/info.php
Jacek Pyziak 3fc0519f9d Add review step template for one page checkout module
- Introduced a new template file 'review copy.tpl' for the order summary step in the one page checkout process.
- The template includes a loading indicator and a header for the order summary section.
- Conditional rendering based on customer registration status is implemented.
2026-02-27 00:04:16 +01:00

84 lines
3.2 KiB
PHP

<?
die('a');
include 'medoo.php';
$mdb = new medoo( [
'database_type' => 'mysql',
'database_name' => 'interblue_sklep',
'server' => 'localhost',
'username' => 'interblue_sklep',
'password' => '2212+#++@pSVSb4',
'charset' => 'utf8'
] );
// $manufacturer = $mdb -> query( 'SELECT * FROM ps_manufacturer WHERE name != \'SOLLUX\' and name != \'EKO LIGHT\' and name != \'CANDELLUX\' and name != \'POLLUX\'' ) -> fetchAll( PDO::FETCH_ASSOC );
// if ( is_array( $manufacturer ) && count( $manufacturer ) > 0 )
// {
// foreach ( $manufacturer as $single_manufacturer )
// {
// $products = $mdb -> query( 'SELECT * FROM ps_product WHERE id_manufacturer = ' . $single_manufacturer['id_manufacturer'] ) -> fetchAll( PDO::FETCH_ASSOC );
// foreach ( $products as $single_product )
// {
// // update price by 5%
// $new_price = (float)$single_product['price'] * 1.05;
// $new_wholesale_price = (float)$single_product['wholesale_price'] * 1.05;
// // get id from ps_product_shop
// $product_shop = $mdb -> query( 'SELECT * FROM ps_product_shop WHERE id_product = ' . $single_product['id_product'] ) -> fetch( PDO::FETCH_ASSOC );
// // update price in ps_product
// $mdb -> update( 'ps_product', [
// 'price' => $new_price,
// 'wholesale_price' => $new_wholesale_price
// ], [
// 'id_product' => $single_product['id_product']
// ] );
// // update price in ps_product_shop
// $mdb -> update( 'ps_product_shop', [
// 'price' => $new_price,
// 'wholesale_price' => $new_wholesale_price
// ], [
// 'id_product' => $single_product['id_product']
// ] );
// }
// }
// }
// $row = 0;
// $data = array();
// if (($handle = fopen("sollux.csv", "r")) !== FALSE) {
// while (($dataRow = fgetcsv($handle, 1000, ";")) !== FALSE) {
// $num = count($dataRow);
// $row++;
// for ($c=0; $c < $num; $c++) {
// $data[$row][$c] = $dataRow[$c];
// }
// }
// fclose($handle);
// }
// foreach ( $data as $single_product )
// {
// if ( (int)$single_product['0'] > 0 )
// {
// echo 'ID: ' . $single_product['0'] . '<br />';
// $count_result = $mdb -> query( 'SELECT COUNT(0) AS result_count FROM ps_accessory WHERE ( id_product_1 = ' . $single_product['0'] . ' AND id_product_2 = \'26712\' ) OR ( id_product_2 = ' . $single_product['0'] . ' AND id_product_1 = \'26712\' )' ) -> fetchAll( PDO::FETCH_ASSOC );
// if ( !$count_result[0]['result_count'] )
// {
// $mdb -> insert( 'ps_accessory', [
// 'id_product_1' => $single_product['0'],
// 'id_product_2' => '26712'
// ] );
// }
// $count_result = $mdb -> query( 'SELECT COUNT(0) AS result_count FROM ps_accessory WHERE ( id_product_1 = ' . $single_product['0'] . ' AND id_product_2 = \'26711\' ) OR ( id_product_2 = ' . $single_product['0'] . ' AND id_product_1 = \'26711\' )' ) -> fetchAll( PDO::FETCH_ASSOC );
// if ( !$count_result[0]['result_count'] )
// {
// $mdb -> insert( 'ps_accessory', [
// 'id_product_1' => $single_product['0'],
// 'id_product_2' => '26711'
// ] );
// }
// }
// }