I have built a shipping module that calculates a number of things, then makes three options available for the customer to choose from. I am not using any of the built-in options for shipping.
When I try to create an order (from scratch or a reorder) from the admin, it gives me the message Sorry, no quotes are available for this order at this time.
How do I make my shipping method available to the admin? Do I have to create a separate module for the admin or is there xml I can add to make this available?
I am running version 1.9.
config.xml
<?xml version="1.0"?>
<config>
<modules>
<ECB_Shipping>
<version>0.1.0</version>
</ECB_Shipping>
</modules>
<global>
<models>
<ecb_shipping>
<class>ECB_Shipping_Model</class>
</ecb_shipping>
</models>
<helpers>
<ecb_shipping>
<class>ECB_Shipping_Helper</class>
</ecb_shipping>
</helpers>
</global>
<default>
<carriers>
<ecb_shipping>
<active>1</active>
<sort_order>10</sort_order>
<model>ecb_shipping/carrier</model>
<title>ECB Shipping Methods</title>
<sort_order>10</sort_order>
</ecb_shipping>
</carriers>
</default>
</config>
system.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<sections>
<carriers>
<groups>
<ecb_shipping translate="label">
<label>ECB Shipping Methods</label>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
<fields>
<active translate="label">
<label>Enabled</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>0</show_in_website>
<show_in_store>0</show_in_store>
</active>
<title translate="label">
<label>Shipping Method title</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
</title>
</fields>
</ecb_shipping>
</groups>
</carriers>
</sections>
</config>
For the cart functions, I won't paste them all here, but some of the items in question have to do with getting the customer's cart. Do these things work for the admin?
$count = Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty();
$cart = Mage::getSingleton('checkout/cart');
This is how the functions are being initialized:
class ECB_Shipping_Model_Carrier
extends Mage_Shipping_Model_Carrier_Abstract
implements Mage_Shipping_Model_Carrier_Interface {
The easiest method, the better. If this isn't possible and there is a way to just override this completely and have the admin enter the shipping, that's a fine end solution.