Fatal Error Call To A Member Function Getposition
Secure Hosting Live Stores Showcase Knowledge Base FAQ Instant response Categories Magenting Common Questions Access Domains Migration / Transfer Payments Magento General Configuration Magenting Specific Products and Categories Localization Shipping Extensions Themes Navigation All categories Magenting Hosting Magento General Configuration Magenting Specific Products and Categories Content Management Localization Shipping Extensions Themes Troubleshooting Magento backend Magento frontend Magento Connect Sitemap Support ServiceIn doubt? Just let us know KnowledgeBase » Magento » Troubleshooting » Magento frontend Magento • Fatal error: Call to a member function getPosition() on a non-object in app/code/core/Mage/Page/Block/Template/Links.php on line 112 Article ID #1157 Revision: 1.2Last update: 2013-01-24 applies to Magento 1.4.2.0 and newer versions Symptoms The following error message is shown in Magento frontend: Fatal error: Call to a member function getPosition() on a non-object in app/code/core/Mage/Page/Block/Template/Links.php on line 112 Cause The error is caused by the following instruction in the layout (you can search app/design/frontend/*/*/layout/*.xml files for a file with such instruction to locate it):
This way was used to remove wishlist link in earlier Magento versions. Since Magento 1.4.2.0 version wishlist_link block is generated directly by the code (addLinkBlock function in app/code/core/Mage/Page/Block/Template/Links.php). Solution Simply removing the instruction and flusing Magento cache should solve the issue. However, it will add wishlist link to the links block. If you need to delete the wishlist link from links block in Magento 1.4.2.0, Magento 1.5.1.0 or Magento 1.6 versions and above try the following layout instructions instead:
Sign in Pricing Blog Support Search GitHub This repository Watch 751 Star 3,799 Fork 2,672 magento/magento2 Code Issues 1,326 Pull requests 251 Projects 0 Wiki Pulse Graphs New issue Fatal error when reorder order with 2 bundle products #4049 Closed katesuykovskaya opened this Issue Apr 7, 2016 · 3 comments Projects None yet Labels acknowledged bug report needs update Milestone No milestone Assignees NadiyaS 4 https://kb.magenting.com/content/21/84/en/magento-fatal-error-call-to-a-member-function-getposition-on-a-non-object-in-app-code-core-mage-page-block-template-linksphp-on-line-112.html participants katesuykovskaya commented Apr 7, 2016 Steps to reproduce 1.magento 2.0.2 2. create bundle product with 2 or more options and 1 non-required custom option add this bundle product to cart twice. First time without checking custom option, 2nd - with it. Custom option here is added to create separate quote and order https://github.com/magento/magento2/issues/4049 items using one product place order in admin panel invoice and ship this order. go to customer account dashboard go to order, click Reorder Actual result Fatal error: Call to a member function getPosition() on a non-object in /var/www/graffiticaps-m2.iwdfun.com/vendor/magento/module-bundle/Model/Product/Type.php on line 1019 Note if this bundle product has 1 item in order, or if bundle product has 1 option, everything is OK. MomotenkoNatalia added the CS label Apr 8, 2016 NadiyaS was assigned by MomotenkoNatalia Apr 8, 2016 piotrekkaminski added the bug label May 27, 2016 piotrekkaminski commented May 27, 2016 • edited internal issue MAGETWO-53560 NadiyaS added the acknowledged label May 30, 2016 NadiyaS commented May 31, 2016 Hi @Katerina1993, this bug is really reproducible on 2.0.2 Magento version.. On the latest Magento version (2.0.7) this bug was fixed but there is another problem with reorder which was already fixed in develop branch. Please upgrade your Magento to 2.0.7 where no such fatal error.
Products programtically without getting this error. https://www.daniweb.com/programming/web-development/threads/483808/magento-budle-product Fatal error: Call to a member function getPosition() on a non-object in \app\code\core\Mage\Bundle\Model\Product\Type.php on line 854 This is my code: class TCK_Forty_CartController http://stackoverflow.com/questions/17195938/magento-bundle-product-inside-bundle-products-almost-working extends Mage_Core_Controller_Front_Action { public function addAction() { $prdId = $this->getRequest()->getParam('product'); $cart = Mage::getModel('checkout/cart'); $cart->init(); $_return = array('code' => 0, 'message' => fatal error 'Something went wrong...'); if (!empty($prdId)) { $product = new Mage_Catalog_Model_Product(); $product->load($prdId); if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) { $typeInstance = $product->getTypeInstance(true); $optionCollection = $typeInstance->getOptionsCollection($product); $selectionCollection = $typeInstance->getSelectionsCollection( $typeInstance->getOptionsIds($product), $product ); $this->_options = $optionCollection->appendSelections($selectionCollection, false, Mage::helper('catalog/product')->getSkipSaleableCheck() ); $bundle_option = array(); foreach ($this->_options as $key => $value) { fatal error call foreach ($value['selections'] as $selKey => $selection) { $bundle_option[$selection->option_id][] = $selection['selection_id']; } } $params = array( 'product' => $prdId, 'related_product' => '', 'bundle_option' => $bundle_option, 'qty' => '1', ); $cart->addProduct($product, $params); $cart->save(); } } } } custom magento php products scarcella 11 99 posts since Sep 2010 Community Member 2Contributors 2Replies 15Views 2 YearsDiscussion Span 2 Years Ago Last Post by veedeoo 0 veedeoo 474 2 Years Ago I don't have the source of Magento, but what the error tells us is that whatever is the object of the method getPosition(), it is not being instantiated. You will have to find this on your codes. Please read the codes below as instructions and not the actual method of the core type.php, because I am shooting lots of blanks and guesses here
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Magento - Bundle product inside bundle products (Almost working) up vote 3 down vote favorite 3 I'm trying to add bundle products inside another bundle product. It's quite simple to achieve my status. Edit the file /app/code/Mage/Bundle/etc/config.xml like this: ...