1 Comment

Bundle product add to cart issue : Call to a member function getPosition() on a non-object

Hide payment method if company name field got a value
How to fix Magento 2.0 Frontend Quick Add to Cart

I am facing very weird issue on my server while adding bundle product in the shopping cart.Whenever I am trying to add my bundle product, it gives me error like

Fatal error: Call to a member function getPosition() on a non-object in app/code/core/Mage/Bundle/Model/Product/Type.php on line 850.

While debugging in this file ,just find that first magento set it bundle product option and then find its position value .

magento set it option from this line

        $optionsCollection->appendSelections($selections, false, $_appendAllSelections);

from this method.

protected function _prepareProduct(Varien_Object $buyRequest, $product, $processMode)

But magento didn’t set it option[Not sure why this occur] and try to get `Position .

Can any one help me to sort out this weired issue ?

Thanks

Related Posts

  • Bundle options not added to cart (0)
    I'm trying to build a Magento admin plugin to read a CSV file and convert it to an order. So far with simple products no problem but I have a weird issue with bundle products. For some reason the bundle option itself are not added to the cart. Only the parent product will be […]
  • Bundle options not added to cart (0)
    I'm trying to build a Magento admin plugin to read a CSV file and convert it to an order. So far with simple products no problem but I have a weird issue with bundle products. For some reason the bundle option itself are not added to the cart. Only the parent product will be […]
  • Place order, validates correctly returns to empty shopping cart page (0)
    ive got a weird issue with Magento, we recently applied the SUPEE-7405 patch on 1.6.1 and after this, as soon as you make a payment via the onestepcheckout, it returns to the continue shopping page after the payment has been processed by the gateway provider. This might be quite […]
  • Limit cart quantity of bundled product (1)
    I am looking at limiting customers to buying 1 bundle product at a time. Is there a way of setting "Maximum Qty Allowed in Shopping Cart" for a bundle product. I want to do this without limiting the individual products, so customers can buy as many of them separately. Any ideas if […]
  • Magento 2.1 – We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty) (2)
    We are having some issues when a customer try to remove the last (one) item from the shopping cart before it becomes empty, the only message that comes up is: We can't remove the item. I have no idea why or how to fix it, or at least how to debug it. Any help is appreciated. Thanks
  • Shopping Cart Price Rules Conditions stopped working? (0)
    I have a coupon created in Promotions > Shopping Cart Price Rules and when I set up a subtotal condition in Conditions tab like this: If ALL of these conditions are TRUE : Subtotal equals or greater than 90 It always returns this when I try to apply it to the cart: Coupon […]
  • Parameter in checking item quantity (0)
    After daily debugging I'm a little bit confused about some core functionalities in Magento. In Item.php file in app/code/core/Mage/CatalogInventory/Model/Stock/ there is the function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) ... Right above there are some explanations […]
  • Add to cart Issue : No Items in your Cart in Magento 1.9 ( Cookie ) (0)
    I have an Magento Website hosted on AWS with few hundred products. We have migrated recently from a Windows based server. Now, the issue, I am not able to add items in the cart. As soon as I try to add items in the cart I get a success message saying ** [Product Name] was added […]
  • How can we associate simple product to bundle product programmatically in Magento 2 (0)
    I have added bundle product programmatically by using below code but how can i associate a simple product to bundle product programmatically. /** @var $objectManager MagentoTestFrameworkObjectManager */ $objectManager = MagentoFrameworkAppObjectManager::getInstance(); // […]
  • Mail function fails (1)
    For some reason mail() function fails when we try to send emails, I debugged the Magento base code and I found that it generates a call to mail function like this: $result = mail('test@test.net', 'My Test Message', "I'm sending a test message", $header, '-f'); I tested this in a […]
Hide payment method if company name field got a value
How to fix Magento 2.0 Frontend Quick Add to Cart

1 Comment on this article

  • User October 26, 2016

    It was my bad.

    It create an issue due to 3rd party extension. After disabling the that extension its working fine.

    Reply

Add a comment

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax