I gave up on buttons, instead, I tried
twig file
[code]
{##
#
# @ListChild (list="itemsList.product.grid.customer.tail", weight="99")
#}
<div class="company-logo">
<a href={{ url('cart', 'QuickBuy', { 'param_1': 'some_param_value' }) }}>
Quick Buy</a>
</div>
with Controller class
Code:
public function doActionQuickBuy()
{
echo "action!";
parent::doActionAdd();
$this->setReturnURL( $this->buildURL('checkout', '', array())
);
}
Then the customer gets redirected to the "checkout page" clicking on the link (provided that the cart is not empty before), but the product isn't added to the cart.
As a matter of fact, if I remove setReturnURL, then nothing happens when the customer clicks on the link. What am I doing wrong here?