Magento添加到购物车按钮

So I am working freelance on a project and need to know how to create a working 'add to cart' button using Magento that takes the user to the cart with the product populated. The company uses specific SKU's to identify the individual products. So, how do create such a button? The button needs to pass the SKU to the cart page (which uses a simple URL, the same one for all products). Thanks.

That is provided with the default installation of magento, ain't it?

But if you are referring to custom Add To cart button for a customized page/product then create a button/link and pass product ID and quantity and options value to the controller and handle as shown below:

For simple product

$params = array(
    'product' => 1, //prooduct ID
    'qty' => 2, //Quantity
);
$cart = Mage::getSingleton('checkout/cart'); 
$product = Mage::getModel('catalog/product')->load(1); //loading product obj
$cart->addProduct($product, $params); //adding to cart
$cart->save(); 
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
//now redirect user to either cart or checkout

For Configurable product

the param set up will be a little different

$params = array(
    'product' => 1,
    'super_attribute' => array(
         51 =>25, //this is for the options 51 - option code //25 is the option selected
    ),
    'qty' => 2,
);