first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<?php
/**
* List matched Rules in Table format
*
* This template can be overridden by copying it to yourtheme/plugin-folder-name/discount-table.php
*/
if (!defined('ABSPATH')) exit; // Exit if accessed directly
if (!isset($table_data) || empty($table_data)) return false;
$base_config = (is_string($data)) ? json_decode($data, true) : (is_array($data) ? $data : array());
$show_discount_title_table = isset($base_config['show_discount_title_table'])? $base_config['show_discount_title_table']: 'show';
$show_column_range_table = isset($base_config['show_column_range_table'])? $base_config['show_column_range_table']: 'show';
$show_column_discount_table = isset($base_config['show_column_discount_table'])? $base_config['show_column_discount_table']: 'show';
?>
<table class="woo_discount_rules_table">
<thead>
<tr class="wdr_tr_head">
<?php if ($show_discount_title_table == 'show') { ?>
<td class="wdr_td_head_title"><?php esc_html_e('Name', 'woo-discount-rules'); ?></td>
<?php } ?>
<?php if ($show_column_range_table == 'show') { ?>
<td class="wdr_td_head_range"><?php esc_html_e('Range', 'woo-discount-rules'); ?></td>
<?php } ?>
<?php if ($show_column_discount_table == 'show') { ?>
<td class="wdr_td_head_discount"><?php esc_html_e('Discount', 'woo-discount-rules'); ?></td>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
$have_discount = false;
$table = $table_data;
foreach ($table as $index => $item) {
if ($item) {
foreach ($item as $id => $value) {
?>
<tr class="wdr_tr_body">
<?php if ($show_discount_title_table == 'show') { ?>
<td class="wdr_td_body_title"><?php echo $table_data_content[$index.$id]['title']; ?></td>
<?php } ?>
<?php if ($show_column_range_table == 'show') { ?>
<td class="wdr_td_body_range"><?php echo $table_data_content[$index.$id]['condition']; ?></td>
<?php } ?>
<?php if ($show_column_discount_table == 'show') { ?>
<td class="wdr_td_body_discount"><?php echo $table_data_content[$index.$id]['discount']; ?></td>
<?php } ?>
</tr>
<?php }
$have_discount = true;
}
}
if (!$have_discount) {
?>
<tr class="wdr_tr_body_no_discount">
<td colspan="2">
<?php esc_html_e('No Active Discounts.', 'woo-discount-rules'); ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>

View File

@@ -0,0 +1,24 @@
<?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
<div class="col-md-3">
<div class="container-fluid">
<div class="row-fluid">
<div class="col-md-12">
<br>
<a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=woo-discount-rules" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
</div>
<div class="col-md-12">
<div id="" align="right">
<div class="woo-side-button" class="hide-on-click">
<span id="sidebar_text"><?php esc_html_e('Hide', 'woo-discount-rules'); ?></span>
<span id="sidebar_icon" class="dashicons dashicons-arrow-left"></span>
</div>
</div>
<div class="woo-side-panel">
<?php
echo FlycartWooDiscountRulesGeneralHelper::getSideBarContent();
?>
</div>
</div>
</div>
</div>
</div>