Advertisement
Guest User

add to cart direct

a guest
Dec 10th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1.     $params = array(
  2.     //REQUIRED, the id of the event that needs to be added to the cart
  3.     'event_id' => $event_id,
  4.     //REQUIRED, Anchor of the link, can use text or image
  5.     'anchor' => '<img src="http://breakwaterschoolregistration.org/wp-content/uploads/2013/12/addtocartbutton.jpg" />',
  6.     //REQUIRED, if not available at this point, use the next line before this array declaration
  7.     // $event_name = get_event_field('event_name', EVENTS_DETAIL_TABLE, ' WHERE id = ' . $event_id);
  8.     'event_name' => $event_name,
  9.     //OPTIONAL, will place this term before the link
  10.     //'separator' => __("  ", 'event_espresso')
  11.     'direct_to_cart' => 1,
  12. );
  13.  
  14. $cart_link = event_espresso_cart_link($params);
  15.  
  16. echo isset($cart_link) ? $cart_link : '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement