In short: Retrieving a product URL with additional params doesn't work in CE 1.8 & EE 1.13.
URLs have changed with the latest version of Magento. Previously in CE 1.7 and EE 1.12 calling $this->getAddToCartUrl($_product)
from a product list would run through the following stages:
Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
- Here it would add the query param "options" with the value "cart"
Mage_Catalog_Block_Product_Abstract::getProductUrl()
- This method essentially gets a value from the URL model
Mage_Catalog_Model_Product_Url::getUrl()
- A lot of processing occurs until the URL is finally generated, complete with the query parameters originally passed in
Now, with CE 1.8 and EE 1.13, step 3 Mage_Catalog_Model_Product_Url::getUrl()
starts like this:
$url = $product->getData('url');
if (!empty($url)) {
return $url;
}
Because the products in the list have URL data already, the query parameters are not added and the final URL does not contain ?options=cart
.
My question: Is this a bug or a feature?
Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
via the core/session singleton. Can you give me an example of the code you used?