Changeset 3431044
- Timestamp:
- 01/02/2026 12:56:03 PM (3 months ago)
- Location:
- wpdm-premium-packages/trunk
- Files:
-
- 4 added
- 6 edited
-
. (modified) (1 prop)
-
assets/css/mini-cart.css (added)
-
assets/js/mini-cart.js (added)
-
includes/libs/MiniCart.php (added)
-
includes/libs/MiniCartAPI.php (added)
-
includes/libs/functions.php (modified) (7 diffs)
-
includes/libs/hooks.php (modified) (2 diffs)
-
includes/menus/templates/product-sales-overview.php (modified) (3 diffs)
-
readme.txt (modified) (53 diffs)
-
wpdm-premium-packages.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpdm-premium-packages/trunk
-
Property
svn:ignore
set to
*.md
-
Property
svn:ignore
set to
-
wpdm-premium-packages/trunk/includes/libs/functions.php
r3424328 r3431044 24 24 global $wpdb; 25 25 if (!$pid) $pid = get_the_ID(); 26 $sales = $wpdb->get_var("select count(*) from {$wpdb->prefix}ahm_orders o, {$wpdb->prefix}ahm_order_items oi where oi.oid=o.order_id and oi.pid='$pid' and ( o.payment_status='Completed' or o.payment_status='Expired' )"); 26 $pid = (int) $pid; 27 28 $sales = $wpdb->get_var($wpdb->prepare( 29 "SELECT COUNT(*) FROM {$wpdb->prefix}ahm_orders o 30 INNER JOIN {$wpdb->prefix}ahm_order_items oi ON oi.oid = o.order_id 31 WHERE oi.pid = %d AND o.payment_status IN ('Completed', 'Expired')", 32 $pid 33 )); 27 34 28 35 return $sales; … … 35 42 global $wpdb; 36 43 37 $pid _cond = ($pid > 0) ? "and oi.pid='$pid'" : "";38 $uid _cond = ($uid > 0) ? "and oi.sid='$uid'" : "";44 $pid = (int) $pid; 45 $uid = (int) $uid; 39 46 40 47 $sdate = $sdate == '' ? wp_date("Y-m-01") : $sdate; 41 48 $edate = $edate == '' ? wp_date("Y-m-d", strtotime("last day of this month")) : $edate; 42 $sdate_cond = $sdate != '' ? " and o.date >= '" . strtotime($sdate) . "'" : "and o.date >= '" . strtotime(wp_date("Y-m-01")) . "'"; 43 $edate_cond = $sdate != '' ? " and o.date <= '" . strtotime($edate) . "'" : "and o.date <= '" . strtotime(wp_date("Y-m-d", strtotime("last day of this month"))) . "'"; 44 45 if ($pid_cond != '' || $uid_cond != '') 46 $sales = $wpdb->get_var("select sum(oi.price * oi.quantity) from {$wpdb->prefix}ahm_orders o, {$wpdb->prefix}ahm_order_items oi where oi.oid=o.order_id {$pid_cond} {$uid_cond} {$sdate_cond} {$edate_cond} and ( o.payment_status='Completed' or o.payment_status='Expired' )"); 47 else 48 $sales = $wpdb->get_var("select sum(o.total) from {$wpdb->prefix}ahm_orders o where ( o.payment_status='Completed' or o.payment_status='Expired' ) {$sdate_cond} {$edate_cond}"); 49 $sdate_ts = strtotime($sdate); 50 $edate_ts = strtotime($edate); 51 52 if ($pid > 0 || $uid > 0) { 53 $conditions = ["oi.oid = o.order_id", "o.payment_status IN ('Completed', 'Expired')"]; 54 $params = []; 55 56 if ($pid > 0) { 57 $conditions[] = "oi.pid = %d"; 58 $params[] = $pid; 59 } 60 if ($uid > 0) { 61 $conditions[] = "oi.sid = %d"; 62 $params[] = $uid; 63 } 64 $conditions[] = "o.date >= %d"; 65 $params[] = $sdate_ts; 66 $conditions[] = "o.date <= %d"; 67 $params[] = $edate_ts; 68 69 $where = implode(' AND ', $conditions); 70 $sql = "SELECT SUM(oi.price * oi.quantity) FROM {$wpdb->prefix}ahm_orders o, {$wpdb->prefix}ahm_order_items oi WHERE {$where}"; 71 $sales = $wpdb->get_var($wpdb->prepare($sql, $params)); 72 } else { 73 $sales = $wpdb->get_var($wpdb->prepare( 74 "SELECT SUM(o.total) FROM {$wpdb->prefix}ahm_orders o 75 WHERE o.payment_status IN ('Completed', 'Expired') 76 AND o.date >= %d AND o.date <= %d", 77 $sdate_ts, $edate_ts 78 )); 79 } 49 80 50 81 return number_format($sales, 2, '.', ''); … … 56 87 global $wpdb; 57 88 58 $pid_cond = ($pid > 0) ? "and oi.pid='$pid'" : ""; 59 $uid_cond = ($uid > 0) ? "and oi.sid='$uid'" : ""; 89 $pid = (int) $pid; 90 $uid = (int) $uid; 91 60 92 $sdate = $sdate == '' ? wp_date("Y-m-01") : $sdate; 61 93 $edate = $edate == '' ? wp_date("Y-m-d", strtotime("last day of this month")) : $edate; 62 $sdate_cond = $sdate != '' ? " and o.date >= '" . strtotime($sdate) . "'" : "and o.date >= '" . strtotime(wp_date("Y-m-01")) . "'"; 63 $edate_cond = $sdate != '' ? " and o.date <= '" . strtotime($edate) . "'" : "and o.date <= '" . strtotime(wp_date("Y-m-d", strtotime("last day of this month"))) . "'"; 64 65 $sales = $wpdb->get_results("select sum(oi.price * oi.quantity) as daily_sale, sum(oi.quantity) as quantities, oi.date, oi.year, oi.month, oi.day from {$wpdb->prefix}ahm_orders o, {$wpdb->prefix}ahm_order_items oi where oi.oid=o.order_id {$pid_cond} {$uid_cond} {$sdate_cond} {$edate_cond} and ( o.payment_status='Completed' or o.payment_status='Expired' ) group by oi.date"); 94 $sdate_ts = strtotime($sdate); 95 $edate_ts = strtotime($edate); 96 97 $conditions = ["oi.oid = o.order_id", "o.payment_status IN ('Completed', 'Expired')"]; 98 $params = []; 99 100 if ($pid > 0) { 101 $conditions[] = "oi.pid = %d"; 102 $params[] = $pid; 103 } 104 if ($uid > 0) { 105 $conditions[] = "oi.sid = %d"; 106 $params[] = $uid; 107 } 108 $conditions[] = "o.date >= %d"; 109 $params[] = $sdate_ts; 110 $conditions[] = "o.date <= %d"; 111 $params[] = $edate_ts; 112 113 $where = implode(' AND ', $conditions); 114 $sql = "SELECT SUM(oi.price * oi.quantity) AS daily_sale, SUM(oi.quantity) AS quantities, 115 oi.date, oi.year, oi.month, oi.day 116 FROM {$wpdb->prefix}ahm_orders o, {$wpdb->prefix}ahm_order_items oi 117 WHERE {$where} 118 GROUP BY oi.date"; 119 120 $sales = $wpdb->get_results($wpdb->prepare($sql, $params)); 66 121 67 122 $diff = date_diff(date_create($edate), date_create($sdate))->days; 68 123 $sdata = array(); 69 124 $i = 0; 125 $loop_date = $sdate; 70 126 do { 71 127 $i++; 72 $sdata['sales'][$ sdate] = 0;73 $sdata['quantities'][$ sdate] = 0;74 $ sdate = wp_date('Y-m-d', strtotime('+1 day', strtotime($sdate)));128 $sdata['sales'][$loop_date] = 0; 129 $sdata['quantities'][$loop_date] = 0; 130 $loop_date = wp_date('Y-m-d', strtotime('+1 day', strtotime($loop_date))); 75 131 } while ($i <= $diff); 76 132 … … 131 187 global $wpdb; 132 188 133 $uid_cond = ($uid > 0) ? "and {$wpdb->prefix}ahm_order_items.sid='$uid'" : ""; 134 $tsp = $wpdb->get_results("select {$wpdb->prefix}ahm_order_items.pid as product_id,{$wpdb->prefix}ahm_order_items.price, ({$wpdb->prefix}ahm_order_items.price * {$wpdb->prefix}ahm_order_items.quantity) as total, {$wpdb->prefix}ahm_orders.date as time_stamp, {$wpdb->prefix}ahm_order_items.date, {$wpdb->prefix}ahm_order_items.year, {$wpdb->prefix}ahm_order_items.month, {$wpdb->prefix}ahm_order_items.day from {$wpdb->prefix}ahm_order_items LEFT JOIN {$wpdb->prefix}ahm_orders on {$wpdb->prefix}ahm_order_items.oid={$wpdb->prefix}ahm_orders.order_id {$uid_cond} and ( {$wpdb->prefix}ahm_orders.payment_status='Completed' or {$wpdb->prefix}ahm_orders.payment_status='Expired' ) ORDER BY {$wpdb->prefix}ahm_orders.date DESC limit 0, $count"); 189 $uid = (int) $uid; 190 $count = (int) $count; 191 $count = max(1, min($count, 100)); // Limit between 1 and 100 192 193 $oi = "{$wpdb->prefix}ahm_order_items"; 194 $o = "{$wpdb->prefix}ahm_orders"; 195 196 if ($uid > 0) { 197 $tsp = $wpdb->get_results($wpdb->prepare( 198 "SELECT {$oi}.pid AS product_id, {$oi}.price, 199 ({$oi}.price * {$oi}.quantity) AS total, {$o}.date AS time_stamp, 200 {$oi}.date, {$oi}.year, {$oi}.month, {$oi}.day 201 FROM {$oi} 202 LEFT JOIN {$o} ON {$oi}.oid = {$o}.order_id 203 WHERE {$oi}.sid = %d 204 AND {$o}.payment_status IN ('Completed', 'Expired') 205 ORDER BY {$o}.date DESC 206 LIMIT %d", 207 $uid, $count 208 )); 209 } else { 210 $tsp = $wpdb->get_results($wpdb->prepare( 211 "SELECT {$oi}.pid AS product_id, {$oi}.price, 212 ({$oi}.price * {$oi}.quantity) AS total, {$o}.date AS time_stamp, 213 {$oi}.date, {$oi}.year, {$oi}.month, {$oi}.day 214 FROM {$oi} 215 LEFT JOIN {$o} ON {$oi}.oid = {$o}.order_id 216 WHERE {$o}.payment_status IN ('Completed', 'Expired') 217 ORDER BY {$o}.date DESC 218 LIMIT %d", 219 $count 220 )); 221 } 222 135 223 foreach ($tsp as &$_tsp) { 136 224 $_tsp->post_title = get_the_title($_tsp->product_id); … … 274 362 global $wpdb, $current_user; 275 363 $current_user = wp_get_current_user(); 276 $uid = $current_user->ID; 277 $sql = "select sum(i.price*i.quantity) from {$wpdb->prefix}ahm_orders o, 278 {$wpdb->prefix}ahm_order_items i, 279 {$wpdb->prefix}posts p 280 where p.post_author=$uid and 281 i.oid=o.order_id and 282 i.pid=p.ID and 283 i.quantity > 0 and 284 o.payment_status='Completed'"; 285 286 $total_sales = $wpdb->get_var($sql); 364 $uid = (int) $current_user->ID; 365 366 $total_sales = $wpdb->get_var($wpdb->prepare( 367 "SELECT SUM(i.price * i.quantity) 368 FROM {$wpdb->prefix}ahm_orders o, 369 {$wpdb->prefix}ahm_order_items i, 370 {$wpdb->prefix}posts p 371 WHERE p.post_author = %d 372 AND i.oid = o.order_id 373 AND i.pid = p.ID 374 AND i.quantity > 0 375 AND o.payment_status = 'Completed'", 376 $uid 377 )); 378 287 379 $commission = wpdmpp_site_commission(); 288 380 $total_commission = $total_sales * $commission / 100; 289 381 $total_earning = $total_sales - $total_commission; 290 $sql = "select sum(amount) from {$wpdb->prefix}ahm_withdraws where uid=$uid"; 291 $total_withdraws = $wpdb->get_var($sql); 382 383 $total_withdraws = $wpdb->get_var($wpdb->prepare( 384 "SELECT SUM(amount) FROM {$wpdb->prefix}ahm_withdraws WHERE uid = %d", 385 $uid 386 )); 292 387 $balance = $total_earning - $total_withdraws; 293 388 294 389 //finding matured balance 295 $payout_duration = get_option("wpdmpp_payout_duration");390 $payout_duration = (int) get_option("wpdmpp_payout_duration"); 296 391 $dt = $payout_duration * 24 * 60 * 60; 297 $sqlm = "select sum(i.price*i.quantity) from {$wpdb->prefix}ahm_orders o, 298 {$wpdb->prefix}ahm_order_items i, 299 {$wpdb->prefix}posts p 300 where p.post_author=$uid and 301 i.oid=o.order_id and 302 i.pid=p.ID and 303 i.quantity > 0 and 304 o.payment_status='Completed' 305 and (o.date+($dt))<" . time() . ""; 306 307 $tempbalance = $wpdb->get_var($sqlm); 392 $matured_time = time() - $dt; 393 394 $tempbalance = $wpdb->get_var($wpdb->prepare( 395 "SELECT SUM(i.price * i.quantity) 396 FROM {$wpdb->prefix}ahm_orders o, 397 {$wpdb->prefix}ahm_order_items i, 398 {$wpdb->prefix}posts p 399 WHERE p.post_author = %d 400 AND i.oid = o.order_id 401 AND i.pid = p.ID 402 AND i.quantity > 0 403 AND o.payment_status = 'Completed' 404 AND o.date < %d", 405 $uid, $matured_time 406 )); 407 308 408 $tempbalance = $tempbalance - ($tempbalance * $commission / 100); 309 409 $matured_balance = $tempbalance - $total_withdraws; … … 756 856 $result['type'] = 'failed'; 757 857 global $wpdb; 758 $order_id = sanitize_text_field(esc_sql($_REQUEST['order_id'])); 759 $uid = get_current_user_id(); 760 $ret = $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->prefix}ahm_orders WHERE order_id = %s and uid='$uid'", $order_id)); 858 $order_id = sanitize_text_field($_REQUEST['order_id']); 859 $uid = (int) get_current_user_id(); 860 861 $ret = $wpdb->query($wpdb->prepare( 862 "DELETE FROM {$wpdb->prefix}ahm_orders WHERE order_id = %s AND uid = %d", 863 $order_id, $uid 864 )); 761 865 762 866 if ($ret) { 763 $ret = $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->prefix}ahm_order_items WHERE oid = %s", $order_id)); 867 $ret = $wpdb->query($wpdb->prepare( 868 "DELETE FROM {$wpdb->prefix}ahm_order_items WHERE oid = %s", 869 $order_id 870 )); 764 871 765 872 if ($ret) $result['type'] = 'success'; … … 810 917 if (!isset($_POST['id'])) return; 811 918 global $wpdb; 812 $id = (int)$_POST['id']; 813 $sql = "select sum(quantity*price) as sales_amount, sum(quantity) as sales_quantity from {$wpdb->prefix}ahm_order_items oi, {$wpdb->prefix}ahm_orders o where oi.oid = o.order_id and oi.pid = {$id} and o.order_status IN ('Completed', 'Expired')"; 814 $data = $wpdb->get_row($sql); 919 $id = (int) $_POST['id']; 920 921 $data = $wpdb->get_row($wpdb->prepare( 922 "SELECT SUM(quantity * price) AS sales_amount, SUM(quantity) AS sales_quantity 923 FROM {$wpdb->prefix}ahm_order_items oi, {$wpdb->prefix}ahm_orders o 924 WHERE oi.oid = o.order_id AND oi.pid = %d AND o.order_status IN ('Completed', 'Expired')", 925 $id 926 )); 815 927 816 928 header('Content-type: application/json'); -
wpdm-premium-packages/trunk/includes/libs/hooks.php
r2768105 r3431044 20 20 add_action('wp_ajax_RecalculateSales', 'wpdmpp_recalculate_sales'); 21 21 add_action('publish_post', 'wpdmpp_notify_product_accepted'); 22 add_action('wp_ajax_wpdmpp_export_product_customers', 'wpdmpp_export_product_customers'); 22 23 } 23 24 … … 41 42 add_action("wp_ajax_nopriv_update_guest_billing", "wpdmpp_update_guest_billing"); 42 43 add_action("wp_ajax_wpdmpp_delete_frontend_order", "wpdmpp_delete_frontend_order"); 44 45 // Mini Cart Admin Settings 46 add_action("wpdmpp_basic_options", "wpdmpp_mini_cart_settings_panel"); 47 add_action("wpdmpp_after_save_settings", "wpdmpp_save_mini_cart_settings"); 48 49 /** 50 * Save Mini Cart Settings 51 * Hooked to wpdmpp_after_save_settings to save Mini Cart settings separately 52 */ 53 function wpdmpp_save_mini_cart_settings() { 54 if (!current_user_can('manage_options')) { 55 return; 56 } 57 58 // Check if mini cart settings are being saved 59 if (isset($_POST['_wpdmpp_mini_cart_settings'])) { 60 $settings_json = wp_unslash($_POST['_wpdmpp_mini_cart_settings']); 61 $settings = json_decode($settings_json, true); 62 63 if (is_array($settings)) { 64 // Sanitize settings 65 $sanitized = [ 66 'enabled' => !empty($settings['enabled']), 67 'auto_inject' => !empty($settings['auto_inject']), 68 'display_style' => sanitize_text_field($settings['display_style'] ?? 'dropdown'), 69 'position' => sanitize_text_field($settings['position'] ?? 'top-right'), 70 'show_item_count' => !empty($settings['show_item_count']), 71 'show_subtotal' => !empty($settings['show_subtotal']), 72 'show_thumbnails' => !empty($settings['show_thumbnails']), 73 'auto_open_on_add' => !empty($settings['auto_open_on_add']), 74 'auto_close_delay' => absint($settings['auto_close_delay'] ?? 3000), 75 'mobile_full_screen' => !empty($settings['mobile_full_screen']), 76 'mobile_breakpoint' => absint($settings['mobile_breakpoint'] ?? 768), 77 'primary_color' => sanitize_hex_color($settings['primary_color'] ?? '#6366f1'), 78 'button_text_color' => sanitize_hex_color($settings['button_text_color'] ?? '#ffffff'), 79 'badge_color' => sanitize_hex_color($settings['badge_color'] ?? '#ef4444'), 80 ]; 81 82 update_option('wpdmpp_mini_cart_settings', $sanitized); 83 } 84 } 85 } 86 87 /** 88 * Export product customers to CSV 89 */ 90 function wpdmpp_export_product_customers() { 91 // Verify nonce 92 if (!wp_verify_nonce($_REQUEST['_wpnonce'] ?? '', 'wpdmpp_export_customers')) { 93 wp_die(__('Security check failed', 'wpdm-premium-packages')); 94 } 95 96 // Check admin capability 97 if (!current_user_can('manage_options')) { 98 wp_die(__('Permission denied', 'wpdm-premium-packages')); 99 } 100 101 $pid = intval($_REQUEST['pid'] ?? 0); 102 if (!$pid) { 103 wp_die(__('Invalid product ID', 'wpdm-premium-packages')); 104 } 105 106 global $wpdb; 107 $orders_table = $wpdb->prefix . 'ahm_orders'; 108 $items_table = $wpdb->prefix . 'ahm_order_items'; 109 $users_table = $wpdb->users; 110 111 // Get all orders for this product with user info 112 $orders = $wpdb->get_results($wpdb->prepare(" 113 SELECT 114 o.order_id, 115 o.uid, 116 o.title as order_title, 117 o.billing_info, 118 o.payment_status, 119 o.payment_method, 120 o.coupon_code, 121 o.date as order_timestamp, 122 o.total as order_total, 123 oi.price, 124 oi.quantity, 125 oi.license as license_info, 126 (oi.price * oi.quantity) as item_total, 127 u.display_name as user_name, 128 u.user_email 129 FROM {$orders_table} o 130 INNER JOIN {$items_table} oi ON oi.oid = o.order_id 131 LEFT JOIN {$users_table} u ON o.uid = u.ID 132 WHERE oi.pid = %d 133 ORDER BY o.date DESC 134 ", $pid)); 135 136 // Get product title 137 $product_title = get_the_title($pid); 138 $product_slug = sanitize_title($product_title); 139 140 // Set headers for CSV download 141 $filename = 'customers-' . $product_slug . '-' . date('Y-m-d') . '.csv'; 142 header('Content-Type: text/csv; charset=utf-8'); 143 header('Content-Disposition: attachment; filename="' . $filename . '"'); 144 header('Pragma: no-cache'); 145 header('Expires: 0'); 146 147 // Create output stream 148 $output = fopen('php://output', 'w'); 149 150 // Add UTF-8 BOM for Excel compatibility 151 fprintf($output, chr(0xEF) . chr(0xBB) . chr(0xBF)); 152 153 // Write CSV header 154 fputcsv($output, [ 155 __('Order ID', 'wpdm-premium-packages'), 156 __('Order Date', 'wpdm-premium-packages'), 157 __('Customer Name', 'wpdm-premium-packages'), 158 __('Customer Email', 'wpdm-premium-packages'), 159 __('Phone', 'wpdm-premium-packages'), 160 __('Address', 'wpdm-premium-packages'), 161 __('Product', 'wpdm-premium-packages'), 162 __('License Type', 'wpdm-premium-packages'), 163 __('Price', 'wpdm-premium-packages'), 164 __('Quantity', 'wpdm-premium-packages'), 165 __('Total', 'wpdm-premium-packages'), 166 __('Coupon', 'wpdm-premium-packages'), 167 __('Payment Method', 'wpdm-premium-packages'), 168 __('Payment Status', 'wpdm-premium-packages') 169 ]); 170 171 $currency = wpdmpp_currency_sign(); 172 173 // Write data rows 174 foreach ($orders as $order) { 175 $order_date = $order->order_timestamp ? date('Y-m-d H:i:s', $order->order_timestamp) : ''; 176 177 // Parse billing info (may be serialized) 178 $billing = []; 179 if (!empty($order->billing_info)) { 180 $billing = maybe_unserialize($order->billing_info); 181 if (!is_array($billing)) { 182 $billing = []; 183 } 184 } 185 186 // Get customer name - prefer billing info, then order title, then user name 187 $customer_name = ''; 188 if (!empty($billing['first_name']) || !empty($billing['last_name'])) { 189 $customer_name = trim(($billing['first_name'] ?? '') . ' ' . ($billing['last_name'] ?? '')); 190 } elseif (!empty($order->order_title)) { 191 $customer_name = $order->order_title; 192 } elseif (!empty($order->user_name)) { 193 $customer_name = $order->user_name; 194 } 195 196 // Get customer email - prefer billing info, then user email 197 $customer_email = ''; 198 if (!empty($billing['email'])) { 199 $customer_email = $billing['email']; 200 } elseif (!empty($order->user_email)) { 201 $customer_email = $order->user_email; 202 } 203 204 // Get phone and address from billing 205 $phone = $billing['phone'] ?? ''; 206 $address_parts = array_filter([ 207 $billing['address'] ?? '', 208 $billing['address_2'] ?? '', 209 $billing['city'] ?? '', 210 $billing['state'] ?? '', 211 $billing['zip'] ?? '', 212 $billing['country'] ?? '' 213 ]); 214 $address = implode(', ', $address_parts); 215 216 // Parse license info 217 $license_type = 'Standard'; 218 if (!empty($order->license_info)) { 219 $license_data = maybe_unserialize($order->license_info); 220 if (is_array($license_data) && isset($license_data['name'])) { 221 $license_type = $license_data['name']; 222 } elseif (is_string($license_data)) { 223 $license_type = $license_data; 224 } 225 } 226 227 fputcsv($output, [ 228 $order->order_id, 229 $order_date, 230 $customer_name, 231 $customer_email, 232 $phone, 233 $address, 234 $product_title, 235 $license_type, 236 $currency . number_format((float)$order->price, 2), 237 $order->quantity, 238 $currency . number_format((float)$order->item_total, 2), 239 $order->coupon_code ?: '', 240 $order->payment_method ?: '', 241 $order->payment_status 242 ]); 243 } 244 245 fclose($output); 246 exit; 247 } 248 249 /** 250 * Mini Cart Settings Panel 251 * Renders the admin settings UI for the Mini Cart feature 252 */ 253 function wpdmpp_mini_cart_settings_panel() { 254 // Include MiniCartAPI to get default settings 255 if (!class_exists('WPDMPP\Libs\MiniCartAPI')) { 256 return; 257 } 258 259 $settings = get_option('wpdmpp_mini_cart_settings', \WPDMPP\Libs\MiniCartAPI::getDefaultSettings()); 260 ?> 261 262 <!-- Mini Cart Settings --> 263 <div class="wpdmpp-card"> 264 <div class="wpdmpp-card__header"> 265 <div class="wpdmpp-card__icon wpdmpp-card__icon--indigo"> 266 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> 267 <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" /> 268 </svg> 269 </div> 270 <div> 271 <h3 class="wpdmpp-card__title"><?php _e('Mini Cart', 'wpdm-premium-packages'); ?></h3> 272 <p class="wpdmpp-card__subtitle"><?php _e('Configure the mini cart widget for your store', 'wpdm-premium-packages'); ?></p> 273 </div> 274 </div> 275 <div class="wpdmpp-card__body"> 276 <!-- Enable Mini Cart --> 277 <div class="wpdmpp-toggle-option"> 278 <div class="wpdmpp-toggle-option__info"> 279 <div class="wpdmpp-toggle-option__label"><?php _e('Enable Mini Cart', 'wpdm-premium-packages'); ?></div> 280 <div class="wpdmpp-toggle-option__desc"><?php _e('Show a mini cart widget on your site', 'wpdm-premium-packages'); ?></div> 281 </div> 282 <label class="wpdmpp-switch"> 283 <input type="checkbox" name="_wpdmpp_settings[mini_cart][enabled]" value="1" <?php checked(!empty($settings['enabled'])); ?>> 284 <span class="wpdmpp-switch__slider"></span> 285 </label> 286 </div> 287 288 <!-- Auto Inject --> 289 <div class="wpdmpp-toggle-option"> 290 <div class="wpdmpp-toggle-option__info"> 291 <div class="wpdmpp-toggle-option__label"><?php _e('Auto Inject in Footer', 'wpdm-premium-packages'); ?></div> 292 <div class="wpdmpp-toggle-option__desc"><?php _e('Automatically add the mini cart to your site footer', 'wpdm-premium-packages'); ?></div> 293 </div> 294 <label class="wpdmpp-switch"> 295 <input type="checkbox" name="_wpdmpp_settings[mini_cart][auto_inject]" value="1" <?php checked(!empty($settings['auto_inject'])); ?>> 296 <span class="wpdmpp-switch__slider"></span> 297 </label> 298 </div> 299 300 <div class="wpdmpp-divider"></div> 301 302 <!-- Display Style --> 303 <div class="wpdmpp-form-group"> 304 <label class="wpdmpp-form-group__label"><?php _e('Display Style', 'wpdm-premium-packages'); ?></label> 305 <select name="_wpdmpp_settings[mini_cart][display_style]" class="form-control" style="max-width: 300px;"> 306 <option value="dropdown" <?php selected($settings['display_style'] ?? 'dropdown', 'dropdown'); ?>><?php _e('Dropdown', 'wpdm-premium-packages'); ?></option> 307 <option value="slide_panel" <?php selected($settings['display_style'] ?? '', 'slide_panel'); ?>><?php _e('Slide Panel', 'wpdm-premium-packages'); ?></option> 308 <option value="floating" <?php selected($settings['display_style'] ?? '', 'floating'); ?>><?php _e('Floating Button', 'wpdm-premium-packages'); ?></option> 309 </select> 310 <p class="wpdmpp-form-group__note"><?php _e('Choose how the mini cart should be displayed', 'wpdm-premium-packages'); ?></p> 311 </div> 312 313 <!-- Position --> 314 <div class="wpdmpp-form-group"> 315 <label class="wpdmpp-form-group__label"><?php _e('Position', 'wpdm-premium-packages'); ?></label> 316 <select name="_wpdmpp_settings[mini_cart][position]" class="form-control" style="max-width: 300px;"> 317 <option value="top-right" <?php selected($settings['position'] ?? 'top-right', 'top-right'); ?>><?php _e('Top Right', 'wpdm-premium-packages'); ?></option> 318 <option value="top-left" <?php selected($settings['position'] ?? '', 'top-left'); ?>><?php _e('Top Left', 'wpdm-premium-packages'); ?></option> 319 <option value="bottom-right" <?php selected($settings['position'] ?? '', 'bottom-right'); ?>><?php _e('Bottom Right', 'wpdm-premium-packages'); ?></option> 320 <option value="bottom-left" <?php selected($settings['position'] ?? '', 'bottom-left'); ?>><?php _e('Bottom Left', 'wpdm-premium-packages'); ?></option> 321 </select> 322 <p class="wpdmpp-form-group__note"><?php _e('Position for floating button and slide panel', 'wpdm-premium-packages'); ?></p> 323 </div> 324 325 <div class="wpdmpp-divider"></div> 326 327 <h4 style="margin: 0 0 16px; font-size: 14px; font-weight: 600; color: #374151;"><?php _e('Display Options', 'wpdm-premium-packages'); ?></h4> 328 329 <!-- Show Item Count --> 330 <div class="wpdmpp-toggle-option"> 331 <div class="wpdmpp-toggle-option__info"> 332 <div class="wpdmpp-toggle-option__label"><?php _e('Show Item Count', 'wpdm-premium-packages'); ?></div> 333 <div class="wpdmpp-toggle-option__desc"><?php _e('Display the number of items in the cart', 'wpdm-premium-packages'); ?></div> 334 </div> 335 <label class="wpdmpp-switch"> 336 <input type="checkbox" name="_wpdmpp_settings[mini_cart][show_item_count]" value="1" <?php checked($settings['show_item_count'] ?? true); ?>> 337 <span class="wpdmpp-switch__slider"></span> 338 </label> 339 </div> 340 341 <!-- Show Subtotal --> 342 <div class="wpdmpp-toggle-option"> 343 <div class="wpdmpp-toggle-option__info"> 344 <div class="wpdmpp-toggle-option__label"><?php _e('Show Subtotal', 'wpdm-premium-packages'); ?></div> 345 <div class="wpdmpp-toggle-option__desc"><?php _e('Display the cart subtotal amount', 'wpdm-premium-packages'); ?></div> 346 </div> 347 <label class="wpdmpp-switch"> 348 <input type="checkbox" name="_wpdmpp_settings[mini_cart][show_subtotal]" value="1" <?php checked($settings['show_subtotal'] ?? true); ?>> 349 <span class="wpdmpp-switch__slider"></span> 350 </label> 351 </div> 352 353 <!-- Show Thumbnails --> 354 <div class="wpdmpp-toggle-option"> 355 <div class="wpdmpp-toggle-option__info"> 356 <div class="wpdmpp-toggle-option__label"><?php _e('Show Product Thumbnails', 'wpdm-premium-packages'); ?></div> 357 <div class="wpdmpp-toggle-option__desc"><?php _e('Display product images in the cart', 'wpdm-premium-packages'); ?></div> 358 </div> 359 <label class="wpdmpp-switch"> 360 <input type="checkbox" name="_wpdmpp_settings[mini_cart][show_thumbnails]" value="1" <?php checked($settings['show_thumbnails'] ?? true); ?>> 361 <span class="wpdmpp-switch__slider"></span> 362 </label> 363 </div> 364 365 <div class="wpdmpp-divider"></div> 366 367 <h4 style="margin: 0 0 16px; font-size: 14px; font-weight: 600; color: #374151;"><?php _e('Behavior', 'wpdm-premium-packages'); ?></h4> 368 369 <!-- Auto Open on Add --> 370 <div class="wpdmpp-toggle-option"> 371 <div class="wpdmpp-toggle-option__info"> 372 <div class="wpdmpp-toggle-option__label"><?php _e('Auto Open on Add to Cart', 'wpdm-premium-packages'); ?></div> 373 <div class="wpdmpp-toggle-option__desc"><?php _e('Automatically open the mini cart when an item is added', 'wpdm-premium-packages'); ?></div> 374 </div> 375 <label class="wpdmpp-switch"> 376 <input type="checkbox" name="_wpdmpp_settings[mini_cart][auto_open_on_add]" value="1" <?php checked($settings['auto_open_on_add'] ?? true); ?>> 377 <span class="wpdmpp-switch__slider"></span> 378 </label> 379 </div> 380 381 <!-- Auto Close Delay --> 382 <div class="wpdmpp-form-group"> 383 <label class="wpdmpp-form-group__label"><?php _e('Auto Close Delay (ms)', 'wpdm-premium-packages'); ?></label> 384 <input type="number" name="_wpdmpp_settings[mini_cart][auto_close_delay]" class="form-control" style="max-width: 150px;" value="<?php echo esc_attr($settings['auto_close_delay'] ?? 3000); ?>" min="0" step="500"> 385 <p class="wpdmpp-form-group__note"><?php _e('Time in milliseconds before auto-closing. Set to 0 to disable', 'wpdm-premium-packages'); ?></p> 386 </div> 387 388 <div class="wpdmpp-divider"></div> 389 390 <h4 style="margin: 0 0 16px; font-size: 14px; font-weight: 600; color: #374151;"><?php _e('Mobile Settings', 'wpdm-premium-packages'); ?></h4> 391 392 <!-- Mobile Full Screen --> 393 <div class="wpdmpp-toggle-option"> 394 <div class="wpdmpp-toggle-option__info"> 395 <div class="wpdmpp-toggle-option__label"><?php _e('Mobile Full Screen', 'wpdm-premium-packages'); ?></div> 396 <div class="wpdmpp-toggle-option__desc"><?php _e('Use full screen overlay on mobile devices', 'wpdm-premium-packages'); ?></div> 397 </div> 398 <label class="wpdmpp-switch"> 399 <input type="checkbox" name="_wpdmpp_settings[mini_cart][mobile_full_screen]" value="1" <?php checked($settings['mobile_full_screen'] ?? true); ?>> 400 <span class="wpdmpp-switch__slider"></span> 401 </label> 402 </div> 403 404 <!-- Mobile Breakpoint --> 405 <div class="wpdmpp-form-group"> 406 <label class="wpdmpp-form-group__label"><?php _e('Mobile Breakpoint (px)', 'wpdm-premium-packages'); ?></label> 407 <input type="number" name="_wpdmpp_settings[mini_cart][mobile_breakpoint]" class="form-control" style="max-width: 150px;" value="<?php echo esc_attr($settings['mobile_breakpoint'] ?? 768); ?>" min="320" max="1024"> 408 <p class="wpdmpp-form-group__note"><?php _e('Screen width in pixels at which mobile mode activates', 'wpdm-premium-packages'); ?></p> 409 </div> 410 411 <div class="wpdmpp-divider"></div> 412 413 <h4 style="margin: 0 0 16px; font-size: 14px; font-weight: 600; color: #374151;"><?php _e('Colors', 'wpdm-premium-packages'); ?></h4> 414 415 <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;"> 416 <!-- Primary Color --> 417 <div class="wpdmpp-form-group"> 418 <label class="wpdmpp-form-group__label"><?php _e('Primary Color', 'wpdm-premium-packages'); ?></label> 419 <input type="color" name="_wpdmpp_settings[mini_cart][primary_color]" value="<?php echo esc_attr($settings['primary_color'] ?? '#6366f1'); ?>" style="width: 60px; height: 36px; padding: 2px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer;"> 420 </div> 421 422 <!-- Button Text Color --> 423 <div class="wpdmpp-form-group"> 424 <label class="wpdmpp-form-group__label"><?php _e('Button Text Color', 'wpdm-premium-packages'); ?></label> 425 <input type="color" name="_wpdmpp_settings[mini_cart][button_text_color]" value="<?php echo esc_attr($settings['button_text_color'] ?? '#ffffff'); ?>" style="width: 60px; height: 36px; padding: 2px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer;"> 426 </div> 427 428 <!-- Badge Color --> 429 <div class="wpdmpp-form-group"> 430 <label class="wpdmpp-form-group__label"><?php _e('Badge Color', 'wpdm-premium-packages'); ?></label> 431 <input type="color" name="_wpdmpp_settings[mini_cart][badge_color]" value="<?php echo esc_attr($settings['badge_color'] ?? '#ef4444'); ?>" style="width: 60px; height: 36px; padding: 2px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer;"> 432 </div> 433 </div> 434 435 <div class="wpdmpp-divider"></div> 436 437 <!-- Shortcode Info --> 438 <div style="background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 16px;"> 439 <h4 style="margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #166534; display: flex; align-items: center; gap: 8px;"> 440 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> 441 <path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" /> 442 </svg> 443 <?php _e('Shortcode', 'wpdm-premium-packages'); ?> 444 </h4> 445 <p style="margin: 0 0 12px; font-size: 13px; color: #15803d;"><?php _e('Use this shortcode to manually place the mini cart anywhere on your site:', 'wpdm-premium-packages'); ?></p> 446 <code style="display: inline-block; background: #dcfce7; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: #166534; font-family: monospace;">[wpdmpp_mini_cart]</code> 447 448 <h5 style="margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: #166534;"><?php _e('Shortcode Attributes', 'wpdm-premium-packages'); ?></h5> 449 <ul style="margin: 0; padding: 0 0 0 20px; font-size: 12px; color: #15803d; line-height: 1.8;"> 450 <li><code>style</code> - <?php _e('Display style: dropdown, slide_panel, or floating', 'wpdm-premium-packages'); ?></li> 451 <li><code>position</code> - <?php _e('Position: top-right, top-left, bottom-right, or bottom-left', 'wpdm-premium-packages'); ?></li> 452 <li><code>class</code> - <?php _e('Additional CSS classes', 'wpdm-premium-packages'); ?></li> 453 </ul> 454 <p style="margin: 12px 0 0; font-size: 12px; color: #15803d;"> 455 <?php _e('Example:', 'wpdm-premium-packages'); ?> <code style="background: #dcfce7; padding: 2px 6px; border-radius: 4px;">[wpdmpp_mini_cart style="floating" position="bottom-right"]</code> 456 </p> 457 </div> 458 459 <!-- PHP Usage Info --> 460 <div style="background: #eff6ff; border: 1px solid #93c5fd; border-radius: 8px; padding: 16px; margin-top: 16px;"> 461 <h4 style="margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #1e40af; display: flex; align-items: center; gap: 8px;"> 462 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> 463 <path stroke-linecap="round" stroke-linejoin="round" d="M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z" /> 464 </svg> 465 <?php _e('PHP Usage', 'wpdm-premium-packages'); ?> 466 </h4> 467 <p style="margin: 0 0 12px; font-size: 13px; color: #1d4ed8;"><?php _e('Use these PHP functions in your theme templates:', 'wpdm-premium-packages'); ?></p> 468 469 <h5 style="margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #1e40af;"><?php _e('Display Mini Cart', 'wpdm-premium-packages'); ?></h5> 470 <pre style="background: #dbeafe; padding: 12px; border-radius: 6px; font-size: 12px; color: #1e40af; font-family: monospace; margin: 0 0 16px; overflow-x: auto; white-space: pre-wrap;"> 471 // Basic usage (uses settings from admin) 472 echo \WPDMPP\Libs\MiniCart::render(); 473 474 // With custom options 475 echo \WPDMPP\Libs\MiniCart::render([ 476 'display_style' => 'floating', // dropdown, slide_panel, floating 477 'position' => 'bottom-right', // top-right, top-left, bottom-right, bottom-left 478 'show_count' => 'yes', // yes or no 479 'show_total' => 'yes', // yes or no 480 'icon' => 'cart', // cart, bag, or basket 481 'class' => 'my-custom-class', // Additional CSS classes 482 ]); 483 </pre> 484 485 <h5 style="margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #1e40af;"><?php _e('Check if Mini Cart is Enabled', 'wpdm-premium-packages'); ?></h5> 486 <pre style="background: #dbeafe; padding: 12px; border-radius: 6px; font-size: 12px; color: #1e40af; font-family: monospace; margin: 0 0 16px; overflow-x: auto; white-space: pre-wrap;"> 487 if (\WPDMPP\Libs\MiniCart::isEnabled()) { 488 // Mini cart is enabled 489 } 490 </pre> 491 492 <h5 style="margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #1e40af;"><?php _e('Get Mini Cart Settings', 'wpdm-premium-packages'); ?></h5> 493 <pre style="background: #dbeafe; padding: 12px; border-radius: 6px; font-size: 12px; color: #1e40af; font-family: monospace; margin: 0; overflow-x: auto; white-space: pre-wrap;"> 494 $settings = \WPDMPP\Libs\MiniCart::getSettings(); 495 </pre> 496 </div> 497 498 <!-- Nav Menu Integration Info --> 499 <div style="background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 16px; margin-top: 16px;"> 500 <h4 style="margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #c2410c; display: flex; align-items: center; gap: 8px;"> 501 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> 502 <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" /> 503 </svg> 504 <?php _e('Nav Menu Integration', 'wpdm-premium-packages'); ?> 505 </h4> 506 <p style="margin: 0 0 12px; font-size: 13px; color: #ea580c;"><?php _e('Add the mini cart to any WordPress navigation menu item without editing theme files:', 'wpdm-premium-packages'); ?></p> 507 508 <h5 style="margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #c2410c;"><?php _e('Steps:', 'wpdm-premium-packages'); ?></h5> 509 <ol style="margin: 0 0 16px; padding: 0 0 0 20px; font-size: 13px; color: #ea580c; line-height: 1.8;"> 510 <li><?php _e('Go to <strong>Appearance → Menus</strong> in WordPress admin', 'wpdm-premium-packages'); ?></li> 511 <li><?php _e('Add a <strong>Custom Link</strong> to your menu (URL: #, Link Text: Cart)', 'wpdm-premium-packages'); ?></li> 512 <li><?php _e('Expand the menu item and click "Screen Options" at top-right if you don\'t see CSS Classes field', 'wpdm-premium-packages'); ?></li> 513 <li><?php _e('Check "CSS Classes" in Screen Options to enable the field', 'wpdm-premium-packages'); ?></li> 514 <li><?php _e('In the <strong>CSS Classes</strong> field, enter: <code style="background: #fed7aa; padding: 2px 6px; border-radius: 4px; font-family: monospace;">wpdmpp-minicart</code>', 'wpdm-premium-packages'); ?></li> 515 <li><?php _e('Save Menu', 'wpdm-premium-packages'); ?></li> 516 </ol> 517 518 <div style="background: #ffedd5; border-radius: 6px; padding: 12px; margin-top: 12px;"> 519 <p style="margin: 0; font-size: 12px; color: #c2410c;"> 520 <strong><?php _e('Note:', 'wpdm-premium-packages'); ?></strong> 521 <?php _e('The mini cart will automatically replace the menu item link with a cart icon, item count, and total. Clicking it opens a dropdown panel with cart items, subtotal, and checkout buttons.', 'wpdm-premium-packages'); ?> 522 </p> 523 </div> 524 525 <div style="background: #ffedd5; border-radius: 6px; padding: 12px; margin-top: 8px;"> 526 <p style="margin: 0; font-size: 12px; color: #c2410c;"> 527 <strong><?php _e('Mobile:', 'wpdm-premium-packages'); ?></strong> 528 <?php _e('On mobile devices, the cart panel slides up from the bottom of the screen for easier interaction.', 'wpdm-premium-packages'); ?> 529 </p> 530 </div> 531 </div> 532 533 </div> 534 </div> 535 536 <script> 537 jQuery(function($) { 538 // Handle settings save for mini cart 539 $('form').on('submit', function() { 540 // Get all mini cart settings 541 var miniCartSettings = {}; 542 $('input[name^="_wpdmpp_settings[mini_cart]"], select[name^="_wpdmpp_settings[mini_cart]"]').each(function() { 543 var name = $(this).attr('name').replace('_wpdmpp_settings[mini_cart][', '').replace(']', ''); 544 var type = $(this).attr('type'); 545 546 if (type === 'checkbox') { 547 miniCartSettings[name] = $(this).is(':checked') ? 1 : 0; 548 } else { 549 miniCartSettings[name] = $(this).val(); 550 } 551 }); 552 553 // Store in hidden field for processing 554 if ($('#wpdmpp_mini_cart_settings').length === 0) { 555 $(this).append('<input type="hidden" id="wpdmpp_mini_cart_settings" name="_wpdmpp_mini_cart_settings" />'); 556 } 557 $('#wpdmpp_mini_cart_settings').val(JSON.stringify(miniCartSettings)); 558 }); 559 }); 560 </script> 561 <?php 562 } -
wpdm-premium-packages/trunk/includes/menus/templates/product-sales-overview.php
r3425716 r3431044 367 367 color: #fff; 368 368 } 369 370 /* Export Button */ 371 .wpdmpp-export-section { 372 margin-bottom: 16px; 373 } 374 .wpdmpp-export-btn { 375 display: inline-flex; 376 align-items: center; 377 gap: 8px; 378 padding: 10px 16px; 379 background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 380 color: #fff; 381 border: none; 382 border-radius: 8px; 383 font-size: 13px; 384 font-weight: 500; 385 cursor: pointer; 386 transition: all 0.15s ease; 387 width: 100%; 388 justify-content: center; 389 } 390 .wpdmpp-export-btn:hover { 391 background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); 392 transform: translateY(-1px); 393 box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); 394 } 395 .wpdmpp-export-btn:active { 396 transform: translateY(0); 397 } 398 .wpdmpp-export-btn svg { 399 width: 18px; 400 height: 18px; 401 } 402 .wpdmpp-export-btn:disabled { 403 opacity: 0.6; 404 cursor: not-allowed; 405 transform: none; 406 } 369 407 </style> 370 408 … … 409 447 </div> 410 448 449 <!-- Export Button --> 450 <div class="wpdmpp-export-section"> 451 <button type="button" class="wpdmpp-export-btn" id="wpdmpp-export-customers" data-pid="<?php echo esc_attr($pid); ?>"> 452 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> 453 <path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" /> 454 </svg> 455 <?php _e('Export Customer Data', 'wpdm-premium-packages'); ?> 456 </button> 457 </div> 458 411 459 <!-- Stats List --> 412 460 <div class="wpdmpp-stats-list"> … … 450 498 451 499 </div> 500 501 <script> 502 jQuery(function($) { 503 $('#wpdmpp-export-customers').on('click', function() { 504 var btn = $(this); 505 var pid = btn.data('pid'); 506 var originalText = btn.html(); 507 508 btn.prop('disabled', true).html('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width:18px;height:18px;animation:spin 1s linear infinite;"><circle cx="12" cy="12" r="10" stroke-opacity="0.25"/><path stroke-linecap="round" d="M12 2a10 10 0 0 1 10 10"/></svg> <?php _e('Exporting...', 'wpdm-premium-packages'); ?>'); 509 510 // Create a hidden form to trigger file download 511 var form = $('<form>', { 512 method: 'POST', 513 action: ajaxurl 514 }).append( 515 $('<input>', { type: 'hidden', name: 'action', value: 'wpdmpp_export_product_customers' }), 516 $('<input>', { type: 'hidden', name: 'pid', value: pid }), 517 $('<input>', { type: 'hidden', name: '_wpnonce', value: '<?php echo wp_create_nonce('wpdmpp_export_customers'); ?>' }) 518 ); 519 520 $('body').append(form); 521 form.submit(); 522 form.remove(); 523 524 // Re-enable button after a delay 525 setTimeout(function() { 526 btn.prop('disabled', false).html(originalText); 527 }, 2000); 528 }); 529 }); 530 </script> -
wpdm-premium-packages/trunk/readme.txt
r3425716 r3431044 2 2 Contributors: w3eden, codename065, shahriar0822, shafayat-alam, shimo16ab 3 3 Donate link: 4 Tags: shopping cart, digital store, online shop, sell digital product, WordPress ecommerce, products, product management, membershipmanagement4 Tags: ecommerce, digital downloads, sell digital products, shopping cart, wordpress store, digital store, online shop, payment gateway, paypal, license management 5 5 Requires at least: 5.3 6 6 Tested up to: 6.9 7 Stable tag: 6.1.3 8 9 10 Premium Packages is a free full-featured WordPress eCommerce Plugin to sell digital products easily. 7 Stable tag: 6.2.0 8 9 Premium Packages is a free, full-featured WordPress eCommerce plugin to sell digital products easily and securely. 11 10 12 11 == Description == 13 12 14 Use WPDM - Premium Packages plugin to convert your [Download Manager](https://wordpress.org/plugins/download-manager/) into a complete e-Commerce Solution for selling digital products. Simply put a price when you need to sell a digital item. You also may use license ( ex: Simple, Extended, Unlimited ) based prices for a product. Users can directly download free items and when an item has a price user will have to go through cart & checkout. WordPress Download Manager has the easiest checkout option to give the user better experience in purchasing an item and which always increase the probability of successful completion of an order. 15 16 = Features = 17 WordPress Download Manager & Premium Package Add-on gives you the perfect WordPress Digital Store Solution to convert your site into a digital store just in a few clicks: 13 **Premium Packages** transforms your [WordPress Download Manager](https://wordpress.org/plugins/download-manager/) into a complete **eCommerce solution for selling digital products**. Whether you're selling software, ebooks, music, themes, plugins, or any other digital goods, Premium Packages provides all the tools you need. 14 15 Simply set a price when you want to sell a digital item. You can also use license-based pricing (e.g., Personal, Extended, Unlimited) for your products. Users can directly download free items, while paid items require going through the cart and checkout process. 16 17 WordPress Download Manager with Premium Packages offers the **easiest checkout experience**, helping users complete purchases quickly and increasing your conversion rates. 18 19 = Why Choose Premium Packages? = 20 21 * **Zero Transaction Fees** - Unlike other platforms, we don't take a cut of your sales 22 * **Complete Control** - Host everything on your own WordPress site 23 * **Flexible Pricing** - Fixed prices, license tiers, pay-what-you-want, and subscriptions 24 * **Secure Downloads** - Protected file delivery with expiring links 25 * **Built-in Licensing** - Software license key generation and validation 26 27 = Mini Cart Widget (NEW) = 28 29 Premium Packages now includes a **modern Mini Cart widget** that enhances your customers' shopping experience: 30 31 * **Three Display Styles** - Dropdown, slide panel, or floating button 32 * **Real-time Updates** - Cart updates instantly when items are added or removed 33 * **Nav Menu Integration** - Add mini cart to any menu item with a simple CSS class 34 * **Mobile Optimized** - Full-screen mode on mobile devices for better UX 35 * **Customizable** - Match your theme with custom colors and positioning 36 * **Shortcode Support** - Place anywhere using `[wpdmpp_mini_cart]` 18 37 19 38 = Shopping Cart = 20 Full featured shopping cart with integrated PayPal payment system to sell your packages/products. 21 Full-featured order management system to manage orders for premium packages. (premium package add-on)39 40 Full-featured shopping cart with integrated PayPal payment system to sell your packages and products. Complete order management system to track and manage all orders for premium packages. 22 41 23 42 = Order & Invoice Management = 24 Extended order and invoice management options, multiple invoice templates with customization options. 25 WordPress Download Manager Sales Report 26 27 = Sales Report =28 A full detailed report on sale and orders. Generate custom chart or graph report for site-wide sales or shop specific or product specific sale easily. 29 WordPress Download Manager Mobile App 43 44 Extended order and invoice management options with multiple invoice templates and customization options. Generate professional invoices automatically for every sale. 45 46 = Sales Reports & Analytics = 47 48 Comprehensive sales reporting with detailed analytics. Generate custom charts and graphs for site-wide sales, shop-specific, or product-specific data. Track your business growth with ease. 30 49 31 50 = Mobile Apps = 32 Yes, get everything in your pocket, check sales report from your mobile, get notifications on each sale directly on your mobile. 51 52 Get everything in your pocket! Check sales reports from your mobile device and receive push notifications for each sale directly on your phone. 33 53 34 54 = Coupon Management = 35 The Plugin includes an extensive range of coupon management. You can create product specific coupons or global coupons for different levels of discount. 36 37 = Role-Based Discount = 38 Sometimes you may need to apply different discounts based on user roles, like editors and authors may have different percents of discounts. 39 40 = Product & Price Variation = 41 Unlimited Product Variations. Create single or multiple variations ( i.e. licenses types ) with increments or decrements of the base price. Also, sale individual or selective files from a package, like selling single or selective music from an album. FYI, only wpdm v4 42 43 = Get Free or Pay As You Want / Donate = 44 You can sell a product with "As you want to pay" option, you also can set a minimum amount to pay or simply put 0 for a minimum price if you want to keep the minimum price optional ( allow users to download even for free ). 45 46 = Accept Payment Without Creating Product = 47 We know, sometimes you need to request/accept payment from someone, and you want to keep track of this inside your site, and creating a product may feel too much of work, so you can simply create a dynamic pay link or use shortocde `[wpdmpp_pay_link price="59" name="Reason for payment" desc="You may add more details" cssclass="btn btn-primary" recurring=0]` 48 49 = Sell Extra Gigs = 50 You may offer additional services like installation, priority support & maintenance for additional fees like extra gigs with your main products, a customer may select one or more gigs with main product and the extra price will be added with the main product price. 51 52 = The Simplest Checkout Option = 53 Premium Package Add-on introduced the simplest checkout system ever, no complex steps, both guests' and members' checkout just exactly in 2 clicks. 54 55 = Abandoned Cart/Order Recovery = 56 Premium Package Add-on has an easy-to-use feature to recover abandoned carts/orders, you can configure this feature to send upto 5 emails to the potential customer at different intervals. It also can add dynamic coupon at the end to inspire the customer to complete the checkout as last attempt. 55 56 Extensive coupon management system. Create product-specific coupons or global discount codes. Set expiration dates, usage limits, and discount types (percentage or fixed amount). 57 58 = Role-Based Discounts = 59 60 Apply different discount percentages based on user roles. For example, give editors 20% off and subscribers 10% off - perfect for membership sites and B2B scenarios. 61 62 = Product & Price Variations = 63 64 Create unlimited product variations with license-based pricing. Set different prices for Personal, Extended, and Unlimited licenses. Sell individual files from a package (like single songs from an album). *Requires WPDM v4+* 65 66 = Pay What You Want / Donations = 67 68 Enable "Pay What You Want" pricing with optional minimum amounts. Set the minimum to $0 to allow free downloads, or set a floor price while letting customers pay more if they wish. 69 70 = Accept Payment Without Creating Products = 71 72 Need to accept a quick payment? Use the dynamic payment link shortcode without creating a full product: 73 74 `[wpdmpp_pay_link price="59" name="Consultation Fee" desc="1-hour consultation session" cssclass="btn btn-primary" recurring=0]` 75 76 = Sell Extra Services (Gigs) = 77 78 Offer additional services like installation, priority support, or extended maintenance for extra fees. Customers can select multiple add-ons, and prices are automatically calculated. 79 80 = Simplest Checkout Experience = 81 82 Premium Packages features the simplest checkout system available - complete purchases in just 2 clicks for both guests and registered members. 83 84 = Abandoned Cart Recovery = 85 86 Recover lost sales with automated abandoned cart emails. Configure up to 5 follow-up emails at different intervals. Include dynamic coupon codes as a final incentive to complete the purchase. 57 87 58 88 = Save & Email Cart = 59 Add items to your cart, you can save it to complete the purchase later or email the saved cart to someone you want to pay for the items. 60 61 = Dynamic Product = 62 Need to accept quick payment through your site? Now, you even don't have to create a product anymore, Premium Package's dynamic product feature enables you to accept any one time or recurring payment just on the fly. 63 64 = Software Licensing = 65 Integrated Software Licensing option with this Digital Store add-on gives you a complete license key generation, key activation, and verification system. 89 90 Let customers save their cart to complete the purchase later, or email the cart contents to someone else (great for gift purchases or approval workflows). 91 92 = Dynamic Products = 93 94 Accept quick payments without creating products. Enable one-time or recurring payments on the fly - perfect for services, consulting, or custom quotes. 95 96 = Software Licensing System = 97 98 Complete software licensing solution with license key generation, domain activation, and verification API. Perfect for selling themes, plugins, and software. 66 99 67 100 = Automatic Order Expiration = 68 Premium Package Add-on has an option to set up a custom access period for the purchased items. Like if you provide 1-year free update of your software after someone purchases your digital item, you can set order expiration period 365 days and after 1 year ( 365 days ) customer will not be able to access his purchase, the order status will be expired, and he will have a "renew order" option in order details page. 69 70 = Automatic Order Renew = 71 As you already read, Premium Package has an "Automatic Order Expiration" option, probably you are wondering where is "Automatic Order Renew". Good news is, Premium Package has this feature too. If you enable the auto-renewal feature, on checkout the payment will be like a subscription/recurring payment and order will be renewed automatically at the end of each expiration period ( subscription-based pricing model ). Of course, you also can enable an order expiration and auto-renewal notification email for customers before you charge them. 72 73 = Easy Tax Option = 74 We have made the tax calculation is easier for you. From premium package settings, you can easily set up tax for different countries/states/cities just in few clicks. 75 101 102 Set custom access periods for purchased items. For example, offer 1-year updates - after 365 days, the order expires and customers see a renewal option. 103 104 = Automatic Order Renewal (Subscriptions) = 105 106 Enable subscription-based pricing with automatic recurring payments. Orders renew automatically at each expiration period. Send reminder emails before charging customers. 107 108 = Tax Management = 109 110 Simple yet powerful tax configuration. Set up tax rates for different countries, states, and cities in just a few clicks. Automatic tax calculation at checkout. 76 111 77 112 = At A Glance = 78 * Sell Digital Products Securely 79 * Accept payment without creating product using shortcode `[wpdmpp_pay_link]` 80 * Easy Administration 81 * PayPal Integrated 82 * User-role Based Discount Management 83 * Coupon Management 84 * Sales Tax 85 * Save Cart and Checkout Later 86 * Email Saved Cart 87 * Product & Price Variations ( License Based Pricing / Sell Extra Gigs with Product ) 88 * Promotional Pricing for Your Digital Products 89 * Abandoned Cart Recovery 90 * "Pay As You Want" pricing 91 * Invoice Generation 92 * The Easiest Checkout System 93 * Guest Checkout and Guest Download 94 * Order expiration option ( Like 1 year support & update access, then expire ) 95 * Auto-renew order option ( Accept Recurring Payment for Orders ) 96 * Easy Order Management 97 * Sales Notifications via Email 98 * Sales Notification Directly in Your Mobile with Push Message 99 * Very Detailed Sales Reports 100 * Manual order creation 101 * Order Notes & Messaging System 102 * Extended Product Licensing System 103 * License Level Pricing 104 * Easy to implement license API for license system integration 105 106 = Pay with Crypto = 107 [WPDM – Crypto Connect](https://www.wpdownloadmanager.com/download/wpdm-crypto-connect/) to accept crypto payment directly. 113 114 * Sell Digital Products Securely 115 * **NEW: Mini Cart Widget** with multiple display styles 116 * Accept payment without creating products using `[wpdmpp_pay_link]` 117 * Easy Administration Dashboard 118 * PayPal Integration (more gateways available as add-ons) 119 * User Role-Based Discount Management 120 * Comprehensive Coupon System 121 * Flexible Sales Tax Configuration 122 * Save Cart and Checkout Later 123 * Email Cart to Others 124 * Product & Price Variations (License-Based Pricing) 125 * Promotional/Sale Pricing 126 * Abandoned Cart Recovery with Email Sequences 127 * "Pay As You Want" Pricing Option 128 * Professional Invoice Generation 129 * The Easiest 2-Click Checkout 130 * Guest Checkout and Guest Download Support 131 * Order Expiration (e.g., 1-year support access) 132 * Auto-Renewal/Subscription Orders 133 * Complete Order Management 134 * Sales Email Notifications 135 * Mobile Push Notifications 136 * Detailed Sales Reports & Charts 137 * Manual Order Creation 138 * Order Notes & Customer Messaging 139 * Software License Key System 140 * License-Level Pricing Tiers 141 * REST API for License Verification 142 143 = Cryptocurrency Payments = 144 145 Accept crypto payments directly with [WPDM – Crypto Connect](https://www.wpdownloadmanager.com/download/wpdm-crypto-connect/). 108 146 109 147 = Need More Features? = 110 * Full-featured Digital Products Marketplace with Front-end product submission & payout management ( This Feature Requires WPDM v4+ ) 111 * Sell individual files ( like a single song from an album ) ( This Feature Requires WPDM v4+ ) 112 * and [much more...](https://www.wpdownloadmanager.com/downloads/ecommerce-add-ons/) 113 148 149 * Full-featured Digital Marketplace with frontend product submission & vendor payouts *(Requires WPDM v4+)* 150 * Sell individual files (like single songs from an album) *(Requires WPDM v4+)* 151 * Additional payment gateways: Stripe, Authorize.net, Mollie, Razorpay, and more 152 * [Browse all eCommerce add-ons](https://www.wpdownloadmanager.com/downloads/ecommerce-add-ons/) 153 154 = Documentation & Support = 155 156 * [Documentation](https://www.wpdownloadmanager.com/doc-category/premium-package/) 157 * [Support Forum](https://www.wpdownloadmanager.com/support/) 158 * [Feature Requests](https://www.wpdownloadmanager.com/support/) 159 160 == Installation == 161 162 1. Upload the `wpdm-premium-packages` folder to `/wp-content/plugins/` 163 2. Activate the plugin through the 'Plugins' menu in WordPress 164 3. Make sure [WordPress Download Manager](https://wordpress.org/plugins/download-manager/) is installed and activated 165 4. Go to Downloads → Settings → Premium Packages to configure payment options 166 5. Add prices to your download packages to start selling 167 168 == Frequently Asked Questions == 169 170 = Do I need WordPress Download Manager to use this plugin? = 171 172 Yes, Premium Packages is an add-on for WordPress Download Manager. You need to install and activate the free [WordPress Download Manager](https://wordpress.org/plugins/download-manager/) plugin first. 173 174 = What payment methods are supported? = 175 176 PayPal is included by default. Additional payment gateways like Stripe, Authorize.net, Mollie, Razorpay, and cryptocurrency are available as separate add-ons. 177 178 = Can I sell subscriptions/recurring products? = 179 180 Yes! Premium Packages supports automatic order renewal with recurring payments through PayPal subscriptions. 181 182 = Is guest checkout supported? = 183 184 Yes, customers can complete purchases without creating an account. They receive an order access link via email. 185 186 = How do I add the Mini Cart to my site? = 187 188 You can either enable auto-injection in Settings, use the shortcode `[wpdmpp_mini_cart]`, or add the CSS class `wpdmpp-minicart` to any navigation menu item. 189 190 = Can I customize the invoice template? = 191 192 Yes, Premium Packages includes multiple invoice templates with customization options. 193 194 == Screenshots == 195 196 1. Shopping Cart Page 197 2. Checkout Page 198 3. Order Management 199 4. Sales Reports 200 5. Coupon Management 201 6. Mini Cart Widget 202 7. Product Pricing Options 203 8. License Management 114 204 115 205 == Changelog == 206 207 = 6.2.0 - 2026.01.02 = 208 * **NEW: Mini Cart Widget** - Modern shopping cart widget with three display styles (dropdown, slide panel, floating) 209 * Added Mini Cart shortcode `[wpdmpp_mini_cart]` for flexible placement 210 * Added Mini Cart nav menu integration - add cart to any menu using CSS class `wpdmpp-minicart` 211 * Added Mini Cart REST API endpoints for real-time cart updates 212 * Added comprehensive Mini Cart settings panel with color customization 213 * Added mobile-optimized full-screen cart mode 214 * Added customer export option on product/package edit page - export customer list with order details as CSV 215 * Improved overall shopping experience with instant cart feedback 116 216 117 217 = 6.1.3 - 2025.12.22 = … … 126 226 = 6.1.1 - 2025.12.20 = 127 227 * Compatibility update for the latest versions of WPDM and WPDM Pro 128 * Overall UI Improvements228 * Overall UI improvements 129 229 130 230 = 6.1.0 - 2025.11.05 = … … 138 238 139 239 = 6.0.7 - 2025.10.06 = 140 * Fixed an issue with `[wpdmpp_buynow]` shortcode ( reported by Darius Sveikauskas from Patchstack)240 * Fixed an issue with `[wpdmpp_buynow]` shortcode (reported by Darius Sveikauskas from Patchstack) 141 241 142 242 = 6.0.6 - 2025.09.04 = … … 145 245 = 6.0.5 - 2025.09.01 = 146 246 * Fixed a CSS issue on the front-end order details page 147 * Added a new cron job to send daily sales summ ery email247 * Added a new cron job to send daily sales summary email 148 248 149 249 = 6.0.4 - 2025.08.19 = 150 * Improved front-end ui250 * Improved front-end UI 151 251 152 252 = 6.0.3 - 2025.08.11 = … … 161 261 162 262 = 6.0.0 - 2025.04.17 = 163 * Fixed an issue with non nce verification with order functions263 * Fixed an issue with nonce verification with order functions 164 264 165 265 = 5.9.9 - 2025.03.11 = 166 * Improved front-end ui266 * Improved front-end UI 167 267 168 268 = 5.9.8 - 2025.01.29 = 169 269 * Fixed an issue with the payment settings 170 * Added support for OpenAI and Gemini ( Requires WPDM v6.7+)270 * Added support for OpenAI and Gemini (Requires WPDM v6.7+) 171 271 172 272 = 5.9.7 - 2024.12.31 = 173 * Fixed an issue with the `orderby` option on the admin orders page ( reported by patchstack)273 * Fixed an issue with the `orderby` option on the admin orders page (reported by Patchstack) 174 274 175 275 = 5.9.6 - 2024.12.12 = … … 177 277 178 278 = 5.9.5 - 2024.11.23 = 179 * Fixed an issue with `wpdmpp_cart_page` function ( reported by Wordfence)279 * Fixed an issue with `wpdmpp_cart_page` function (reported by Wordfence) 180 280 181 281 = 5.9.4 - 2024.11.20 = … … 188 288 189 289 = 5.9.2 - 2024.09.24 = 190 * Fixed a nonce key verification issue with refund option with admin order details ( Reported by Wordfence)290 * Fixed a nonce key verification issue with refund option in admin order details (reported by Wordfence) 191 291 192 292 = 5.9.1 - 2024.08.25 = … … 194 294 195 295 = 5.9.0 - 2024.08.12 = 196 * Fixed an issue with the currency sign with thecompleted orders296 * Fixed an issue with the currency sign with completed orders 197 297 198 298 = 5.8.9 - 2024.08.05 = 199 * Enhanced System Optimization and Compatibility Assurance Update299 * Enhanced system optimization and compatibility assurance update 200 300 201 301 = 5.8.8 - 2024.07.28 = … … 245 345 = 5.7.5 - 2023.08.11 = 246 346 * Fixed a PHP 8.2 compatibility issue 247 * Fixed an arbitrary user meta update vulnerability issue , reported by Wordfance347 * Fixed an arbitrary user meta update vulnerability issue (reported by Wordfence) 248 348 249 349 = 5.7.4 - 2023.08.08 = … … 252 352 253 353 = 5.7.3 - 2023.07.31 = 254 * Compatibility update for WordPres 6.3354 * Compatibility update for WordPress 6.3 255 355 * Improved order notes 256 356 * Improved invoice template … … 258 358 = 5.7.2 - 2023.05.15 = 259 359 * Improved manual order renewal option 260 * Fixed an issue with admin order details page for non-existent order id360 * Fixed an issue with admin order details page for non-existent order ID 261 361 262 362 = 5.7.1 - 2023.05.06 = … … 264 364 265 365 = 5.7.0 - 2023.05.05 = 266 * Improved manual order renewal option ,you can now enable it for individual orders too366 * Improved manual order renewal option - you can now enable it for individual orders too 267 367 268 368 = 5.6.9 - 2023.05.02 = 269 * Added option to disable manual renewal of expired orders , when disabled, customer can clone the order in a single click to createnew one and checkout369 * Added option to disable manual renewal of expired orders - when disabled, customers can clone the order in a single click to create a new one and checkout 270 370 271 371 = 5.6.8 - 2023.05.01 = … … 275 375 = 5.6.7 - 2023.04.14 = 276 376 * Improved custom order creation option 277 * Added new hook `wpdmpp_before_addtocart` to manipulate product info before it is being addedto cart278 * Fixed a notice with server httpreferer variable377 * Added new hook `wpdmpp_before_addtocart` to manipulate product info before adding to cart 378 * Fixed a notice with server HTTP referer variable 279 379 280 380 = 5.6.6 - 2023.03.29 = … … 283 383 284 384 = 5.6.5 - 2023.03.27 = 285 * Added several 4 new action hooks on admin order details page ( `/includes/menus/templates/orders/view-order.php`)385 * Added several new action hooks on admin order details page (`/includes/menus/templates/orders/view-order.php`) 286 386 * Added filter hook `wpdmpp_update_order` to modify order data before update 287 387 * Added action hook `wpdmpp_order_updated` after order has been updated … … 293 393 294 394 = 5.6.3 - 2023.01.28 = 295 * Improved coupon option , product specific coupon codecan be handled using global cart coupon field395 * Improved coupon option - product-specific coupon codes can be handled using global cart coupon field 296 396 * Improved invoice options 297 397 … … 303 403 304 404 = 5.6.0 - 2023.01.27 = 305 * Added new option for admin only activation of payment methods405 * Added new option for admin-only activation of payment methods 306 406 * Fixed an issue with the country and state selection dropdown 307 407 … … 313 413 314 414 = 5.5.7 - 2022.11.28 = 315 * Fixed a compatibility issue with the older version of wpdm415 * Fixed a compatibility issue with the older version of WPDM 316 416 317 417 = 5.5.6 - 2022.11.28 = … … 320 420 = 5.5.5 - 2022.11.21 = 321 421 * Improved admin order details 322 * Fixed a js issue with pay now option for the processing/pending orderin user dashboard422 * Fixed a JS issue with pay now option for processing/pending orders in user dashboard 323 423 324 424 = 5.5.4 - 2022.11.18 = 325 * Fixed a jsissue with the billing form validation425 * Fixed a JS issue with the billing form validation 326 426 327 427 = 5.5.3 - 2022.11.14 = … … 343 443 344 444 = 5.4.8 - 2022.10.12 = 345 * Improved coupon code section , now you can review all orders which used any specific coupon code fromcoupons page445 * Improved coupon code section - now you can review all orders that used any specific coupon code from the coupons page 346 446 347 447 = 5.4.7 - 2022.10.10 = … … 352 452 353 453 = 5.4.5 - 2022.10.05 = 354 * Improved dynamic product and payment link option to accept both recurring and one-time payment 454 * Improved dynamic product and payment link option to accept both recurring and one-time payments 355 455 356 456 = 5.4.4 - 2022.10.04 = … … 362 462 = 5.4.2 - 2022.09.13 = 363 463 * Improved payment request option 364 * Improved coupon code option ,now you can auto-apply a coupon on checkout464 * Improved coupon code option - now you can auto-apply a coupon on checkout 365 465 366 466 = 5.4.1 - 2022.09.04 = … … 374 474 375 475 = 5.3.8 - 2022.08.08 = 376 * Added new shortcode `wpdmpp_pay_link` to generate payment link without creating new product476 * Added new shortcode `wpdmpp_pay_link` to generate payment links without creating new products 377 477 378 478 = 5.3.7 - 2022.07.25 = … … 381 481 = 5.3.6 - 2022.06.02 = 382 482 * Compatibility update for WordPress 6.0 383 * Added new option to recalculate customer s value483 * Added new option to recalculate customer values 384 484 * Optimized admin orders list page 385 485 386 486 = 5.3.5 - 2022.03.31 = 387 * Fixed a cssissue with invoice template487 * Fixed a CSS issue with invoice template 388 488 389 489 = 5.3.4 - 2022.03.23 = … … 394 494 395 495 = 5.3.2 - 2022.03.17 = 396 * Fixed an issue with t pl dirpath496 * Fixed an issue with template directory path 397 497 * Improved admin order details page view 398 498 … … 423 523 424 524 = 5.2.3 - 2021.11.12 = 425 * Fixed an issue with the coupon code and paypal checkout525 * Fixed an issue with the coupon code and PayPal checkout 426 526 427 527 = 5.2.2 - 2021.11.02 = … … 433 533 434 534 = 5.2.0 - 2021.10.25 = 435 * Updated paypal apiversion535 * Updated PayPal API version 436 536 437 537 = 5.1.9 - 2021.10.18 = 438 * Fixed an issue with the add to cart function throwingwhen role discount is empty538 * Fixed an issue with the add to cart function when role discount is empty 439 539 * Improved user orders list page 440 540 … … 446 546 447 547 = 5.1.6 - 2021.09.13 = 448 * Fixed an issue with the role based discount calculation on order detail page548 * Fixed an issue with the role-based discount calculation on order detail page 449 549 450 550 = 5.1.5 - 2021.09.12 = 451 * Fixed an issue with the role based discount551 * Fixed an issue with the role-based discount 452 552 453 553 = 5.1.4 - 2021.09.12 = 454 * Fixed an issue with cart ( global) coupon code554 * Fixed an issue with cart (global) coupon code 455 555 456 556 = 5.1.3 - 2021.08.30 = … … 461 561 462 562 = 5.1.1 - 2021.08.22 = 463 * Removed some console log from front-end563 * Removed some console logs from front-end 464 564 465 565 = 5.1.0 - 2021.08.22 = … … 467 567 468 568 = 5.0.9 - 2021.08.18 = 469 * Fixed an issue with the product specific coupon569 * Fixed an issue with the product-specific coupon 470 570 471 571 = 5.0.8 - 2021.08.15 = 472 * Fixed tax calculation issue with paypal when smart button is active473 * Fixed an issue with the premium download url572 * Fixed tax calculation issue with PayPal when smart button is active 573 * Fixed an issue with the premium download URL 474 574 475 575 = 5.0.7 - 2021.08.14 = … … 482 582 483 583 = 5.0.5 - 2021.08.04 = 484 * Improved product sea ch option with new order / coupon /license485 * Compatibility adjustment for theWPDM 3.2.13584 * Improved product search option with new order/coupon/license 585 * Compatibility adjustment for WPDM 3.2.13 486 586 487 587 = 5.0.4 - 2021.07.25 = 488 * Reinstated `[base_price]` and `[sales_price]` tag , they will show formatted price now.588 * Reinstated `[base_price]` and `[sales_price]` tags - they now show formatted prices 489 589 * Fixed an issue with the text domain constant 490 590 … … 499 599 500 600 = 5.0.0 - 2021.07.04 = 501 * Fixed session issue for ipv6601 * Fixed session issue for IPv6 502 602 * Compatibility update for Download Manager v6.0 and v3.2 503 603 504 604 = 4.7.2 - 2021.02.03 = 505 * Fixed an dissue with customer profile page for deleted customers605 * Fixed an issue with customer profile page for deleted customers 506 606 507 607 = 4.7.1 - 2021.02.03 = … … 509 609 510 610 = 4.7.0 - 2021.01.12 = 511 * Added payment gateway credential validation check option .512 * Fixed the individual file download issue for license specific files with purchased items611 * Added payment gateway credential validation check option 612 * Fixed the individual file download issue for license-specific files with purchased items 513 613 514 614 = 4.6.9 - 2020.11.24 = 515 * Fixed the billing info update issue with the paypal checkout615 * Fixed the billing info update issue with the PayPal checkout 516 616 517 617 = 4.6.8 - 2020.11.21 = 518 * Fixed a jsissue with extra gigs selection checkbox618 * Fixed a JS issue with extra gigs selection checkbox 519 619 520 620 = 4.6.7 - 2020.10.24 = 521 * Fixed an issue with the license validation for any package with no fileattached621 * Fixed an issue with the license validation for packages with no files attached 522 622 523 623 = 4.6.6 - 2020.10.01 = … … 527 627 528 628 = 4.6.5 - 2020.09.10 = 529 * Fixed an issue with license specific file selection option629 * Fixed an issue with license-specific file selection option 530 630 531 631 = 4.6.4 - 2020.09.02 = … … 539 639 540 640 = 4.6.1 - 2020.08.28 = 541 * Fixed a nwarning with user order details page641 * Fixed a warning with user order details page 542 642 * Added option to disable multi-file download for purchased items 543 643 … … 545 645 * Compatibility update for WordPress 5.5 546 646 * Improved cart page 547 * Added license based file selection option647 * Added license-based file selection option 548 648 549 649 = 4.5.9 - 2020.07.20 = … … 555 655 556 656 = 4.5.7 - 2020.05.22 = 557 * Updated order details page ( customer view)657 * Updated order details page (customer view) 558 658 559 659 = 4.5.6 - 2020.05.16 = … … 561 661 562 662 = 4.5.5 - 2020.05.13 = 563 * Updated default value for order validity period ( 365 days)663 * Updated default value for order validity period (365 days) 564 664 565 665 = 4.5.4 - 2020.05.13 = … … 567 667 568 668 = 4.5.3 - 2020.05.12 = 569 * Fixed an issue with paypal gateway update from admin order details page570 * Updated order renewal feature ,improved manual order renewal experience669 * Fixed an issue with PayPal gateway update from admin order details page 670 * Updated order renewal feature with improved manual order renewal experience 571 671 572 672 = 4.5.2 - 2020.05.11 = … … 587 687 588 688 = 4.4.8 - 2020.04.28 = 589 * Fixed order title issue with paypal689 * Fixed order title issue with PayPal 590 690 591 691 = 4.4.7 - 2020.04.28 = … … 598 698 = 4.4.5 - 2020.04.16 = 599 699 * Fixed variable replacement issue with order title 600 * Fixed a nwarning with the guest order billing info700 * Fixed a warning with the guest order billing info 601 701 * Improved internal codebase and API 602 702 … … 628 728 629 729 = 4.3.7 - 2019.11.22 = 630 * Fixed an issue with the PayPal buy bow button730 * Fixed an issue with the PayPal buy now button 631 731 632 732 = 4.3.6 - 2019.11.20 = … … 653 753 = 4.3.0 - 2019.09.07 = 654 754 * Added order status option for cash and check payment 655 * Added new option to set custom redirect urlfor Cash and Check payment gateway755 * Added new option to set custom redirect URL for Cash and Check payment gateway 656 756 657 757 = 4.2.9 - 2019.09.03 = … … 664 764 * Fixed an issue with the guest order and download 665 765 666 667 766 = 4.2.7 - 2019.07.16 = 668 767 * Fixed an issue with invoice for admin 669 768 670 769 = 4.2.6 - 2019.07.15 = 671 * Fixed an issue with " top selling item" widget on dashboard770 * Fixed an issue with "Top Selling Item" widget on dashboard 672 771 * Fixed an issue with "Pay as you want" 673 772 … … 676 775 677 776 = 4.2.4 - 2019.06.26 = 678 * Fixed an issue with tax calculation on the load of the checkout page777 * Fixed an issue with tax calculation on checkout page load 679 778 * Fixed an issue with the download function 680 779 … … 690 789 691 790 = 4.2.0 - 2019.04.17 = 692 * Added a new option to enable/disable role based discount693 * Added a new option to enable/disable product specific coupon791 * Added a new option to enable/disable role-based discount 792 * Added a new option to enable/disable product-specific coupon 694 793 * Improved session management 695 794 … … 715 814 716 815 = 4.0.8 - 2018.12.08 = 717 * Removed hardcoded PayPal sandbox api urland keys816 * Removed hardcoded PayPal sandbox API URL and keys 718 817 719 818 = 4.0.7 - 2018.12.08 = … … 744 843 745 844 = 4.0.2 - 2018.08.12 = 746 * Fixed 2 input validation issues ( /includes/libs/cart.php)845 * Fixed 2 input validation issues (`/includes/libs/cart.php`) 747 846 748 847 = 4.0.1 - 2018.08.11 = … … 757 856 = 3.9.9 - 2018.07.12 = 758 857 * Added download history in order details page 759 * Fixed issue with empty transaction ID when auto-renew an order760 * Fixed an dissue with payout option858 * Fixed issue with empty transaction ID when auto-renewing an order 859 * Fixed an issue with payout option 761 860 762 861 = 3.9.8 - 2018.07.05 = … … 779 878 * Fixed issue with add coupon 780 879 * Updated Font Awesome (v5) 781 * Updated "Pay As You Want" option , now also have support forminimum price 0.00880 * Updated "Pay As You Want" option - now also supports minimum price 0.00 782 881 783 882 = 3.9.3 - 2018.05.16 = … … 785 884 786 885 = 3.9.2 - 2018.05.13 = 787 * Added wpdmrequirement notice886 * Added WPDM requirement notice 788 887 789 888 = 3.9.1 - 2018.05.13 = … … 791 890 792 891 = 3.8.9 = 793 * Template Optimization,you can personalize templates more easily now892 * Template optimization - you can personalize templates more easily now 794 893 * Fixed JS issue in frontend add new page 795 * Added currency symbol position ( before and after amount) option894 * Added currency symbol position (before and after amount) option 796 895 * Fixed save cart error 797 896 798 897 = 3.8.6 = 799 * Added " As You Want To Pay" option898 * Added "Pay As You Want" option 800 899 * Fixed issue with cart discount calculation after deleting a cart item 801 900 … … 805 904 806 905 = 3.8.4 = 807 * Added new option for coupon code expir edate906 * Added new option for coupon code expiration date 808 907 * Improved free download option for premium packages 809 908 … … 824 923 = 3.5.7 = 825 924 * Fixed issue with Save Cart feature in cart page 826 * Fixed Frontend uploader metabox issue ( Not loading Premium Package Data like price, variations etc)925 * Fixed Frontend uploader metabox issue (Not loading Premium Package Data like price, variations etc) 827 926 828 927 = 3.5.6 = 829 * Fixed issue decimal point in order total928 * Fixed issue with decimal point in order total 830 929 * Fixed issue with country dropdown in billing address 831 930 * Fixed issue with default payment method integration 931 932 == Upgrade Notice == 933 934 = 6.2.0 = 935 New Mini Cart widget with three display styles, nav menu integration, and REST API support. Recommended update for all users. -
wpdm-premium-packages/trunk/wpdm-premium-packages.php
r3425716 r3431044 4 4 * Plugin URI: https://www.wpdownloadmanager.com/download/premium-package-complete-digital-store-solution/ 5 5 * Description: Complete solution for selling digital products securely and easily 6 * Version: 6. 1.36 * Version: 6.2.0 7 7 * Author: WordPress Download Manager 8 8 * Text Domain: wpdm-premium-packages … … 41 41 */ 42 42 43 define( 'WPDMPP_VERSION', '6. 1.3' );43 define( 'WPDMPP_VERSION', '6.2.0' ); 44 44 define( 'WPDMPP_BASE_DIR', dirname( __FILE__ ) . '/' ); 45 45 define( 'WPDMPP_BASE_URL', plugins_url( 'wpdm-premium-packages/' ) ); … … 331 331 // Cart Widget 332 332 include_once( dirname( __FILE__ ) . "/includes/widgets/widget-cart.php" ); 333 334 // Mini Cart (Modern) 335 include_once( dirname( __FILE__ ) . "/includes/libs/MiniCartAPI.php" ); 336 include_once( dirname( __FILE__ ) . "/includes/libs/MiniCart.php" ); 337 \WPDMPP\Libs\MiniCartAPI::init(); 338 \WPDMPP\Libs\MiniCart::init(); 333 339 334 340 // Integrated payment mothods
Note: See TracChangeset
for help on using the changeset viewer.