I have an observer I want to run when the following event is triggered:<sales_quote_address_collect_totals_after>
I am basing my configuration on this: How to create an new observer on the event catalog_product_save_before
I have setup my config file as follows:
app/etc/modules/DBCustom_Sales.xml
<config>
<modules>
<DBCustom_Sales>
<active>true</active>
<codePool>local</codePool>
</DBCustom_Sales>
</modules>
</config>
app/code/local/DBCustom/Sales/etc/config.xml
<config>
<modules>
<DBCustom_Sales>
<version>0.1.0</version>
</DBCustom_Sales>
</modules>
<global>
<models>
<sales>
<rewrite>
<order_shipment>DBCustom_Sales_Model_Order_Shipment</order_shipment>
<order>DBCustom_Sales_Model_Order</order>
</rewrite>
</sales>
</models>
</global>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<dbcustom_sales before="Mage_Adminhtml">DBCustom_Sales_Adminhtml</dbcustom_sales>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<events>
<sales_quote_address_collect_totals_after>
<observers>
<dbcustom_sales>
<type>singleton</type>
<class>dbcustom_sales/observer</class>
<method>setShippingCost</method>
</dbcustom_sales>
</observers>
</sales_quote_address_collect_totals_after>
</events>
</config>
I have the path to the observer as follows: app/code/local/DBCustom/Sales/Model/Observer.php
class DBCustom_Sales_Model_Observer{
public function setShippingCost($observer){
$test = '';
}
}
I am using PHPStorm with breakpoints setup on the $test variable so if the observer is active, it should break at $test, but it currently does not break on $test. I have cleared the site cache multiple times, and have confirmed that the event is being triggered, but nothing happens here. Any help is appreciated.
app/code/local/DBCustom/Sales/etc/config.xml
?<dbcustom_sales> <class>DBCustom_Sales_Model</class> </dbcustom_sales>
; also,<events>
is supposed to be a child of<global>
.