Question: I am looking at a section of code that uses this:

```
if ($_item->getProduct()->getTypeId() === Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE)

```

to determine whether a product is configurable. I am now wanting to alter that to detect whether the product is a bundle - but it turns out, there is no `Mage_Catalog_Model_Product_Type_Bundle`. Nor is there a `Mage_Checkout_Block_Cart_Item_Renderer_Bundle`. In fact, I can't see to find *any* dedicated bundle classes, anywhere - it's like they don't exist!

What is the reason for this? How are developers supposed to deal with bundled products, without methods like getChildrenIds or TYPE\_CODE? Are just supposed to be hardcoding things?

Answer: 
I'm not sure I understand your question, but here goes. You can try this:

```
$quote = Mage::getSingleton('checkout/session')->getQuote();
$methodCode = 'payment_code_here';
if ($quote->isVirtual()) {
    $quote->getBillingAddress()->setPaymentMethod($methodCode);
} else {
    $quote->getShippingAddress()->setPaymentMethod($methodCode);
}
$quote->save();

```
Looking at your code I noticed you are putting your variable in quotes. Not sure if you noticed that or not but it should look like.

```
Mage::getSingleton('checkout/session')->setMethod($method);

```

not

```
Mage::getSingleton('checkout/session')->setMethod('$method')

```