first commit
This commit is contained in:
109
wp-content/themes/elishop/functions.php
Normal file
109
wp-content/themes/elishop/functions.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('my_commonPriceHtml')) {
|
||||
|
||||
function my_commonPriceHtml($price_amt, $regular_price, $sale_price) {
|
||||
$html_price = '<p class="price">';
|
||||
//if product is in sale but sale price is not set
|
||||
if ( ($price_amt != $regular_price) && $sale_price === '' ) {
|
||||
$html_price .= '<ins>' . wc_price($price_amt) . '</ins>';
|
||||
$html_price .= '<del>' . wc_price($regular_price) . '</del>';
|
||||
}
|
||||
//if product is in sale
|
||||
if (($price_amt == $sale_price) && ($sale_price != 0)) {
|
||||
$html_price .= '<ins>' . wc_price($sale_price) . '</ins>';
|
||||
$html_price .= '<del>' . wc_price($regular_price) . '</del>';
|
||||
}
|
||||
//in sale but free
|
||||
else if (($price_amt == $sale_price) && ($sale_price == 0)) {
|
||||
$html_price .= '<ins>Free!</ins>';
|
||||
$html_price .= '<del>' . wc_price($regular_price) . '</del>';
|
||||
}
|
||||
//not is sale
|
||||
else if (($price_amt == $regular_price) && ($regular_price != 0)) {
|
||||
$html_price .= '<ins>' . wc_price($regular_price) . '</ins>';
|
||||
}
|
||||
//for free product
|
||||
else if (($price_amt == $regular_price) && ($regular_price == 0)) {
|
||||
$html_price .= '<ins>Free!</ins>';
|
||||
}
|
||||
$html_price .= '</p>';
|
||||
return $html_price;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_filter('woocommerce_get_price_html', 'my_simple_product_price_html', 100, 2);
|
||||
|
||||
function my_simple_product_price_html($price, $product) {
|
||||
if ($product->is_type('simple')) {
|
||||
$regular_price = $product->get_regular_price();
|
||||
$sale_price = $product->get_sale_price();
|
||||
$price_amt = $product->get_price();
|
||||
return my_commonPriceHtml($price_amt, $regular_price, $sale_price);
|
||||
} else {
|
||||
return $price;
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('woocommerce_variation_sale_price_html', 'my_variable_product_price_html', 10, 2);
|
||||
add_filter('woocommerce_variation_price_html', 'my_variable_product_price_html', 10, 2);
|
||||
|
||||
function my_variable_product_price_html($price, $variation) {
|
||||
$variation_id = $variation->variation_id;
|
||||
//creating the product object
|
||||
$variable_product = new WC_Product($variation_id);
|
||||
|
||||
$regular_price = $variable_product->get_regular_price();
|
||||
$sale_price = $variable_product->get_sale_price();
|
||||
$price_amt = $variable_product->get_price();
|
||||
|
||||
return my_commonPriceHtml($price_amt, $regular_price, $sale_price);
|
||||
}
|
||||
|
||||
add_filter('woocommerce_variable_sale_price_html', 'my_variable_product_minmax_price_html', 10, 2);
|
||||
add_filter('woocommerce_variable_price_html', 'my_variable_product_minmax_price_html', 10, 2);
|
||||
|
||||
function my_variable_product_minmax_price_html($price, $product) {
|
||||
$variation_min_price = $product->get_variation_price('min', true);
|
||||
$variation_max_price = $product->get_variation_price('max', true);
|
||||
$variation_min_regular_price = $product->get_variation_regular_price('min', true);
|
||||
$variation_max_regular_price = $product->get_variation_regular_price('max', true);
|
||||
|
||||
if (($variation_min_price == $variation_min_regular_price) && ($variation_max_price == $variation_max_regular_price)) {
|
||||
$html_min_max_price = $price;
|
||||
} else {
|
||||
$html_price = '<p class="price">';
|
||||
$html_price .= '<ins>' . wc_price($variation_min_price) . '-' . wc_price($variation_max_price) . '</ins>';
|
||||
$html_price .= '<del>' . wc_price($variation_min_regular_price) . '-' . wc_price($variation_max_regular_price) . '</del>';
|
||||
$html_min_max_price = $html_price;
|
||||
}
|
||||
|
||||
return $html_min_max_price;
|
||||
}
|
||||
|
||||
//najnizsza cena w wariancie
|
||||
add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
|
||||
add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
|
||||
function wc_wc20_variation_price_format( $price, $product ) {
|
||||
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
|
||||
$price = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
|
||||
// Sale Price
|
||||
$prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );
|
||||
sort( $prices );
|
||||
$saleprice = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
|
||||
|
||||
if ( $price !== $saleprice ) {
|
||||
$price = '<del>' . $saleprice . '</del> <ins>' . $price . '</ins>';
|
||||
}
|
||||
return $price;
|
||||
}
|
||||
|
||||
//NUMBER OF PRODUCTS TO DISPLAY ON SHOP PAGE
|
||||
add_action('pre_get_posts', 'wg_view_all_products', 999);
|
||||
|
||||
function wg_view_all_products($query){
|
||||
if( isset($_GET['view']) && $_GET['view'] === 'all' ){
|
||||
$query->set( 'posts_per_page', -1 );
|
||||
}
|
||||
}
|
||||
142
wp-content/themes/elishop/pdf/packing_list.php
Normal file
142
wp-content/themes/elishop/pdf/packing_list.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title><?php echo __( 'Order Details', 'woocommerce-print-orders-address-labels' ) ?></title>
|
||||
<link href="<?php echo $this->get_plugin_url(); ?>/assets/css/reset.css" rel="stylesheet" type="text/css" media="screen,print" />
|
||||
<link href="<?php echo $this->get_plugin_url(); ?>/assets/css/print.css" rel="stylesheet" type="text/css" media="print" />
|
||||
<link href="<?php echo $this->get_plugin_url(); ?>/assets/css/front.css" rel="stylesheet" type="text/css" media="screen,print" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
foreach($args['post_ids'] as $key => $order_id):
|
||||
if( ! empty( $order_id ) ):
|
||||
|
||||
$order = new WC_Order( $order_id );
|
||||
$products = $order->get_items();
|
||||
|
||||
// Get VAT Number from Flexible Invoices for WooCommerce (or other plugins that save it with the same meta_key)
|
||||
$vat_number = wpdesk_get_order_meta( $order, '_billing_vat_number', true );
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h1><?php echo __( 'Order Details', 'woocommerce-print-orders-address-labels' ) ?></h1>
|
||||
<h2><?php echo __( 'Order:', 'woocommerce-print-orders-address-labels' ) ?> <?php echo $order->get_order_number() ?> - <?php echo wpdesk_get_order_meta( $order, 'order_date', true ); ?></h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><?php echo __( 'Shipping Address', 'woocommerce-print-orders-address-labels' ) ?></h3>
|
||||
<?php echo $order->get_formatted_shipping_address(); ?>
|
||||
</td>
|
||||
<td>
|
||||
<h3><?php echo __( 'Billing Details', 'woocommerce-print-orders-address-labels' ) ?></h3>
|
||||
<?php echo $order->get_formatted_billing_address(); ?>
|
||||
<?php if ( ! empty( $vat_number ) ): ?>
|
||||
<p><?php _e( 'VAT Number:', 'woocommerce-print-orders-address-labels' ); ?> <?php echo $vat_number; ?></p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<b><?php echo __( 'Phone:', 'woocommerce-print-orders-address-labels' ) ?></b> <?php echo wpdesk_get_order_meta( $order, '_billing_phone', true ); ?><br />
|
||||
<b><?php echo __( 'Email:', 'woocommerce-print-orders-address-labels' ) ?></b> <?php echo wpdesk_get_order_meta( $order, '_billing_email', true ); ?><br />
|
||||
<b><?php echo __( 'Shipping Method:', 'woocommerce-print-orders-address-labels' ) ?></b> <?php echo $order->get_shipping_to_display(); ?><br />
|
||||
<b>Metoda płatności:</b> <?php echo $order->get_payment_method_title(); ?><br />
|
||||
<b>Faktura:</b> <?php echo $order->get_meta( '_billing_prosze_o_fakture'); ?><br />
|
||||
|
||||
<?php echo wpdesk_get_order_meta( $order, '_customer_note', true); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php //print_r($products) ?>
|
||||
<table class="product">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Miniaturka</td>
|
||||
<td><?php echo __( 'Product', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo __( 'SKU', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo __( 'Quantity', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo __( 'Price', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; ?>
|
||||
<?php foreach($products as $pkey => $item): ?>
|
||||
<?php $product = $order->get_product_from_item($item); ?>
|
||||
<?php $attributes = $product->get_attributes(); ?>
|
||||
<tr<?php if($i % 2 == 0): ?> class="color"<?php endif; ?>>
|
||||
<td><?php
|
||||
$sprawdzam = $product->get_id();
|
||||
if (empty($sprawdzam)) { echo $product->get_image(array( 72, 72)) } ?></td>
|
||||
<td>
|
||||
<?php echo $item['name'] ?>
|
||||
|
||||
<?php
|
||||
global $wpdb;
|
||||
|
||||
if ( $metadata = wpdesk_get_order_item_meta_data( $order, $pkey, true ) ) {
|
||||
echo '<div style="font-size: 0.7em">';
|
||||
foreach ( $metadata as $meta ) {
|
||||
|
||||
// Skip hidden core fields
|
||||
if ( in_array( $meta['meta_key'], apply_filters( 'woocommerce_hidden_order_itemmeta', array(
|
||||
'_qty',
|
||||
'_tax_class',
|
||||
'_product_id',
|
||||
'_variation_id',
|
||||
'_line_subtotal',
|
||||
'_line_subtotal_tax',
|
||||
'_line_total',
|
||||
'_line_tax',
|
||||
) ) ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip serialised meta
|
||||
if ( is_serialized( $meta['meta_value'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get attribute data
|
||||
if ( taxonomy_exists( $meta['meta_key'] ) ) {
|
||||
$term = get_term_by( 'slug', $meta['meta_value'], $meta['meta_key'] );
|
||||
$attribute_name = str_replace( 'pa_', '', wc_clean( $meta['meta_key'] ) );
|
||||
$attribute = $wpdb->get_var(
|
||||
$wpdb->prepare( "
|
||||
SELECT attribute_label
|
||||
FROM {$wpdb->prefix}woocommerce_attribute_taxonomies
|
||||
WHERE attribute_name = %s;
|
||||
",
|
||||
$attribute_name
|
||||
)
|
||||
);
|
||||
|
||||
$meta['meta_key'] = ( ! is_wp_error( $attribute ) && $attribute ) ? $attribute : $attribute_name;
|
||||
$meta['meta_value'] = ( isset( $term->name ) ) ? $term->name : $meta['meta_value'];
|
||||
}
|
||||
|
||||
echo '' . urldecode( $meta['meta_key'] ) . ': <b>' . urldecode( $meta['meta_value'] ) . '</b><br />';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $product->get_sku() ?></td>
|
||||
<td><?php echo $item['qty'] ?></td>
|
||||
<td><?php echo wc_price( $order->get_item_total( $item, true ) ); ?></td>
|
||||
</tr>
|
||||
<?php $i++ ?>
|
||||
<?php endforeach; ?>
|
||||
<tr<?php if($i % 2 == 0): ?><?php endif; ?>><td>Suma zamówienia wraz z przesyłką</td><td></td><td></td><td><?php echo $order->get_item_count(); ?></td><td><?php echo $order->get_total(); ?></td></tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php if($key < (count($args['post_ids'])-1)): ?>
|
||||
<?php
|
||||
if ( $this->get_setting_value('page_print') !== '1' ): ?>
|
||||
<pagebreak />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</body>
|
||||
</html>
|
||||
75
wp-content/themes/elishop/style.css
Normal file
75
wp-content/themes/elishop/style.css
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Theme Name: elishop
|
||||
Version: 1.0
|
||||
Template: Divi
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@import url("../Divi/style.css");
|
||||
|
||||
/* Dropdown Menu */
|
||||
|
||||
.fullwidth-menu li li a {
|
||||
width: 200px !important;
|
||||
padding: 6px 20px;
|
||||
}
|
||||
#top-menu li li {
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.nav li li {
|
||||
position: relative;
|
||||
line-height: 1.3em !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.et_pb_row {
|
||||
padding: 0px 0 !important;
|
||||
}
|
||||
|
||||
.et_pb_section {
|
||||
padding: 5px 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.et_pb_divider {
|
||||
position: relative;
|
||||
margin: 0 0 5px 0;
|
||||
padding: 5px !important;
|
||||
}
|
||||
|
||||
/* cena produktu*/
|
||||
.entry-summary p.price span {
|
||||
font-size: 26px!important;
|
||||
color: #1d7d5e!important;
|
||||
}
|
||||
|
||||
|
||||
.woocommerce div.product p.price,
|
||||
.woocommerce div.product span.price {
|
||||
color: #1d7d5e!important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* menu produkty */
|
||||
.et_pb_widget ul li ul li {
|
||||
margin-left: 0px!important;
|
||||
}
|
||||
.et_pb_widget ul li {
|
||||
margin-bottom: .25em!important;
|
||||
}
|
||||
|
||||
#left-area ul, .comment-content ul, .entry-content ul, .et-l--body ul, .et-l--footer ul, .et-l--header ul, body.et-pb-preview #main-content .container ul {
|
||||
padding: 0 0 3px 0em!important;
|
||||
|
||||
}
|
||||
/* bold font on top item menu */
|
||||
.menu-menu_produkty-container > ul > li > a {
|
||||
font-weight: bolder;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
?>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
global $woocommerce;
|
||||
|
||||
use WPDesk\PrintOrderLabels\PrintLabels;
|
||||
|
||||
$params = isset( $params ) ? $params : [];
|
||||
|
||||
/**
|
||||
* @var $plugin \WPDesk\PrintOrderLabels\Plugin
|
||||
*/
|
||||
$plugin = isset( $params['plugin'] ) ? $params['plugin'] : '';
|
||||
|
||||
/**
|
||||
* @var $self PrintLabels
|
||||
*/
|
||||
$self = isset( $params['self'] ) ? $params['self'] : '';
|
||||
|
||||
$limit_col = (int) $plugin->get_setting_value( 'col_count', PrintLabels::COL_COUNT );
|
||||
$limit_row = (int) $plugin->get_setting_value( 'row_count', PrintLabels::ROW_COUNT );
|
||||
|
||||
$page_orientation = (int) $plugin->get_setting_value( 'page_orientation', 0 );
|
||||
$page_font_size = (int) $plugin->get_setting_value( 'page_font_size', PrintLabels::FONT_SIZE );
|
||||
|
||||
$page_height = $hpage_width = (int) $plugin->get_setting_value( 'page_height', PrintLabels::PAGE_HEIGHT );
|
||||
$page_width = $hpage_height = (int) $plugin->get_setting_value( 'page_width', PrintLabels::PAGE_WIDTH );
|
||||
|
||||
if( $page_orientation === 1 ) {
|
||||
$page_height = $hpage_height;
|
||||
$page_width = $hpage_width;
|
||||
}
|
||||
|
||||
$row_count = 0;
|
||||
$col_count = 0;
|
||||
$last = end( $params['post_ids'] );
|
||||
|
||||
if ( empty( $limit_row ) ) {
|
||||
$limit_row = 1;
|
||||
}
|
||||
|
||||
if ( empty( $limit_col ) ) {
|
||||
$limit_col = 1;
|
||||
}
|
||||
|
||||
if ( empty( $page_font_size ) ) {
|
||||
$page_font_size = 10;
|
||||
}
|
||||
|
||||
$label_text = $plugin->get_setting_value( 'label_text', '<p style="text-align: center;"><strong>%shipping_formatted_address%</strong></p>' );
|
||||
|
||||
$label_text = nl2br( $label_text );
|
||||
|
||||
$col_width = $page_width / $limit_col;
|
||||
$col_height = $page_height / $limit_row;
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title><?php echo __( 'Address Labels', 'woocommerce-print-orders-address-labels' ) ?></title>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/reset.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/print.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/front.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
<style media="print">
|
||||
body {
|
||||
font-size: <?php echo $page_font_size ?>pt;
|
||||
height: 100%;
|
||||
}
|
||||
.grid {
|
||||
width: <?php echo $col_width; ?>mm;
|
||||
height: <?php echo $col_height; ?>mm;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
<?php if( (int) $plugin->get_setting_value( 'grid_border' ) === 1 ): ?>
|
||||
border: 1px solid #EEE;
|
||||
<?php endif; ?>
|
||||
|
||||
}
|
||||
.inside {
|
||||
padding: <?php echo (int) $plugin->get_setting_value( 'row_padding' ); ?>px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
foreach ( $params['post_ids'] as $key => $order_id ) {
|
||||
|
||||
if ( ! empty( $order_id ) ) {
|
||||
$pos_left = $col_count * $col_width;
|
||||
$pos_top = $row_count * $col_height;
|
||||
|
||||
if ( $limit_row === 1 && $limit_col === 1 ) {
|
||||
$pos_left = 0;
|
||||
$pos_top = 0;
|
||||
}
|
||||
|
||||
echo '<div class="grid" style="left: ' . $pos_left . 'mm; top: ' . $pos_top . 'mm; "><div class="inside">';
|
||||
$label_args = $self->get_labels_tags( $order_id );
|
||||
$label = $label_text;
|
||||
foreach ( $label_args as $name => $value ) {
|
||||
$label = str_replace( '%' . $name . '%', $value, $label );
|
||||
}
|
||||
echo $label;
|
||||
unset( $label_args );
|
||||
echo '</div></div>';
|
||||
}
|
||||
|
||||
$col_count ++;
|
||||
if ( $limit_col === $col_count ) {
|
||||
$col_count = 0;
|
||||
$row_count ++;
|
||||
}
|
||||
|
||||
if ( $row_count === $limit_row ) {
|
||||
$row_count = 0;
|
||||
if ( $last !== $order_id ) {
|
||||
echo '<pagebreak>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
global $woocommerce;
|
||||
|
||||
use PrintOrdersVendor\WPDesk\Library\WPDeskOrder\Abstracts\OrderItem;
|
||||
use PrintOrdersVendor\WPDesk\Library\WPDeskOrder\Abstracts\ProductOrderItem;
|
||||
use PrintOrdersVendor\WPDesk\Library\WPDeskOrder\Abstracts\Totals;
|
||||
|
||||
$params = isset( $params ) ? $params : [];
|
||||
|
||||
/**
|
||||
* @var $plugin \WPDesk\PrintOrderLabels\Plugin
|
||||
*/
|
||||
$plugin = isset( $params['plugin'] ) ? $params['plugin'] : '';
|
||||
|
||||
/**
|
||||
* @var $self \WPDesk\PrintOrderLabels\PrintLabels
|
||||
*/
|
||||
$self = isset( $params['self'] ) ? $params['self'] : '';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
$orders = isset( $params['order_data'] ) ? $params['order_data'] : '';
|
||||
|
||||
$hidden_order_itemmeta = apply_filters(
|
||||
'woocommerce_hidden_order_itemmeta',
|
||||
array(
|
||||
'_qty',
|
||||
'_tax_class',
|
||||
'_product_id',
|
||||
'_variation_id',
|
||||
'_line_subtotal',
|
||||
'_line_subtotal_tax',
|
||||
'_line_total',
|
||||
'_line_tax',
|
||||
'method_id',
|
||||
'cost',
|
||||
'_reduced_stock',
|
||||
'flexible_coupon_recipient_name',
|
||||
'flexible_coupon_recipient_email',
|
||||
'flexible_coupon_recipient_message',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title><?php echo esc_html__( 'Order Details', 'woocommerce-print-orders-address-labels' ) ?></title>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/reset.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/print.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
<link href="<?php echo $plugin->get_plugin_url(); ?>assets/css/front.css" rel="stylesheet" type="text/css" media="screen,print"/>
|
||||
</head>
|
||||
<body class="packing-list">
|
||||
<?php
|
||||
foreach ($orders as $key => $order ):
|
||||
/**
|
||||
* @var $totals Totals
|
||||
*/
|
||||
$totals = isset( $order['totals'] ) ? $order['totals'] : '';
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h1 class="header1"><?php echo esc_html__( 'Order Details', 'woocommerce-print-orders-address-labels' ) ?></h1>
|
||||
<h2><?php echo esc_html__( 'Order:', 'woocommerce-print-orders-address-labels' ) ?> <?php echo $order['number'] ?>
|
||||
- <?php echo $order['date']; ?></h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><?php echo esc_html__( 'Shipping Address', 'woocommerce-print-orders-address-labels' ) ?></h3>
|
||||
<?php echo $order['shipping_address']; ?>
|
||||
</td>
|
||||
<td>
|
||||
<h3><?php echo esc_html__( 'Billing Details', 'woocommerce-print-orders-address-labels' ) ?></h3>
|
||||
<?php echo $order['billing_address']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong><?php echo esc_html__( 'Phone:', 'woocommerce-print-orders-address-labels' ) ?></strong> <?php echo $order['customer_phone']; ?>
|
||||
<br/>
|
||||
<strong><?php echo esc_html__( 'Email:', 'woocommerce-print-orders-address-labels' ) ?></strong> <?php echo $order['customer_email']; ?>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="product">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Miniaturka</td>
|
||||
<td><?php echo esc_html__( 'Product', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo esc_html__( 'SKU', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo esc_html__( 'Quantity', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo esc_html__( 'Net price', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo esc_html__( 'Tax', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo esc_html__( 'Gross Price', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
?>
|
||||
<?php foreach ( $order['items'] as $pkey => $item ): ?>
|
||||
<?php
|
||||
/**
|
||||
* @var $item OrderItem
|
||||
*/
|
||||
$attributes = [];
|
||||
$sku = '';
|
||||
if ( $item instanceof ProductOrderItem ) {
|
||||
$product = wc_get_product( $item->get_product_id() );
|
||||
if ( $product ) {
|
||||
$attributes = $product->get_attributes();
|
||||
}
|
||||
$sku = $item->get_sku();
|
||||
}
|
||||
?>
|
||||
<?php ?>
|
||||
<tr<?php if ( $i % 2 == 0 ): ?> class="color"<?php endif; ?>>
|
||||
<td>
|
||||
<?php if ( 'shipping' !== $item->get_type() ): ?>
|
||||
<?php echo $product->get_image(array( 72, 72)) ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( 'shipping' === $item->get_type() ): ?>
|
||||
<?php echo esc_html__( 'Shipping:', 'woocommerce-print-orders-address-labels' ) ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $item->get_name(); ?>
|
||||
<?php
|
||||
if ( ! empty( $item->get_meta_data() ) ) {
|
||||
echo '<div style="font-size: 0.7em">';
|
||||
foreach ( $item->get_meta_data() as $meta_key => $meta ) {
|
||||
if ( in_array( $meta->display_key, $hidden_order_itemmeta ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( is_object( $meta ) ) {
|
||||
echo esc_html( $meta->display_key ) . ': <strong>' . esc_html( $meta->value ) . '</strong><br />';
|
||||
}
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $sku; ?></td>
|
||||
<td><?php echo $item->get_qty() ?></td>
|
||||
<td><?php echo wc_price( $item->get_net_price_r(), ['currency' => $item->get_currency_slug() ] ); ?></td>
|
||||
<td><?php echo wc_price( $item->get_vat_price_r(), ['currency' => $item->get_currency_slug() ] ); ?></td>
|
||||
<td><?php echo wc_price( $item->get_gross_price_r(), ['currency' => $item->get_currency_slug() ] ); ?></td>
|
||||
</tr>
|
||||
<?php $i ++ ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?php echo wc_price( $totals->get_net_price_r(), ['currency' => $totals->get_currency_slug() ] ); ?></td>
|
||||
<td><?php echo wc_price( $totals->get_vat_price_r(), ['currency' => $totals->get_currency_slug() ] ); ?></td>
|
||||
<td><?php echo wc_price( $totals->get_gross_price_r(), ['currency' => $totals->get_currency_slug() ] ); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<table class="additional-data">
|
||||
<tbody>
|
||||
<?php if ( $order['customer_note'] ): ?>
|
||||
<tr>
|
||||
<td width="200"><?php echo esc_html__( 'Customer notes:', 'woocommerce-print-orders-address-labels' ) ?></td>
|
||||
<td><?php echo $order['customer_note']; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ( ! empty( $order['meta_fields'] ) ) {
|
||||
foreach ( $order['meta_fields'] as $field_key => $field ) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="200"><strong><?php echo esc_html( $field['name'] ); ?></strong></td>
|
||||
<td><?php echo esc_html( $field['value'] ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ( $key < ( count( $orders ) - 1 ) && $plugin->get_setting_value( 'page_print' ) !== '1' ): ?>
|
||||
<pagebreak/>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</body>
|
||||
</html>
|
||||
176
wp-content/themes/elishop/woocommerce/cart/cart.php
Normal file
176
wp-content/themes/elishop/woocommerce/cart/cart.php
Normal file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart Page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_cart' ); ?>
|
||||
|
||||
<form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
|
||||
<?php do_action( 'woocommerce_before_cart_table' ); ?>
|
||||
|
||||
<table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-remove"> </th>
|
||||
<th class="product-thumbnail"> </th>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
|
||||
<th class="product-subtotal"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php do_action( 'woocommerce_before_cart_contents' ); ?>
|
||||
|
||||
<?php
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
?>
|
||||
<tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
|
||||
<td class="product-remove">
|
||||
<?php
|
||||
echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
'woocommerce_cart_item_remove_link',
|
||||
sprintf(
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
esc_html__( 'Remove this item', 'woocommerce' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
),
|
||||
$cart_item_key
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-thumbnail">
|
||||
<?php
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail; // PHPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ' );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
|
||||
|
||||
// Meta data.
|
||||
echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
|
||||
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
} else {
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
'product_name' => $_product->get_name(),
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_contents' ); ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="6" class="actions">
|
||||
|
||||
<?php if ( wc_coupons_enabled() ) { ?>
|
||||
<div class="coupon">
|
||||
<label for="coupon_code"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="Wpisz kupon" /> <button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<?php do_action( 'woocommerce_cart_coupon' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<button type="submit" class="button" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_actions' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php do_action( 'woocommerce_after_cart_table' ); ?>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
|
||||
|
||||
<div class="cart-collaterals">
|
||||
<?php
|
||||
/**
|
||||
* Cart collaterals hook.
|
||||
*
|
||||
* @hooked woocommerce_cross_sell_display
|
||||
* @hooked woocommerce_cart_totals - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart' ); ?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin cancelled order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-cancelled-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %1$s: Order number, %2$s: Customer full name. */ ?>
|
||||
<p><?php printf( esc_html__( 'Notification to let you know — order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin failed order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-failed-order.php
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %1$s: Order number. %2$s: Customer full name. */ ?>
|
||||
<p><?php printf( esc_html__( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin new order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails/HTML
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer billing full name */ ?>
|
||||
<p><?php printf( esc_html__( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer completed order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<?php /* translators: %s: Site title */ ?>
|
||||
<p><?php esc_html_e( 'We have finished processing your order.', 'woocommerce' ); ?></p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer invoice email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the e-mail header.
|
||||
*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
|
||||
<?php if ( $order->has_status( 'pending' ) ) { ?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s Site title, %2$s Order pay link */
|
||||
__( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
esc_html( get_bloginfo( 'name', 'display' ) ),
|
||||
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php } else { ?>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s Order date */
|
||||
printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_details.
|
||||
*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_meta.
|
||||
*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Hook for woocommerce_email_customer_details.
|
||||
*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the email footer.
|
||||
*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer new account email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-account.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
|
||||
<p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?>
|
||||
<?php /* translators: %s: Auto generated password */ ?>
|
||||
<p><?php printf( esc_html__( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer on-hold order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<p><?php esc_html_e( 'Thanks for your order. It’s on-hold until we confirm that payment has been received. In the meantime, here’s a reminder of what you ordered:', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer processing order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<?php /* translators: %s: Order number */ ?>
|
||||
<p><?php printf( esc_html__( 'Just to let you know — we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer refunded order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-refunded-order.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if ( $partial_refund ) {
|
||||
/* translators: %s: Site title */
|
||||
printf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
/* translators: %s: Site title */
|
||||
printf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer Reset Password email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-reset-password.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 4.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %s: Store name */ ?>
|
||||
<p><?php printf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p>
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<p><?php esc_html_e( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ); ?></p>
|
||||
<p>
|
||||
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore ?>
|
||||
<?php esc_html_e( 'Click here to reset your password', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
58
wp-content/themes/elishop/woocommerce/loop/pagination.php
Normal file
58
wp-content/themes/elishop/woocommerce/loop/pagination.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Pagination - Show numbered pagination for catalog pages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/pagination.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$total = isset( $total ) ? $total : wc_get_loop_prop( 'total_pages' );
|
||||
$current = isset( $current ) ? $current : wc_get_loop_prop( 'current_page' );
|
||||
$base = isset( $base ) ? $base : esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );
|
||||
$format = isset( $format ) ? $format : '';
|
||||
|
||||
if ( $total <= 1 ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<nav class="woocommerce-pagination">
|
||||
<?php
|
||||
echo paginate_links(
|
||||
apply_filters(
|
||||
'woocommerce_pagination_args',
|
||||
array( // WPCS: XSS ok.
|
||||
'base' => $base,
|
||||
'format' => $format,
|
||||
'add_args' => false,
|
||||
'current' => max( 1, $current ),
|
||||
'total' => $total,
|
||||
'prev_text' => '←',
|
||||
'next_text' => '→',
|
||||
'type' => 'list',
|
||||
'end_size' => 3,
|
||||
'mid_size' => 3,
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php if ( !isset( $_GET['s'] ) ) : ?>
|
||||
<?php if (is_paged()) : ?>
|
||||
<div style="float: right"><a href="../../?view=all"><? echo _e( 'Pokaż wszystkie' ); ?></a></div>
|
||||
<?php else: ?>
|
||||
<div style="float: right"><a href="?view=all"><? echo _e( 'Pokaż wszystkie' ); ?></a></div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user