[wppizza type='cart']
or the widget available from Appearance -> Widgets -> Wppizza -> Widget Type='Cart'
For shortcode attributes please refer to the shortcode section
wppizza-cart
(used by all instances of widget)wppizza-cart-nocache
(used by instances of widget if cart loaded via ajax)
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
many display options are also available by simply using the relevant shortcode attributes instead of filters
wppizza_filter_cart_outer_markup
@param: $markup array (array of markup elements)
@param: $atts array (attributes)
@param: $id int (unique id for each instance)
@return: array
<div> .wppizza-opening-hours </div> # opening times - if enabled <div> .wppizza-cart # wrapper div - filled with below cart info - dynamically <div> .wppizza-cart-info </div> # cart container div - has it's own filter and uses other template files! </div> # end wrapper div <div> .wppizza-orders-pickup-choice </div> # pickup/delivery choice checkbox/radio - if enabled <div> .wppizza-orders-info </div> # order info - if enabled
add_filter('wppizza_filter_cart_outer_markup', 'prefix_filter_cart_outer_markup', 10, 3);
function prefix_filter_totals_widget_markup($markup, $atts, $id){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use print_r($atts) to view attributes
use print_r($id) to view id of cart instance
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER cart container div element using standard php concatenation */
$markup['_div'] .= '<p>more text after div</p>';
/* example: adding a paragraph BEFORE cart container div element using standard php concatenation */
$markup['div_'] = '<p>more text before div</p>' . $markup['div_'];
/* example: adding a paragraph AFTER cart container div element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after div</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_div' );
/* example: adding a paragraph BEFORE cart container div element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text buttons div</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'div_' , true);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_div'] = $markup['_div'] . $buffer; # add buffered output after end of wrapper
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/classes/markup/maincart.php
– Not a template/editable file
[wppizza type='cart']
or the widget available from Appearance -> Widgets -> Wppizza -> Widget Type='Cart'
This is the inner cart element excluding the “opening hours”, “pickup choices” and/or “orders info”(discounts, charges) elements that will be displayed before and after
if enabled
For shortcode attributes please refer to the shortcode section.
.wppizza-cart-info
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
Note: the whole cart itself is made up of modules with opening hours added before (if enabled in widget/shortcode), pickup choice selection after (if pickup enabled) and orderinfo (discounts, charges) at end (if enabled). See here.
The cart.container.php this document refers to are the element containing the specific order details , summary , buttons etc wrapped in a container excluding the surrounding “pickup choice” etc modules
<div> .wppizza-cart-info # wrapper div /* if shop closed */ <p> .wppizza-cart </p> (text if shop closed) /* if shop open */ <p> .wppizza-cart-empty </p> (text if cart is empty) <table> .wppizza-order-itemised </table> (itemised order) <table> .wppizza-order-summary </table> (summary order) <p> .wppizza-pickup-note </p> (text if pickup chosen) <span> .wppizza-min-order </span> (text if minimum order not reached) <div> .wppizza-cart-buttons (wrapper div for buttons) <input> .wppizza-checkout-button (checkout button) <input> .wppizza-empty-cart-button (empty cart button) </div> (end wrapper div buttons) </div> # end wrapper div
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
many display options are also available by simply using the relevant shortcode attributes instead of filters
wppizza_filter_maincart_container_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_container_markup', 'prefix_filter_maincart_container_markup');
function prefix_filter_totals_widget_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER cart container div element using standard php concatenation */
$markup['_div'] .= '<p>more text after div</p>';
/* example: adding a paragraph BEFORE cart container div element using standard php concatenation */
$markup['div_'] = '<p>more text before div</p>' . $markup['div_'];
/* example: adding a paragraph AFTER cart container div element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after div</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_div' );
/* example: adding a paragraph BEFORE cart container div element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text buttons div</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'div_' , true);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_div'] = $markup['_div'] . $buffer; # add buffered output after end of wrapper
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.container.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-closed
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_shopclosed_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_shopclosed_markup', 'prefix_filter_cart_shopclosed_markup');
function prefix_filter_cart_shopclosed_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER paragraph element using standard php concatenation */
$markup['_p'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE paragraph element using standard php concatenation */
$markup['p_'] = '<p>more text before</p>' . $markup['p_'];
/* example: adding a paragraph AFTER paragraph element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_p' );
/* example: adding a paragraph BEFORE paragraph element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'p_' , true);
/* example: changing html from using p element to span */
$markup['p_'] = str_replace('<p', '<span', $markup['p_']);
$markup['_p'] = str_replace('</p', '</span', $markup['_p']);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_p'] = $markup['_p'] . $buffer; # add buffered output after end of paragraph
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.shopclosed.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-cart-empty
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_cartempty_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_cartempty_markup', 'prefix_filter_cartempty_markup');
function prefix_filter_cartempty_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER paragraph element using standard php concatenation */
$markup['_p'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE paragraph element using standard php concatenation */
$markup['p_'] = '<p>more text before</p>' . $markup['p_'];
/* example: adding a paragraph AFTER paragraph element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_p' );
/* example: adding a paragraph BEFORE paragraph element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'p_' , true);
/* example: changing html from using p element to span */
$markup['p_'] = str_replace('<p', '<span', $markup['p_']);
$markup['_p'] = str_replace('</p', '</span', $markup['_p']);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_p'] = $markup['_p'] . $buffer; # add buffered output after end of paragraph
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.empty.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-pickup-note
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_pickup_note_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_pickup_note_markup', 'prefix_filter_cart_pickup_note_markup');
function prefix_filter_cart_pickup_note_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER paragraph element using standard php concatenation */
$markup['_p'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE paragraph element using standard php concatenation */
$markup['p_'] = '<p>more text before</p>' . $markup['p_'];
/* example: adding a paragraph AFTER paragraph element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_p' );
/* example: adding a paragraph BEFORE paragraph element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'p_' , true);
/* example: changing html from using p element to span */
$markup['p_'] = str_replace('<p', '<span', $markup['p_']);
$markup['_p'] = str_replace('</p', '</span', $markup['_p']);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_p'] = $markup['_p'] . $buffer; # add buffered output after end of paragraph
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.pickup_note.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-checkout-button
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_checkout_button_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_checkout_button_markup', 'prefix_filter_cart_checkout_button_markup');
function prefix_filter_cart_checkout_button_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER input element using standard php concatenation */
$markup['checkout_button'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE input element using standard php concatenation */
$markup['checkout_button'] = '<p>more text before</p>' . $markup['empty_cart_button'];
/* example: adding a paragraph AFTER input element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, 'checkout_button' );
/* example: adding a paragraph BEFORE input element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'checkout_button' , true);
/* example: using actions of another plugin that by default outputs html to add it after the input element*/
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['checkout_button'] = $markup['checkout_button'] . $buffer; # add buffered output after end of span
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.checkout_button.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-empty-cart-button
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_empty_cart_button_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_empty_cart_button_markup', 'prefix_filter_cart_empty_cart_button_markup');
function prefix_filter_cart_empty_cart_button_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER input element using standard php concatenation */
$markup['empty_cart_button'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE input element using standard php concatenation */
$markup['empty_cart_button'] = '<p>more text before</p>' . $markup['empty_cart_button'];
/* example: adding a paragraph AFTER input element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, 'empty_cart_button' );
/* example: adding a paragraph BEFORE input element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'empty_cart_button' , true);
/* example: using actions of another plugin that by default outputs html to add it after the input element*/
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['empty_cart_button'] = $markup['empty_cart_button'] . $buffer; # add buffered output after end of span
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.empty_cart_button.php
If you just want to change the text itself, instead of using filters, set it in Wppizza -> Localization
.
.wppizza-min-order
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
wppizza_filter_maincart_minimum_order_markup
@param: $markup array (array of markup elements)
@return: array
add_filter('wppizza_filter_maincart_minimum_order_markup', 'prefix_filter_cart_minimum_order_markup');
function prefix_filter_cart_minimum_order_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER paragraph element using standard php concatenation */
$markup['_span'] .= '<p>more text after</p>';
/* example: adding a paragraph BEFORE paragraph element using standard php concatenation */
$markup['span_'] = '<p>more text before</p>' . $markup['span_'];
/* example: adding a paragraph AFTER paragraph element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_span' );
/* example: adding a paragraph BEFORE paragraph element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text before</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'span_' , true);
/* example: changing html from using span element to p*/
$markup['span_'] = str_replace('<span', '<p', $markup['span_']);
$markup['_span'] = str_replace('</span', '</p', $markup['_span']);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper span*/
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_span'] = $markup['_span'] . $buffer; # add buffered output after end of span
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/cart.minimum_order.php
[wppizza type='cart' minicart='1']
or enabled in the widget available from Appearance -> Widgets -> Wppizza -> Widget Type='Cart'
For shortcode attributes please refer to the shortcode section.
For layout options refer to WPPizza -> Layout -> Minicart
.
Please note: the minicart contains various empty html elements that are filled dynamically depending on current order status. Only ever one instance of the minicart will be displayed.
#wppizza-minicart
if you simply want to edit some styles/layout (text-sizes, color, margins, paddings etc etc ) it is strongly recommended to use css instead of filters/actions. Please refer to Modify Styles/Layout
Note: the minicart is made up of empty html elements that are filled dynamically via ajax depending on current order status.
<div> #wppizza-minicart # wrapper div <div> .wppizza-totals-opacity </div> (an absolute positioned div without child elements to handle opacity) <span> .wppizza-totals-itemcount </span> (item in cart count - left) <span> .wppizza-totals-order </span> (value of order) <span> .wppizza-totals-itemcount </span> (item in cart count - right) <span> .wppizza-totals-viewcart-button </span> (view cart button) <span> .wppizza-totals-checkout-button </span> (go to checkout button) <span> .wppizza-totals-cart </span> (will be ajax filled with order details. empty if view cart disabled) </div> # end wrapper div
apply filters by adding them to your child-theme’s functions.php (notes regarding functions.php).
many display options are also available by simply using the relevant shortcode attributes instead of filters
wppizza_filter_minicart_widget_markup
@param: $markup array (array of markup elements)
@param: $atts array (array of attributes)
@return: array
add_filter('wppizza_filter_minicart_widget_markup', 'prefix_filter_minicart_container_markup');
function prefix_filter_minicart_container_markup($markup){
/*
notes:
use print_r($markup) to view array keys with their respective markup
use print_r($atts) to view attributes set
use global $wppizza_options; to access all options/settings/localization strings etc set in the plugin
*/
/* example: adding a paragraph AFTER cart container div element using standard php concatenation */
$markup['_div'] .= '<p>more text after div</p>';
/* example: adding a paragraph BEFORE cart container div element using standard php concatenation */
$markup['div_'] = '<p>more text before div</p>' . $markup['div_'];
/* example: adding a paragraph AFTER cart container div element using wppizza array_splice helper function */
$splice_after['myprefix_paragraph'] = '<p>more text after div</p>';
$markup = wppizza_array_splice($markup, $splice_after, '_div' );
/* example: adding a paragraph BEFORE cart container div element using wppizza array_splice helper function */
$splice_before['myprefix_paragraph'] = '<p>more text buttons div</p>';
$markup = wppizza_array_splice($markup, $splice_before, 'div_' , true);
/* example: using actions of another plugin that by default outputs html to add it after the container wrapper div */
ob_start(); # start buffering
do_action('other_plugin_output'); # run action of other plugin that outputs things
$buffer= ob_get_contents(); # capture buffer in variable
ob_end_clean(); # clean buffer
$markup['_div'] = $markup['_div'] . $buffer; # add buffered output after end of wrapper
return $markup;
}
ensure you have also read the Modify/Edit Templates
basepath: [plugin-path]/wppizza/templates/markup
filepath: [plugin-path]/wppizza/templates/markup/cart/minicart.php