/** Generates a URL so that a customer can cancel their (unpaid - pending) order */
	function get_cancel_order_url() {
		return jigoshop::nonce_url( 'cancel_order', add_query_arg('cancel_order', 'true', add_query_arg('order', $this->order_key, add_query_arg('order_id', $this->id, home_url()))));
	}
	/** gets the url to remove an item from the cart */
	function get_remove_url( $item_id ) {
		$cart_page_id = get_option('jigoshop_cart_page_id');
		if ($cart_page_id) return jigoshop::nonce_url( 'cart', add_query_arg('remove_item', $item_id, get_permalink($cart_page_id)));
	}
 /**
  * Get the add to url
  *
  * @return  mixed
  */
 public function add_to_cart_url()
 {
     if ($this->has_child()) {
         $url = add_query_arg('add-to-cart', 'group');
         $url = add_query_arg('product', $this->ID, $url);
         if ($this->is_type('variable')) {
             $url = add_query_arg('add-to-cart', 'variation');
         }
     } else {
         $url = add_query_arg('add-to-cart', $this->ID);
     }
     return jigoshop::nonce_url('add_to_cart', $url);
 }
 /** gets the url to remove an item from the cart
  *
  * @param $cart_item_key
  * @return mixed|string|void
  */
 public static function get_remove_url($cart_item_key)
 {
     $cart_page_id = jigoshop_get_page_id('cart');
     if ($cart_page_id) {
         return apply_filters('jigoshop_get_remove_url', jigoshop::nonce_url('cart', add_query_arg('remove_item', $cart_item_key, get_permalink($cart_page_id))));
     }
     return '';
 }
 /** Generates a URL so that a customer can cancel their (unpaid - pending) order */
 public function get_cancel_order_url()
 {
     return apply_filters('jigoshop_get_cancel_order', jigoshop::nonce_url('cancel_order', add_query_arg('cancel_order', 'true', add_query_arg('order', $this->order_key, add_query_arg('order_id', $this->id, home_url())))));
 }
	/** Get the add to url */
	function add_to_cart_url() {
		if ( $this->has_child() ) :
			$url = add_query_arg('add-to-cart', 'group');
			$url = add_query_arg('product', $this->id, $url);
		else :
			$url = add_query_arg('add-to-cart', $this->id);
		endif;
		
		$url = jigoshop::nonce_url( 'add_to_cart', $url );
		return $url;
	}