Author: super_admin_v3x

Preorder

Customisations WPPizza Preorder Highlighting preorders for days after today in *emails* sent (for print templates, simply use css declarations) Your email template(s) selected MUST be set to “Html” for this to make any difference set conditionals as required @param: array @param: array @param: str @param: 

Plugin Options

Display a set WPPizza plugin option Display the (raw, unformatted) value of an option set in the WPPizza plugin (strings only). Use your browsers element inspector on an input element to determine the page/parameter combination. If you need access to other parameters not returned by 

Layout (Menu Items, General)

If you wish to alter the display of the WPPizza menu items – alongside many other layout elements – from the installed default, use any of the options below

  • Goto “WPPizza ->Layout”

    Goto “Style” on that page and choose from one of the style options available (currently “default”, “responsive” and “grid” ) as your main / base menu item layout.

    Adjust all other layout options on that page as required
  • Change the order of how elements are displayed by adjusting the “elements” attribute of the shortcodes on your pages according to the shortcode documentation

    For full shortcode attributes list available refer to that same documentation please.
  • Adjust the css according to the css documentation here

In 99% of cases a combination of the above the should let you adjust the layout as you require to fully integrate with your chosen theme I would think (make sure you test any changes you make on multiple devices ).
However, if you still feel the need to modify the templates themselves please refer to the templates documentation

Checkout Formfields

Modify the customer form fields available on the checkout page A few examples as to how you can show/hide/add/modify input formfields available on the checkout page Simple show/hide formfields using css selectors If you wish to simply show hide some formfields when an order is 

Email Subject Line

Change the default subject line used in emails wppizza_filter_email_subject /*** email subject lines are made up of 3 parts filter each part as required based on your preferences ****/ add_filter(‘wppizza_filter_email_subject’, ‘myprefix_filter_email_subject’, 10, 2); function myprefix_filter_email_subject($subject, $order_formatted){ /* defaults //dynamic depending on settings in wppizza order 

Enable Debug

in your wp-config.php you will find a line that reads (most likely) like this:
define('WP_DEBUG', false);

REPLACE this with (or if it does not exist simply add the below)


define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);/*this should NEVER be true for production sites*/

Note: this MUST be before /* That's all, stop editing! Happy blogging. */

Which will generate a file “wp-content/debug.log” if and when any errors are encountered.
Check this file for errors if you need to find out where things might go wrong

View the Help Screen

Note that in many cases a lot more information/help is available in the help screens of the plugin

View your browsers console (Typically by clicking Ctrl+Shift+I)

If you see some “500 Internal server errors” in there, check your server error log. In many cases these are caused by uploading a plugin with the wrong permissions – especially if you add plugins by ftp instead of using the standard wordpress plugin installer. You should also aim to fix any other javascript errors you may have, although some might be more problematic than others

General Troubleshooting

If you have issues with WPPizza – or WordPress in general for that matter – I would highly recommend the following resource to narrow down where your issues might be

As I could not say this any better, forgive me for simply providing the link above. I would however especially recommend the “Troubleshooting Plugins” section about 2 thirds down on that page.

Of course, if you have followed the recommendations on that page without being able to solve your problem and still have issues with WPPizza, please get in touch via the common channels (forum, contact form, emails)

Headers already sent …

if you get something like: Warning: session_start(): Cannot start session when headers already sent in [site-path]/wp-content/plugins/wppizza[xyz]/[some-file] on line [some-line] or Warning: cannot modify header information – headers already sent by [site-path]/[some-dicetory]/[some-file] on line [some-line] The problem is that either: – php notices/warnings/errors etc are output 

Extensions / Gateways

Please refer to the relevant sub-section in the navigation on the left. Note: Documentation for extensions and gateways will always be work in progress and will expand over time.

Add Ingredients

Filters available in WPPizza Add Ingredients

wppizza_ingredients_filter_email_styles

The below filter will *only* apply to emails (as emails need style declarations to be added inline). For Print templates, use the css input in WPPizza->Templates->Print in conjunction with your browsers element inspector

@param: array
@return: array

add_filter('wppizza_ingredients_filter_email_styles', 'myprefix_ingredients_filter_email_styles');
function myprefix_ingredients_filter_email_styles($styles){
	/*  
	default styles passed on to $styles parameter are currently as follows (though might get tweaked in the future) 
		
	$styles = array();
	$styles['ingrinfo'] 	= 'white-space: initial; margin: 3px; line-height: 130%;' ;
	$styles['ingr_item'] 	= 'font-style: italic;' ;
	$styles['ingrinfo'] 	= 'white-space: initial; margin: 3px 3px 3px 20px; line-height: 130%; font-size:85%;' ;
	$styles['ingrgrp'] 	= 'white-space: initial; margin: 3px;line-height: 130%;' ;
	$styles['ingrgrp_0'] 	= 'white-space: initial; margin: 3px;line-height: 130%; display:inline' ;
	$styles['ingrgrp_1'] 	= 'white-space: initial; margin: 3px;line-height: 130%; margin-left: 15px' ;
	$styles['ingrgrp_lbl'] 	= 'font-weight: bold; padding-right: 3px;' ;
	$styles['comments'] 	= 'padding: 3px 0; font-size: 75%;' ;
	*/

	/* 

	if you want to - for example - increase the font for each ingredients in your emails to 
	120% instead of the default of 85%, you can do this 

	*/
	$styles['ingrinfo'] .='font-size:120%;';

	/* 
	or you could override the whole declaration , removing any margins etc and setting font to 14px
	*/
	$styles['ingrinfo'] ='font-size:14px;';

return $styles;
}

WPPizza Autoprint

Customisations WPPizza Autoprint Adjusting print output of selected autoprint template Your print template selected MUST be set to “Html” to be able to access the css setting Go to “Wppizza -> Templates -> Print” Locate the template you have selected to use as your autoprint