Developers

  1. Modify Css / Styles / Layout
    1. Frontend Css
    2. Admin Css
  2. Templates
    1. Pages
      1. page.order.php
      2. page.confirm-order.php
      3. page.processing.php
      4. page.thankyou.php
      5. page.cancelled.php
      6. page.purchase-history.php
    2. Order
      1. itemised.php
      2. summary.php
      3. transaction_details.php
    3. Global
      1. orderinfo.php (Widget)
      2. openingtimes.php (Widget)
      3. additives.php (Widget)
      4. navigation.list.php (Widget)
      5. navigation.dropdown.php (Widget)
      6. search.php (Widget)
      7. totals.php (Widget)
      8. pickup_choice.php (Mixed)
      9. login.php (Module)
      10. profile.register.php (Module)
      11. profile.update.php (Module)
      12. pages.pickup_note.php (Module)
      13. formfields.inputs.php (Module)
      14. formfields.values.php (Module)
    4. Cart
      1. cart.container.php
      2. cart.shopclosed.php
      3. cart.empty.php
      4. cart.pickup_note.php
      5. cart.checkout_button.php
      6. cart.empty_cart_button.php
      7. cart.minimum_order.php
      8. minicart.php
    5. Loop (Menu Items)
      1. header.php
      2. no_results.php
      3. posts.title.php
      4. posts.thumbnail.php
      5. posts.prices.php
      6. posts.content.php
      7. posts.permalink.php
      8. additives.php
      9. pagination.php
      10. theme-wrapper.php
    6. Search Results
      1. search.php
    7. Single Menu Item
      1. single.php
    8. functions.php
  3. Filters, Actions, Functions
    1. Global WPPizza functions
    2. WPPizza options (Filter)
    3. Currency (Filter)
    4. After every order (Action)
    5. Getting orders (Function)
  4. Constants
    1. Admin Name
    2. Admin Menu Icon
    3. SORT_ITEMS_AS_ADDED
    4. SINGLE_PERMALINK_VAR
    5. WIDGET_CSS_CLASS
    6. PLAINTEXT_LINE_LENGTH
    7. ADMIN_{CONSTANTS}
    8. DEV_{CONSTANTS}
    9. INSTALL_{CONSTANTS}
    10. TRANSACTION_{CONSTANTS}
  5. Codesnippets
    1. Create your own sales report
    2. Order history - todays orders
    3. Email/Print templates
    4. Add attachment to email
    5. On order status update
    6. Unconfirmed orders
    7. Customise order id
    8. Changing post type arguments
    9. Gateway filter frontend
    10. Users previous orders
    11. Dynamic menu item prices
    12. Prices output loop
    13. Pickup opening times
    14. Additional validation function
  6. Extensions
    1. Google Cloudprint
    2. Cross-Sells
    3. Goodcom Printer
    4. Add Ingredients

5.3.Email/Print templates

Email / Print template functions – Requires WPPizza v3.9.3+

wppizza_template_parameters / wppizza_template_markup (functions)

query for a certain set of orders and return print or email template markup – according to template selected – for each order

example :

/*********************************************************
*	[get email or print template parameters]
*	@since 3.9.3
*	@param array of args
*		@args str ('print' or 'emails')
*		@args mixed
*		(if $type 'emails' you can use a specific id(int) or  use 'customer' or 'shop' as id value to get the template parameters for the respective recipient)
*		(if $type 'print' you can use a specific id(int) or  '' (empty string) to get the default print template set to be used for printing)
*	@return array
*********************************************************/
	$args = array(
		'type' => 'print',
		'id' => 0,
	);
	$param = wppizza_template_parameters($args);


/*********************************************************
*	[get orders - see https://docs.wp-pizza.com/developers/?section=function-wppizza_get_orders for query parameters ]
*	example here queries for one order by id
*********************************************************/
	/*
		get order formatted for a particular order id
	*/
	$args = array(
		'query'=>array(
			'order_id' => $oId ,//order id you are quering for
		),
		'format' =>array(
			'blog_options' => array('localization', 'blog_info', 'date_format', 'blog_options'),
			'sections' => true,// this should be set to true for passing on [sections] array to wppizza_template_markup args below
		)
	);
	$order = wppizza_get_orders($args);
	/*
		formatted order
		reset to get the only one there is which includes localization etc
		NOTE: if your wppizza_get_orders query might return more than one result 
		,you should NOT reset the array here but use a loop instead for the template markup
		below passing on the relevant $order and $template parameters 
	*/
	$order = reset($order['orders']);


/*********************************************************
*	[get template markup - markup for a specific order based on a selected email or print template]
*	SHOULD BE USED INSIDE A LOOP IF MORE THAN ONE RESULT
*	@since 3.9.3
*	@param array of args
*		@args array (order already formatted)
*		@args array template parameters as returned by wppizza_template_parameters
*		@args bool false to get only the content type selected in the template, true to get plaintext AND html
*	@return mixed (array|str)
*********************************************************/
	$args = array(
		'order' => $order, 
		'param' => $param, 
		'content_type' => false
	);
	$markup = wppizza_template_markup($args);

wppizza_skeleton_template_emails (function)

get *email* skeleton template (“WPPizza->Templates->eMails”) by id or shop/customer inserting content between header and footer, replacing what is normally used to display order details

example:

$id = 0; /* this could be a template id or you can use 'shop' or 'customer' to get the email template in use for email to shop or customer */
$content= 'my email content';/* string */
$markup = wppizza_skeleton_template_emails($id, $content);

/*
   $markup will now be the whole template as a string using 
   $content as the message between header and footer
*/

wppizza_skeleton_template_print (function)

get *print* skeleton template (“WPPizza->Templates->Print”) by id, inserting content between header and footer, replacing what is normally used to display order details

example:

$id = 0; /* print template id - int */
$content= 'my print content';/* string */
$markup = wppizza_skeleton_template_print($id, $content);

/*
   $markup will now be the whole template as a string using 
   $content as the message between header and footer
*/
Suggest Edit

documentor id 5