Having a weird bug that doesn't seem to be troubling anyone else on the Magento forums or the rest of the web.
When I go to the shopping cart and click "Edit" to change the configuration of a bundle product it takes me to the page
".../checkout/cart/configure/id/<id number>/"
and I can change the options for the bundle. But when I click the "Update Cart" button at the bottom of the bundle page it adds a brand new bundle to the cart with the configuration I just selected. Obviously I'd rather have it edit the current bundle and I believe it should be doing that - the id number in the URL is obviously meant for this purpose.
Looking at:
design/frontend/base/default/template/checkout/cart/item/configure/updatecart.phtml
I see it calls for the Update Cart button:
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="
productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
I'm not sure if the fact that it called an AddToCart form rather than maybe an Update form might have something to do with it? The other interesting thing is that if I look at:
app/code/core/Mage/Checkout/controllers/CartController.php
There's a function called "configureAction" - this runs when you go to the /configure url and gets the cart item id. There's another function called "updateItemOptionsAction" - this looks like the one that I want? It doesn't seem to get called though.
Has anyone run into a similar issue? I feel like I'm in the right area but I can't seem to figure out exactly why this wouldn't work out-the-box?
Thanks!
EDIT:
Solution for those looking in the future....:
The file located in {MY SKIN}/template/catalog/product/view.phtml had this code for the add to cart button:
<form action="<?php echo $this->getAddToCartUrl($_product) ?>"
so even with the "Update Cart" button showing correctly, the behaviour of the button would always add to cart rather than update cart. I changed it to this:
<form action="<?php echo $this->getSubmitUrl($_product) ?>"
And it works! Took a while to diagnose because the default/modern template supplied by Magento actually is incorrect and will always show the add to cart button rather than the update cart button - so when I reverted to a "default" template test behaviour this threw a spanner in the works.