バージョンアップファイル
■composer.json
■composer.lock
■html/index_dev.php
■src/Eccube/Common/Constant.php
■src/Eccube/Controller/EntryController.php
■src/Eccube/Controller/ShoppingController.php
■src/Eccube/Resource/template/default/Cart/index.twig
■vendor
現行サイトのvendorを新しいvendorと入れ換えます。
(現在のvendorを削除。新しいvendorを追加。)
変更内容の詳細
(1)■composer.json
"jbinfo/mobile-detect-service-provider": "^1.1"
↓【変更】
"jbinfo/mobile-detect-service-provider": "^1.1",
"twig/twig": "1.34.0"
(2)■composer.lock
"content-hash": "af98124cf4b7cec648749ee9458755e0",
↓【変更】
"content-hash": "1521d13d394252d880141feb52a50f78",
(3)■html/index_dev.php
'::1',
'',
↓【変更】
'::1',
(4)■src/Eccube/Common/Constant.php
const VERSION = '3.0.15';
↓【変更】
const VERSION = '3.0.16';
(5)■src/Eccube/Controller/EntryController.php
210行目付近、$this->getSecurity($app)->setToken($token); の次に追加
$request->getSession()->migrate(true, $app['config']['cookie_lifetime']);
(6)■src/Eccube/Controller/ShoppingController.php
① use Eccube\Entity\CustomerAddress; の次に追加
use Eccube\Entity\Order;
② public function confirm( )内、「// お問い合わせ、配送時間などのフォーム項目をセット」の前に追加
// 支払方法を検証
$this->checkPaymentType($Order, $data);
③ public function confirm( ){ }の次に追加
/**
* 支払方法がOrderに保持している支払方法と一致することを確認する
*
* @param $Order Order
* @param $data array
* @throws \Eccube\Exception\ShoppingException
*/
private function checkPaymentType($Order, $data)
{
$orderPaymentId = $Order->getPayment()->getId();
$formPaymentId = $data['payment']->getId();
if (empty($orderPaymentId) || empty($formPaymentId)) {
throw new ShoppingException('front.shopping.system.error');
}
if ($orderPaymentId != $formPaymentId) {
throw new ShoppingException('front.shopping.system.error');
}
}
(7)■src/Eccube/Resource/template/default/Cart/index.twig
最後の</div>が削除されている。
(8)■vendor
現行サイトのvendorを新しいvendorと入れ換えます。
(現在のvendorを削除。新しいvendorを追加。)