Changeset 3180675
- Timestamp:
- 11/03/2024 12:39:45 PM (15 months ago)
- Location:
- jkm-force-sells/trunk
- Files:
-
- 6 edited
-
includes/class-jkmfs.php (modified) (2 diffs)
-
includes/utils/class-jkmfs-utils.php (modified) (1 diff)
-
jkm-force-sells.php (modified) (2 diffs)
-
languages/jkm-force-sells.pot (modified) (3 diffs)
-
public/class-jkmfs-public.php (modified) (4 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jkm-force-sells/trunk/includes/class-jkmfs.php
r3171794 r3180675 133 133 'jkmfs_display_settings' 134 134 ); 135 136 add_settings_field( 137 'jkmfs_show_price', 138 __('Show Product Prices', 'jkm-force-sells'), 139 array($this, 'jkmfs_show_price_field_callback'), 140 'jkmfs_force_sell_settings', 141 'jkmfs_display_settings' 142 ); 135 143 } 136 144 … … 170 178 } 171 179 180 public function jkmfs_show_price_field_callback() { 181 $options = get_option('jkmfs_settings'); 182 $show_price = isset($options['show_price']) ? $options['show_price'] : 'no'; 183 ?> 184 <input type="checkbox" name="jkmfs_settings[show_price]" value="yes" <?php checked($show_price, 'yes'); ?> /> 185 <label for="jkmfs_settings[show_price]"><?php esc_html_e('Show product prices', 'jkm-force-sells'); ?></label> 186 <?php 187 } 188 172 189 public function add_settings_link($links) { 173 190 $settings_link = '<a href="' . esc_url(admin_url('edit.php?post_type=product&page=jkmfs_force_sell_settings')) . '">' . __('Settings', 'jkm-force-sells') . '</a>'; -
jkm-force-sells/trunk/includes/utils/class-jkmfs-utils.php
r3171794 r3180675 7 7 * 8 8 * @package jkm-force-sells 9 * @subpackage jkm-force-sells/ admin/utils9 * @subpackage jkm-force-sells/includes/utils 10 10 */ 11 11 -
jkm-force-sells/trunk/jkm-force-sells.php
r3171794 r3180675 4 4 * Description: Automatically add selected products to the cart with a main item, creating smart bundles effortlessly. 5 5 * Author: Jamsheed KM 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Author URI: https://github.com/kmjamsheed0 8 8 * Plugin URI: https://github.com/kmjamsheed0/jkm-force-sells … … 45 45 46 46 public function init() { 47 define('JKMFS_VERSION', '1. 0.0');47 define('JKMFS_VERSION', '1.1.0'); 48 48 !defined('JKMFS_BASE_NAME') && define('JKMFS_BASE_NAME', plugin_basename( __FILE__ )); 49 49 !defined('JKMFS_PATH') && define('JKMFS_PATH', plugin_dir_path( __FILE__ )); -
jkm-force-sells/trunk/languages/jkm-force-sells.pot
r3171794 r3180675 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Force Sells and Smart Bundles for WooCommerce 1. 0.0\n"5 "Project-Id-Version: Force Sells and Smart Bundles for WooCommerce 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/jkm-force-sells\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-1 0-12T08:36:18+00:00\n"12 "POT-Creation-Date: 2024-11-03T12:01:28+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 0.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: jkm-force-sells\n" 16 16 … … 90 90 91 91 #: includes/class-jkmfs.php:138 92 msgid "Show Product Prices" 93 msgstr "" 94 95 #: includes/class-jkmfs.php:146 92 96 msgid "Configure the display settings for force-sell products." 93 97 msgstr "" 94 98 95 #: includes/class-jkmfs.php:1 4699 #: includes/class-jkmfs.php:154 96 100 msgid "Before Add to Cart Button" 97 101 msgstr "" 98 102 99 #: includes/class-jkmfs.php:1 47103 #: includes/class-jkmfs.php:155 100 104 msgid "After Add to Cart Button" 101 105 msgstr "" 102 106 103 #: includes/class-jkmfs.php:1 57107 #: includes/class-jkmfs.php:165 104 108 msgid "List View" 105 109 msgstr "" 106 110 107 #: includes/class-jkmfs.php:1 58111 #: includes/class-jkmfs.php:166 108 112 msgid "Grid View" 109 113 msgstr "" 110 114 111 #: includes/class-jkmfs.php:1 68115 #: includes/class-jkmfs.php:176 112 116 msgid "Show product images" 113 117 msgstr "" 114 118 115 #: includes/class-jkmfs.php:173 119 #: includes/class-jkmfs.php:185 120 msgid "Show product prices" 121 msgstr "" 122 123 #: includes/class-jkmfs.php:190 116 124 msgid "Settings" 117 125 msgstr "" 118 126 119 #: public/class-jkmfs-public.php: 69127 #: public/class-jkmfs-public.php:72 120 128 msgid "The following product(s) will also be added to your cart:" 121 129 msgstr "" 122 130 123 131 #. translators: %s: Product title 124 #: public/class-jkmfs-public.php:1 63132 #: public/class-jkmfs-public.php:190 125 133 msgid "%s will also be removed as they're sold together." 126 134 msgstr "" 127 135 128 #: public/class-jkmfs-public.php:2 24136 #: public/class-jkmfs-public.php:251 129 137 msgid "Linked to" 130 138 msgstr "" -
jkm-force-sells/trunk/public/class-jkmfs-public.php
r3171794 r3180675 50 50 $product_datas[$product_id] = array( 51 51 'title' => $prd->get_name(), // Get product name 52 'image' => $prd->get_image() // Get product image 52 'image' => $prd->get_image(), // Get product image 53 'price' => $prd->get_price_html() // Get formatted price HTML 53 54 ); 54 55 } … … 60 61 $view_type = isset($options['display_type']) ? $options['display_type'] : 'list'; 61 62 $show_images = isset($options['show_images']) ? $options['show_images'] : 'no'; 63 $show_price = isset($options['show_price']) ? $options['show_price'] : 'no'; 62 64 63 65 // Apply filters to allow customization of these settings 64 66 $view_type = apply_filters('jkmfs_products_display_type', $view_type); 65 67 $show_images = apply_filters('jkmfs_show_products_images', $show_images); 68 $show_price = apply_filters('jkmfs_show_products_prices', $show_price); 66 69 67 70 echo '<div class="clear"></div>'; … … 75 78 foreach ($product_datas as $data) { 76 79 echo '<div class="jkmfs-force-sell-item">'; 80 81 // Display product image 77 82 if ($show_images === 'yes' && !empty($data['image'])) { 78 83 79 84 echo '<div class="jkmfs-force-sell-image">' . wp_kses_post($data['image']) . '</div>'; 80 85 } 86 87 echo '<div class="jkmfs-force-sell-title-wrapper">'; 88 //Display title 81 89 echo '<div class="jkmfs-force-sell-title">' . esc_html($data['title']) . '</div>'; // Title below image 90 91 // Display product price 92 if ($show_price === 'yes' && !empty($data['price'])) { 93 echo '<div class="jkmfs-force-sell-price">(' . wp_kses_post($data['price']) . ')</div>'; 94 } 95 96 echo '</div>'; 82 97 echo '</div>'; 83 98 } … … 90 105 foreach ($product_datas as $data) { 91 106 echo '<li class="jkmfs-force-sell-item">'; 107 108 // Display product image 92 109 if ($show_images === 'yes' && !empty($data['image'])) { 93 110 94 111 echo '<div class="jkmfs-force-sell-image">' . wp_kses_post($data['image']) . '</div>'; 95 112 } 113 114 echo '<div class="jkmfs-force-sell-title-wrapper">'; 115 // Display product title 96 116 echo '<div class="jkmfs-force-sell-title">' . esc_html($data['title']) . '</div>'; // Title next to image 117 118 // Display product price 119 if ($show_price === 'yes' && !empty($data['price'])) { 120 echo '<div class="jkmfs-force-sell-price">(' . wp_kses_post($data['price']) . ')</div>'; 121 } 122 123 echo '</div>'; 97 124 echo '</li>'; 98 125 } -
jkm-force-sells/trunk/readme.txt
r3171846 r3180675 6 6 Tested up to: 6.7 7 7 Requires PHP: 5.6 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 29 29 - Choose to display force-sell items in a list or grid view. 30 30 - Option to show or hide force-sell product images. 31 - Option to show or hide force-sell product prices. 31 32 32 33 **2. Additional Display Positions:** … … 68 69 - `jkmfs_products_display_type`: Control the display type (e.g., list, grid) for force sell products. 69 70 - `jkmfs_show_products_images`: Enable or disable the display of product images for force sell products. 71 - `jkmfs_show_products_prices`: Enable or disable the display of product prices for force sell products. 70 72 - `jkmfs_force_sell_add_to_cart_product`: Customize parameters for adding a force sell product to the cart. 71 73 - `jkmfs_force_sell_disallow_no_stock`: Control whether out-of-stock products are disallowed for force sell. … … 74 76 == Screenshots == 75 77 1. Add force sell products. 78 2. List View. 79 3. Grid View. 76 80 77 81 == Changelog == 82 83 = 1.1.0 = 84 * Added: New feature to display product price of force-selling products. 85 * Added: Compatibility with WooCommerce 9.4. 86 * Added: Compatibility with WordPress 6.7. 78 87 79 88 = 1.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.