magento への新しい配送方法を実装するモジュールを作成しました。現在、モジュールは正常に動作しています。
配送方法は、1 ページのチェックアウトに表示されます。
class Tigerbytes_Barverkauf_Model_Carrier_Selbstabholung extends Mage_Shipping_Model_Carrier_Abstract
今、私は機能を拡張したいと考えています。新しい出荷モジュールはフロントエンドに表示されなくなります。したがって、モジュールに新しい属性を追加しました。(show_frontend)
config.xml
<default>
<carriers>
<selbstabholung>
<active>1</active>
<allowed_methods>selbstabholung</allowed_methods>
<methods>selbstabholung</methods>
<sallowspecific>0</sallowspecific>
<model>Tigerbytes_Barverkauf_Model_Carrier_Selbstabholung</model>
<name>Selbstabholung</name>
<title>Selbstabholung</title>
<specificerrmsg>Zur Zeit ist die Versandmethode nicht verfuegbar</specificerrmsg>
<handling>0</handling>
<handling_type>F</handling_type>
<show_frontend>0</show_frontend>
</selbstabholung>
</carriers>
system.xml
<show_frontend translate="label">
<label>zeige im Frontend?</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</show_frontend>
属性 show_frontend はバックエンドに表示され、core_config_data テーブルにも保存されます。
ここでの大きな問題は、ユーザー選択のためにワンページ チェックアウトの配送方法を取得するときに、オブジェクトに show_frontend 属性がないことです。
発送方法リストに使われている物は
Mage_Sales_Model_Quote_Address_Rate
では、rate オブジェクトが show_frontend 属性を認識できるようにするには、何を拡張する必要があるのでしょうか?