I am receiving the following error, and I do not understand why. Any ideas or suggestions are greatly appreciated, I have been banging my head against my desk for the past couple of hours, and I am not sure what to do next.

Warning: include(VMR/Czechposta/Model/Rate/Request.php): failed to open stream: No such file or directory in /jlr/sites/mage/lib/Varien/Autoload.php on line 93

My config.xml looks like

            <depends><Mage_Shipping /></depends>

                      <title>Czech Posta</title>
                  <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this     shipping method, please contact us.</specificerrmsg>

And my Model looks like

class VMR_Czechposta_Model_Carrier_Czechposta
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface

    protected $_code = 'czechposta';
    protected $_isFixed = true;

     * Enter description here...
     * @param Mage_Shipping_Model_Rate_Request $data
     * @return Mage_Shipping_Model_Rate_Result
    public function collectRates(Mage_Shipping_Model_Rate_Request $request)
        if (!$this->getConfigFlag('active')) {
            return false;

        $freeBoxes = 0;
        if ($request->getAllItems()) {
            foreach ($request->getAllItems() as $item) {

                if ($item->getProduct()->isVirtual() || $item->getParentItem()) {

                if ($item->getHasChildren() && $item->isShipSeparately()) {
                    foreach ($item->getChildren() as $child) {
                        if ($child->getFreeShipping() && !$child->getProduct()->isVirtual()) {
                            $freeBoxes += $item->getQty() * $child->getQty();
                } elseif ($item->getFreeShipping()) {
                    $freeBoxes += $item->getQty();

        $result = Mage::getModel('shipping/rate_result');
        if ($this->getConfigData('type') == 'O') { // per order
            $shippingPrice = $this->getConfigData('price');
        } elseif ($this->getConfigData('type') == 'I') { // per item
        $shippingPrice = ($request->getPackageQty() * $this->getConfigData('price')) - ($this->getFreeBoxes() * $this-    >getConfigData('price'));
        } else {
            $shippingPrice = false;

        $shippingPrice = $this->getFinalPriceWithHandlingFee($shippingPrice);

        if ($shippingPrice !== false) {
            $method = Mage::getModel('shipping/rate_result_method');



            if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) {
                $shippingPrice = '0.00';



        return $result;

    public function getAllowedMethods()
        return array('czechposta'=>$this->getConfigData('name'));


1 Answer 1


This code is the problem:


By adding that to your config.xml you just told Magento you have overwritten every model that starts with shipping. Basically now Mage::getModel('shipping/...') will look for the model in your module.
I think what you need is this:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.