クライアントの 1 人のために Oxidshop をカスタマイズしています。BasketComponent ファイルの「changebasket」関数をカスタマイズして、さらに検証を追加したいと考えています。この目的のために、カスタム モジュールも作成しました。メタデータ ファイルを使用してクラスを拡張しようとしています。
'extend' => array(
'oxcmp_basket' => \MyVendor\Basket\Application\Components\BasketComponent::class,
),
BasketComponent ファイルには次のコードがあります。
<?php
namespace MyVendor\Basket\Application\Components;
/**
* Class LinslinSliderMain.
*/
class BasketComponent extends BasketComponent_parent
{
/**
* @param null $sProductId
* @param null $dAmount
* @param null $aSel
* @param null $aPersParam
* @param bool $blOverride
*/
public function changebasket($sProductId = null, $dAmount = null, $aSel = null, $aPersParam = null, $blOverride = true)
{
echo 'call success';exit;
parent::changebasket($sProductId, $dAmount, $aSel, $aPersParam, $blOverride);
}
}
がアクティブになります。ただし、フロントエンドでページを更新すると、自動的に非アクティブ化されます。コードの何が問題なのかわかりません。
編集:私は、このエラーをoxideshop.logファイルで取得しています
Module class MyVendor\Basket\Application\Components\BauerBasketComponent not found. Module ID basket disabled.