public function addToCartLink($productId) { static $productsInCart; if (!$productsInCart) { $productsInCart = $this->controller->getProductsInCartIds(); } if (!in_array($productId, $productsInCart)) { ?> <a href="/cart/view" class="btn btn-primary pull-left ladda-button buy-link js-add-to-cart-shortcut" data-product-id="<?php echo $productId; ?> " data-style="contract" title="Add to Cart"><span class="ladda-label"><span class="glyphicon glyphicon-shopping-cart"></span></span></a><?php } else { ?> <a href="/cart/view" class="btn btn-success btn-sm pull-left ladda-button buy-link added-to-cart" data-product-id="<?php echo $productId; ?> " data-style="contract" title="Go to Cart">Added to Cart</a> <?php } }