Komunikat o błędzie

  • User warning: The following module is missing from the file system: bueditor. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: field_validation_extras. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: field_validation_ui. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: geshifield. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: geshifilter. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: google_plusone. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: linkit. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: property_validation. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: taxonomy_menu. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: tweetbutton. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: wysiwyg. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • User warning: The following module is missing from the file system: field_validation. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1181 of /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/bootstrap.inc).
  • Notice: Undefined index: execute_responsive_theme w drupal_theme_initialize() (linia 100 z /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/theme.inc).
  • Notice: Trying to get property 'filename' of non-object w _drupal_theme_initialize() (linia 146 z /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/theme.inc).
  • Notice: Trying to get property 'name' of non-object w _theme_load_registry() (linia 335 z /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/theme.inc).
  • Notice: Undefined index: execute_responsive_theme w theme_get_setting() (linia 1440 z /usr/home/tomaszroot/domains/blog.tomlot.eu/public_html/includes/theme.inc).

Przeniesienie cen z netto do brutto oraz obniżenie cen netto o podatek 23% VAT

[php]
try {
$db_server = 'localhost';
$db_name = 'localhost';
$db_user = 'localhost';
$db_passwd = 'localhost';

$db_pdo = new PDO(
"mysql:host=$db_server;dbname=$db_name",
$db_user,
$db_passwd,
[PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"]
);

$db_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

# wyciągniecie kategorii głównych
$wynik = $db_pdo->query("
SELECT id_product, price_min
FROM ps_layered_price_index");

while ($cenaBrutto = $wynik->fetch()) {
// $sql = "UPDATE ps_product
$sql = "UPDATE ps_product_shop
SET price = :cena
WHERE id_product = :id";

$aktualizacjaCen = $db_pdo->prepare($sql);
$aktualizacjaCen->bindParam(':cena', $cenaBrutto['price_min']);
$aktualizacjaCen->bindParam(':id', $cenaBrutto['id_product']);

if ($aktualizacjaCen->execute()) {
print $cenaBrutto['id_product']. " - wykonałem aktualizację ceny".PHP_EOL;
}
// print $cenaBrutto['id_product'] ."-". $cenaBrutto['price_min'].PHP_EOL;
}
# wpowadzenie podatku w całym sklepie, wzorowany na → https://pskrk.com/jak-w-szybki-sposob-zmienic-podatek-dla-wszystkich-produktow-w-calym-sklepie/
// UPDATE `ps_product` SET `id_tax_rules_group` = '1';
// UPDATE `ps_product_shop` SET `id_tax_rules_group` = '1';

# obnieżenie cen o podatek VAT, wzorowany na → https://www.inmotionhosting.com/support/edu/prestashop/mass-price-update-prestashop/
// UPDATE ps_product_shop SET price = price / 1.23;
// UPDATE ps_product SET price = price / 1.23

$db_pdo = NULL;
} catch (PDOException $e) {
print "Błąd: " . $e->getMessage();
die();
}
[/php]

Wiedza: 
Praktyczna