Notice removed Authoritative reference needed by jharrison.au
    Bounty Ended with benmarks's answer chosen by jharrison.au
2 added 95 characters in body
source | link

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:

  1. Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
    • Here it would add the query param "options" with the value "cart"
  2. Mage_Catalog_Block_Product_Abstract::getProductUrl()
    • This method essentially gets a value from the URL model
  3. 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?

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:

  1. Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
    • Here it would add the query param "options" with the value "cart"
  2. Mage_Catalog_Block_Product_Abstract::getProductUrl()
    • This method essentially gets a value from the URL model
  3. 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?

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:

  1. Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
    • Here it would add the query param "options" with the value "cart"
  2. Mage_Catalog_Block_Product_Abstract::getProductUrl()
    • This method essentially gets a value from the URL model
  3. 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?

    Notice added Authoritative reference needed by jharrison.au
    Bounty Started worth 50 reputation by jharrison.au
    Tweeted twitter.com/#!/StackMagento/status/388459644882276352
1
source | link

Product URL with additional parameters (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:

  1. Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()
    • Here it would add the query param "options" with the value "cart"
  2. Mage_Catalog_Block_Product_Abstract::getProductUrl()
    • This method essentially gets a value from the URL model
  3. 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?