Exemplo n.º 1
0
/**
 * TimpanyHelper.
 *
 * @package    timpany
 * @subpackage helper
 * @author     Thomas Kappel <*****@*****.**>
 */
function add_to_cart(timpanyProduct $product, $name = null)
{
    if (is_null($name)) {
        $name = $product->getName();
    }
    return link_to($name, '@timpany_cart_add?product=' . $product->getSlug());
}
 /**
  * set product record for extending product types
  * @param timpanyProduct $basic_product
  */
 public function setDoctrineRecord(timpanyProduct $basic_product)
 {
     $this->_id = $basic_product->getId();
     $this->load();
 }