rukpat's answer doesn't work in Magento 1.8. You need to format the URL and query string like so, once you have extended the addAction method of the CartController:
http://www.example.com/checkout/cart/add?product=76&qty=1&return_url=http://www.example.com/index.php/checkout/cart/couponPost?coupon_code=WQ9D-XXXX
You can also omit the last return_url parameter. There's no need to include the ; (semicolons).
You can also add multiple products to the URL with multiple quantities by simply doing:
http://www.example.com/checkout/cart/add?product=76&related_product=28,28,28&return_url=http://www.example.com/index.php/checkout/cart/couponPost?coupon_code=WQ9D-XXXX
So simply adding &related_product=28,28,28 with multiple references to the product ID allows you to add multiple quantities of that item. Not very elegant but it works.
Of course, it would be better to extend the addAction method of the CartController.
In order for this solution to work in Magento 1.8 and above, you need to modify the CartController like so:
NOTE: Replace 'Namespace' with your own namespace (company name or your name etc).
etc/modules/Namespace_AddProductFromUrl.xml
<?xml version="1.0"?>
<config>
<modules>
<Namespace_AddProductFromUrl>
<active>true</active>
<codePool>local</codePool>
</Namespace_AddProductFromUrl>
</modules>
</config>
app/code/local/Namespace/AddProductFromUrl/controllers/Checkout/CartController.php
<?php
require_once 'Mage/Checkout/controllers/CartController.php';
class Namespace_AddProductFromUrl_Checkout_CartController extends Mage_Checkout_CartController {
# overloaded addAction
public function addAction()
{
// generate form_key if missing or invalid
if ( ! ($formKey = $this->getRequest()->getParam('form_key', null)) or $formKey != Mage::getSingleton('core/session')->getFormKey())
{
$this->getRequest()->setParams(array('form_key' => Mage::getSingleton('core/session')->getFormKey()));
}
// do parent actions
parent::addAction();
}
}
app/code/local/Namespace/AddProductFromUrl/etc/config.xml
<config>
<frontend>
<routers>
<checkout>
<args>
<modules>
<Namespace_AddProductFromUrl before="Mage_Checkout">Namespace_AddProductFromUrl_Checkout</Namespace_AddProductFromUrl>
</modules>
</args>
</checkout>
</routers>
</frontend>
</config>