Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error when creating new shipping extension
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Okay, I finally have time to work on my shipping extension again which is way past due as it has been having problems with invoicing and shipping since 1.1.x

I’ve got it working in the front and back just fine, but when you go to invoice or ship it displays the following error:

Invalid model for shipping methodcarrier_name
Trace
:
#0 /app/code/core/Mage/Shipping/Model/Config.php(90): Mage::exception('Mage_Shipping', 'Invalid model f...')
#1 /app/code/core/Mage/Shipping/Model/Config.php(61): Mage_Shipping_Model_Config->_getCarrier('carrier_name', Array, '1')
#2 /app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php(89): Mage_Shipping_Model_Config->getAllCarriers('1')
#3 /app/design/adminhtml/default/default/template/sales/order/invoice/create/tracking.phtml(88): Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Tracking->getCarriers()
#4 /app/code/core/Mage/Core/Block/Template.php(144): include('/home/minerva8/...')
#5 /app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#6 /app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#7 /app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#8 /app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#9 /app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml('tracking', false)
#10 /app/design/adminhtml/default/default/template/sales/order/invoice/create/form.phtml(80): Mage_Core_Block_Abstract->getChildHtml('tracking', false)
#11 /app/code/core/Mage/Core/Block/Template.php(144): include('/home/minerva8/...')
#12 /app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#13 /app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#14 /app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#15 /app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#16 /app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml('form', true)
#17 /app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php(126): Mage_Core_Block_Abstract->getChildHtml('form')
#18 /app/design/adminhtml/default/default/template/widget/form/container.phtml(37): Mage_Adminhtml_Block_Widget_Form_Container->getFormHtml()
#19 /app/code/core/Mage/Core/Block/Template.php(144): include('/home/minerva8/...')
#20 /app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 /app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#22 /app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#23 /app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#24 /app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#25 /app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#26 /app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#27 /app/design/adminhtml/default/default/template/page.phtml(73): Mage_Core_Block_Abstract->getChildHtml('content')
#28 /app/code/core/Mage/Core/Block/Template.php(144): include('/home/minerva8/...')
#29 /app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#30 /app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#31 /app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#32 /app/code/core/Mage/Core/Model/Layout.php(525): Mage_Core_Block_Abstract->toHtml()
#33 /app/code/core/Mage/Core/Controller/Varien/Action.php(339): Mage_Core_Model_Layout->getOutput()
#34 /app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(246): Mage_Core_Controller_Varien_Action->renderLayout()
#35 /app/code/core/Mage/Core/Controller/Varien/Action.php(367): Mage_Adminhtml_Sales_Order_InvoiceController->newAction()
#36 /app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(143): Mage_Core_Controller_Varien_Action->dispatch('new')
#37 /app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#38 /app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#39 /index.php(52): Mage::run()

This is on a fresh install of 1.2.1.2 ... does anyone have an idea as to what else needs modified? The carrier_name is declared as I saw it show up elsewhere. I’m not sure why it is so confused right now.

You can see the frontend in action here: http://www.minervapromotions.com/test/

 
Magento Community Magento Community
Magento Community
Magento Community
 
dileepgm
Jr. Member
 
Total Posts:  27
Joined:  2009-02-01
 

Hello Sherrie,

I am new to the magento, and i am installed the latest version in my server (1.2.1.2). I need to create a shipping method for my store the one you created for your site. Can you explain me the step by step procedure to create a new shipping method and where i can calculate the shipping charge.

please help me

thanks in advance
dileep G

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

@dileepgm: This is a good model to follow http://www.magentocommerce.com/wiki/how-to/create-shipping-method-module however I’m still getting the error with my Invoice and Ship buttons so I can’t really fully help you till I resolve that. If you have any questions let me know and I’ll be glad to help where I can.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dileepgm
Jr. Member
 
Total Posts:  27
Joined:  2009-02-01
 

Hello Sherrie,

I will try this tutorial and let you know if i get any errors, mean the time if you got a solution to your problem please let me know the status.

thank you very much for your response
dileep G

 
Magento Community Magento Community
Magento Community
Magento Community
 
dileepgm
Jr. Member
 
Total Posts:  27
Joined:  2009-02-01
 

@Sherrie,

I have followed the steps to create new shipping method, it is showing in the admin. But it is not showing in the front end. Also let me know where i have to write the php code to calculate the new shipping charge.

thank you
dileep

 
Magento Community Magento Community
Magento Community
Magento Community
 
dileepgm
Jr. Member
 
Total Posts:  27
Joined:  2009-02-01
 

@Sherrie,

How can i loop through a record set. I need to fetch about 100 records and want to loop through it and store it into an array. I have given this code

$select = $read->select()->from($emsChargeTable);
$select->where($read->quoteInto(’chr_active=?’, ‘Y’). 
$read->quoteInto(’ and int_zone_id=?’,$int_zone_id));

i need to loop the recordset which returns the above query.

Can you please help me to do that?

thanks in advance
dileep

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top