Author: super_admin_v3x
WPPizza Mailinglists
Coupons and Discounts
Filters available for WPPizza Coupons and Discounts
wppizza_cad_filter_discounts
Allow to filter (unset) applied discounts – identified by their ID – depending on custom conditions related to cart contents. As with all customisations, use at your own risk. You should test this thoroughly
/* @since 2.1.4 @param array @param array @return array EXAMPLE: Remove a specific applied simple discount - identified by its id - if cart contains an item from a certain category */ add_filter('wppizza_cad_filter_discounts', 'myprefix_filter_wppizza_cad_filter_discounts', 10, 2); function myprefix_filter_wppizza_cad_filter_discounts($array_of_discount_ids, $cart){ /* skip if there isn't anything in the cart to start off with */ if(empty($cart)){ return $array_of_discount_ids; } /* discount id to remove if cat id in cart */ $discountIdToRemove = 1; //skip if it does not exist in array anyway if(empty($array_of_discount_ids[$discountId])){ return $array_of_discount_ids; } /* check for category id used by an item in cart */ $findCatId = 6; /* array keys of items consist of blogid.categoryid.postid.sizes and more Note: there are also many other ways of doing this by iterating through all items or similar.... whatever works for you */ //get all keys cart $cart_item_keys = array_keys($cart); //iterate through keys to get category id's foreach($cart_item_keys as $cart_item_key){ //explode keys by '.' $x = explode('.',$cart_item_key); /* Example: if one of the items in the cart belongs to cat id = 6 , remove discount with id 1 $x[0] => blog id $x[1] => cat id $x[2] => post id $x[3] => sizes id $x[4] => size id ..... */ if($x[1] == $findCatId){ unset($array_of_discount_ids[$discountIdToRemove]); break;//no need to continue iteration now } } return $array_of_discount_ids; }
Preorder
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
Email Subject Line
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 using 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(s) to narrow down where your issue(s) might be
As I could not say this any better, forgive me for simply providing the links above. I would, however, especially recommend the “Troubleshooting Plugins” section on the perishablepress.com link ; about 2 thirds down on that page.
Of course, if you have followed the recommendations on those pages without being able to solve your problem and still have issues with WPPizza, please get in touch via the usual channels (forum, contact form, emails)