1.7.xモジュールのアップデートで1 Click UpdateがUpdate Assistantへ更新されます。
PHPバージョンは、1.7.xがサポートしているバージョン7.4を維持。
アップグレード後、以下のエラーを修正。
Table ‘store.ps_layered_filter_block’ doesn’t exist
テーブルを再作成
管理画面で「モジュール」→「モジュールマネージャー」→ Faceted Search (ブロックレイヤードナビゲーション) を確認
再インストール
再インストールすると必要なテーブル (ps_layered_filter_block など) が自動作成されます。
Argument 7 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::__construct() must be of the type string, array given, called in /var/www/html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 356
以下参照して該当ファイルのコード書換え。
[Screenshot from 2025-02-25 08-35-08]
Type error: Argument 7 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::__construct() must be of the type string, ar…
store/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php
/*
if ($address->id_state) {
$state = new State($address->id_state);
$stateName = $state->name;
}
*/
if ($address->id_state) {
$state = new State($address->id_state);
$langId = (int) $order->getAssociatedLanguage()->getId();
// `name` が配列の場合、現在の言語 ID に対応する値を取得
if (is_array($state->name)) {
$stateName = $state->name[$langId] ?? reset($state->name);
} else {
$stateName = $state->name;
}
}
overrideフォルダの旧ファイルのリネーム
バージョン1.6から引き継がれているPHPコード(クラス)を無効化するため、overrideフォルダ内のindex.phpを除く全てのPHPクラスファイルを無効化。キャッシュをクリアし、クラスへの参照を全てclassesへ移行。
$ sudo rm -r var/cache/*
$ sudo mv override/classes/xxx.php override/classes/xxx.php.bak
php-fpmのベースイメージを7.4から8.1へアップグレード
https://hub.docker.com/r/prestashop/prestashop/tags
ドキュメント
Learn how to extend, modify and test PrestaShop, create modules, themes, and more.
E-Mail送信テスト
注文後のメール送信テストは下記テンプレートを選択して実行。
国・地域別アクセス制限設定
Hi all, I am wondering, how can I update my GeoLocation data on PS 1.7.8.8 ? I am using the normal, built-in PrestaShop GeoLocation. I've never had a problem with it before, but I've had a UK customer complain that his currency was showing as...
https://www.maxmind.com/en/geoip-databases
トラブルシュート
注文メール表示エラー
Emailテーマでテンプレートを上書き後発生
テーブルセルのズレ
以下の要素がそれぞれ参照ファイルにより独自のテーブルを作成しているが、テンプレートで各テーブルを完全に分離した状態で配置していない。
{products} : mails/_partials/order_conf_product_list.tpl
{discounts} : mails/_partials/order_conf_cart_rules.tpl
翻訳テンプレートから修正するか、言語ごとに以下のファイルを直接編集。
翻訳テンプレートの以下の編集画面でテーブルの列を追加してセルをマージ、{products} {discounts} をマージしたセルへ移動。
修正ファイル(修正箇所のみ)
themes/classic/mails/en/order_conf.html
<table class="table table-recap" bgcolor="#ffffff"><!-- Title -->
<tbody>
<tr>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Reference</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Product</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" width="17%">Unit price</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Quantity</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" width="17%">Total price</th>
</tr>
<tr>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" colspan="5">{products} {discounts}</th>
</tr>
セラーへ新規注文メールが送信されない
モジュール専用テンプレートディレクトリ
themes/classic/modules/ps_emailalerts/mails/en/new_order.html
を
themes/classic/mails/en/new_order.html
にコピーしないとテンプレートが有効にならない。
PrestaShopのメールテンプレート読み込み処理 は、基本的にモジュール専用のメールテンプレートをこの場所からは参照しないようです。
Manropeフォント崩れ
Hi! This is the first time I'm working with Presta, it's mega cool (much better than WP) however I've run into a couple of problems that I can't solve, and I've already gone through a couple of tutorials. 1. fonts - I changed the files on the server,...
一部ブラウザでフォント崩れが発生するため、デフォルトのクラッシックテーマのフォントをManropeからArialへ変更。
SSH接続して以下ファイルの該当箇所を変更
themes/classic/assets/css/theme.css
body{font-family:Arial,sans-serif; ........................