Changeset 3811305
- Timestamp:
- 11/19/2026 11:03:54 AM (18 hours ago)
- Location:
- devtonic-quote-requests-for-woocommerce
- Files:
-
- 82 added
- 10 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/css (added)
-
tags/1.0.4/assets/css/devtonic-qr-admin.css (added)
-
tags/1.0.4/assets/css/devtonic-qr-frontend.css (added)
-
tags/1.0.4/assets/js (added)
-
tags/1.0.4/assets/js/devtonic-qr-admin-create-quote.js (added)
-
tags/1.0.4/assets/js/devtonic-qr-admin-settings.js (added)
-
tags/1.0.4/assets/js/devtonic-qr-cart-to-quote-placement.js (added)
-
tags/1.0.4/assets/js/devtonic-qr-frontend.js (added)
-
tags/1.0.4/devtonic-quote-requests-for-woocommerce.php (added)
-
tags/1.0.4/includes (added)
-
tags/1.0.4/includes/admin (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin-create-quote.php (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin-product-meta.php (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin-quote-edit.php (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin-quotes-list.php (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin-settings.php (added)
-
tags/1.0.4/includes/admin/class-devtonic-qr-admin.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-ajax.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-basket.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-cleanup.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-install.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-post-types.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-price-visibility.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-quote-manager.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-quote-number.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-quote.php (added)
-
tags/1.0.4/includes/class-devtonic-qr-statuses.php (added)
-
tags/1.0.4/includes/class-devtonic-qr.php (added)
-
tags/1.0.4/includes/compat (added)
-
tags/1.0.4/includes/compat/class-devtonic-qr-hpos-compat.php (added)
-
tags/1.0.4/includes/emails (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-base.php (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-manager.php (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-new-quote.php (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-quote-accepted.php (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-quote-declined.php (added)
-
tags/1.0.4/includes/emails/class-devtonic-qr-email-quote-received.php (added)
-
tags/1.0.4/includes/frontend (added)
-
tags/1.0.4/includes/frontend/bricks (added)
-
tags/1.0.4/includes/frontend/bricks/class-devtonic-qr-bricks-mini-basket.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-account-quotes.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-button.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-cart-converter.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-form.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-frontend.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-mini-basket-widget.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-mini-basket.php (added)
-
tags/1.0.4/includes/frontend/class-devtonic-qr-shortcodes.php (added)
-
tags/1.0.4/includes/frontend/elementor (added)
-
tags/1.0.4/includes/frontend/elementor/class-devtonic-qr-elementor-mini-basket.php (added)
-
tags/1.0.4/includes/helpers (added)
-
tags/1.0.4/includes/helpers/class-devtonic-qr-logger.php (added)
-
tags/1.0.4/includes/helpers/functions-devtonic-qr.php (added)
-
tags/1.0.4/languages (added)
-
tags/1.0.4/languages/devtonic-quote-requests-for-woocommerce.pot (added)
-
tags/1.0.4/languages/index.php (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/templates (added)
-
tags/1.0.4/templates/basket (added)
-
tags/1.0.4/templates/basket/basket.php (added)
-
tags/1.0.4/templates/basket/empty-basket.php (added)
-
tags/1.0.4/templates/emails (added)
-
tags/1.0.4/templates/emails/admin-new-quote.php (added)
-
tags/1.0.4/templates/emails/customer-quote-accepted.php (added)
-
tags/1.0.4/templates/emails/customer-quote-declined.php (added)
-
tags/1.0.4/templates/emails/customer-quote-received.php (added)
-
tags/1.0.4/templates/emails/plain (added)
-
tags/1.0.4/templates/emails/plain/admin-new-quote.php (added)
-
tags/1.0.4/templates/emails/plain/customer-quote-accepted.php (added)
-
tags/1.0.4/templates/emails/plain/customer-quote-declined.php (added)
-
tags/1.0.4/templates/emails/plain/customer-quote-received.php (added)
-
tags/1.0.4/templates/form (added)
-
tags/1.0.4/templates/form/quote-form.php (added)
-
tags/1.0.4/templates/form/quote-submitted.php (added)
-
tags/1.0.4/templates/myaccount (added)
-
tags/1.0.4/templates/myaccount/quotes-list.php (added)
-
tags/1.0.4/templates/myaccount/view-quote.php (added)
-
tags/1.0.4/templates/single-product (added)
-
tags/1.0.4/templates/single-product/add-to-quote-button.php (added)
-
tags/1.0.4/uninstall.php (added)
-
trunk/devtonic-quote-requests-for-woocommerce.php (modified) (3 diffs)
-
trunk/includes/admin/class-devtonic-qr-admin-product-meta.php (modified) (3 diffs)
-
trunk/includes/admin/class-devtonic-qr-admin-settings.php (modified) (3 diffs)
-
trunk/includes/class-devtonic-qr-post-types.php (modified) (2 diffs)
-
trunk/includes/class-devtonic-qr-price-visibility.php (modified) (3 diffs)
-
trunk/includes/frontend/class-devtonic-qr-button.php (modified) (1 diff)
-
trunk/includes/helpers/functions-devtonic-qr.php (modified) (4 diffs)
-
trunk/languages/devtonic-quote-requests-for-woocommerce.pot (modified) (1 diff)
-
trunk/readme.txt (modified) (7 diffs)
-
trunk/templates/single-product/add-to-quote-button.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
devtonic-quote-requests-for-woocommerce/trunk/devtonic-quote-requests-for-woocommerce.php
r3751148 r3811305 4 4 * Plugin URI: https://devtonicstudios.com/quotewise 5 5 * Description: Request a Quote for WooCommerce. Every quote on one screen, accept or decline in one click, with status history and internal notes. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: Devtonic Studios 8 8 * Author URI: https://devtonicstudios.com … … 16 16 * Requires Plugins: woocommerce 17 17 * WC requires at least: 7.0 18 * WC tested up to: 11. 118 * WC tested up to: 11.3 19 19 * 20 20 * @package Quote Requests … … 25 25 } 26 26 27 define( 'DEVTONIC_QR_VERSION', '1.0. 3' );27 define( 'DEVTONIC_QR_VERSION', '1.0.4' ); 28 28 define( 'DEVTONIC_QR_PLUGIN_FILE', __FILE__ ); 29 29 define( 'DEVTONIC_QR_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
devtonic-quote-requests-for-woocommerce/trunk/includes/admin/class-devtonic-qr-admin-product-meta.php
r3656027 r3811305 61 61 <p> 62 62 <label> 63 <input type="radio" name="quotewise_product_mode" value="quote_only" <?php checked( $mode, 'quote_only' ); ?> /> 64 <?php esc_html_e( 'Quote only: the quote button replaces Add to Cart', 'devtonic-quote-requests-for-woocommerce' ); ?> 65 </label> 66 </p> 67 <p> 68 <label> 63 69 <input type="radio" name="quotewise_product_mode" value="force_off" <?php checked( $mode, 'force_off' ); ?> /> 64 70 <?php esc_html_e( 'Force quote button OFF for this product', 'devtonic-quote-requests-for-woocommerce' ); ?> … … 67 73 <p class="description"> 68 74 <?php esc_html_e( '"Use shop default" follows the global Quote mode setting.', 'devtonic-quote-requests-for-woocommerce' ); ?> 75 </p> 76 <p class="description"> 77 <?php esc_html_e( '"Quote only" sells this product through quotes only, even when the rest of the shop keeps Add to Cart. It cannot be bought from the product page, the shop page or a direct add-to-cart link. With "Hide the price" on (Quotes > Settings > Display), its price is hidden too.', 'devtonic-quote-requests-for-woocommerce' ); ?> 69 78 </p> 70 79 <?php … … 89 98 90 99 $mode = isset( $_POST['quotewise_product_mode'] ) ? sanitize_key( wp_unslash( $_POST['quotewise_product_mode'] ) ) : 'default'; 91 if ( ! in_array( $mode, array( 'default', 'force_on', 'force_off'), true ) ) {100 if ( ! in_array( $mode, quotewise_product_modes(), true ) ) { 92 101 $mode = 'default'; 93 102 } -
devtonic-quote-requests-for-woocommerce/trunk/includes/admin/class-devtonic-qr-admin-settings.php
r3712211 r3811305 533 533 </fieldset> 534 534 <p class="description"> 535 <?php esc_html_e( 'Each product page also has its own override box ( Force ON / Force OFF / Use shop default).', 'devtonic-quote-requests-for-woocommerce' ); ?>535 <?php esc_html_e( 'Each product page also has its own override box (Use shop default / Force ON / Quote only / Force OFF). Quote only makes that one product quote-only while the rest of the shop keeps Add to Cart.', 'devtonic-quote-requests-for-woocommerce' ); ?> 536 536 </p> 537 537 </td> … … 719 719 <p class="description"> 720 720 <?php esc_html_e( 'Replace makes these products quote-only: they cannot be bought from the product page, the shop page or a direct add-to-cart link.', 'devtonic-quote-requests-for-woocommerce' ); ?> 721 <?php esc_html_e( 'To make only some products quote-only, keep "Show alongside Add to Cart" and choose "Quote only" in the Quote settings box of each of those products.', 'devtonic-quote-requests-for-woocommerce' ); ?> 721 722 </p> 722 723 </td> … … 730 731 </label> 731 732 <p class="description"> 732 <?php esc_html_e( 'Works with "Replace Add to Cart". The price is left out of the product page, the shop page, the quote basket, the product data Google reads, and WooCommerce\'s public product API. You still see it here in the admin.', 'devtonic-quote-requests-for-woocommerce' ); ?>733 <?php esc_html_e( 'Works on quote-only products: all of them with "Replace Add to Cart", or the products set to "Quote only" on their own product page. The price is left out of the product page, the shop page, the quote basket, the product data Google reads, and WooCommerce\'s public product API. You still see it here in the admin.', 'devtonic-quote-requests-for-woocommerce' ); ?> 733 734 </p> 734 735 </td> -
devtonic-quote-requests-for-woocommerce/trunk/includes/class-devtonic-qr-post-types.php
r3656027 r3811305 20 20 add_action( 'current_screen', array( __CLASS__, 'restrict_screen_for_non_managers' ) ); 21 21 add_filter( 'wp_insert_post_data', array( __CLASS__, 'guard_status_against_core_buttons' ), 10, 2 ); 22 add_filter( 'wp_insert_post_data', array( __CLASS__, 'keep_quote_author' ), 10, 2 ); 22 23 add_filter( 'wp_untrash_post_status', array( __CLASS__, 'restore_status_on_untrash' ), 10, 3 ); 23 24 } … … 62 63 if ( $current && 0 === strpos( $current, 'quotewise-' ) ) { 63 64 $data['post_status'] = $current; 65 } 66 return $data; 67 } 68 69 /** 70 * A quote belongs to the customer who asked for it, or to nobody when a guest asked. WordPress 71 * gives a post with no author to whoever saves it next (the edit screen sends the current user), 72 * so saving a guest's quote made the shop owner its customer. Once a quote exists, its author 73 * never changes. 74 * 75 * @param array $data Slashed, sanitized post data about to be written. 76 * @param array $postarr Raw post array (includes ID on updates). 77 * @return array 78 */ 79 public static function keep_quote_author( $data, $postarr ) { 80 if ( ! isset( $data['post_type'] ) || self::POST_TYPE !== $data['post_type'] || empty( $postarr['ID'] ) ) { 81 return $data; 82 } 83 $stored = get_post_field( 'post_author', (int) $postarr['ID'], 'raw' ); 84 if ( is_numeric( $stored ) ) { 85 $data['post_author'] = (int) $stored; 64 86 } 65 87 return $data; -
devtonic-quote-requests-for-woocommerce/trunk/includes/class-devtonic-qr-price-visibility.php
r3712211 r3811305 10 10 * 11 11 * With "Hide the price" on, the price is also left out of the page, the variation data, 12 * the product data Google reads (JSON-LD) and WooCommerce's public Store API. 12 * the product data Google reads (JSON-LD), WooCommerce's public Store API, and the Store API 13 * copies that WooCommerce's product blocks print into a block theme's page. 13 14 * 14 15 * @package Quote Requests … … 33 34 add_filter( 'woocommerce_structured_data_product', array( __CLASS__, 'structured_data' ), 100, 2 ); 34 35 add_filter( 'rest_post_dispatch', array( __CLASS__, 'store_api_response' ), 100, 3 ); 36 // Block themes: WooCommerce (11.3 and later) loads Store API data for the products on the page 37 // straight from the Store API code, past rest_post_dispatch, and prints it as the page's 38 // interactivity state. 39 add_filter( 'script_module_data_@wordpress/interactivity', array( __CLASS__, 'interactivity_data' ), 100 ); 35 40 } 36 41 … … 181 186 $items = $single ? array( $data ) : $data; 182 187 foreach ( $items as $i => $item ) { 183 if ( ! is_array( $item ) || empty( $item['id'] ) ) { 188 $items[ $i ] = self::store_api_item( $item ); 189 } 190 $response->set_data( $single ? $items[0] : $items ); 191 return $response; 192 } 193 194 /** 195 * The product data WooCommerce's product blocks print into a block theme's page: the same 196 * Store API data, so it gets the same treatment as the public Store API. 197 * 198 * @param array $data Data for the @wordpress/interactivity script module. 199 * @return array 200 */ 201 public static function interactivity_data( $data ) { 202 if ( self::is_admin_screen() || ! is_array( $data ) || empty( $data['state']['woocommerce/products'] ) || ! is_array( $data['state']['woocommerce/products'] ) ) { 203 return $data; 204 } 205 foreach ( array( 'products', 'productVariations' ) as $group ) { 206 if ( empty( $data['state']['woocommerce/products'][ $group ] ) || ! is_array( $data['state']['woocommerce/products'][ $group ] ) ) { 184 207 continue; 185 208 } 186 $product = wc_get_product( (int) $item['id'] ); 187 if ( ! $product || ! quotewise_is_quote_only( $product ) ) { 188 continue; 209 foreach ( $data['state']['woocommerce/products'][ $group ] as $id => $item ) { 210 $data['state']['woocommerce/products'][ $group ][ $id ] = self::store_api_item( $item ); 189 211 } 190 $item['is_purchasable'] = false; 191 // The Store API hands nested parts over as objects, not arrays. 192 if ( isset( $item['add_to_cart'] ) ) { 193 $text = quotewise_get_setting( 'button_text', 'Request a Quote' ); 194 self::set_fields( 195 $item['add_to_cart'], 196 array( 197 'text' => $text, 198 'single_text' => $text, 199 'url' => $product->get_permalink(), 200 ) 201 ); 202 } 203 if ( quotewise_price_is_hidden( $product ) && isset( $item['prices'] ) ) { 204 self::set_fields( 205 $item['prices'], 206 array( 207 'price' => '', 208 'regular_price' => '', 209 'sale_price' => '', 210 'price_range' => null, 211 ) 212 ); 213 $item['price_html'] = quotewise_hidden_price_html( $product ); 214 } 215 $items[ $i ] = $item; 216 } 217 $response->set_data( $single ? $items[0] : $items ); 218 return $response; 212 } 213 return $data; 214 } 215 216 /** 217 * One product in Store API format: a quote-only product is marked as not purchasable, and a 218 * hidden price is removed. 219 * 220 * @param mixed $item Product data (an array; its nested parts can be objects). 221 * @return mixed 222 */ 223 private static function store_api_item( $item ) { 224 if ( ! is_array( $item ) || empty( $item['id'] ) ) { 225 return $item; 226 } 227 $product = wc_get_product( (int) $item['id'] ); 228 if ( ! $product || ! quotewise_is_quote_only( $product ) ) { 229 return $item; 230 } 231 $item['is_purchasable'] = false; 232 // The Store API hands nested parts over as objects, not arrays. 233 if ( isset( $item['add_to_cart'] ) ) { 234 $text = quotewise_get_setting( 'button_text', 'Request a Quote' ); 235 self::set_fields( 236 $item['add_to_cart'], 237 array( 238 'text' => $text, 239 'single_text' => $text, 240 'url' => $product->get_permalink(), 241 ) 242 ); 243 } 244 if ( quotewise_price_is_hidden( $product ) && isset( $item['prices'] ) ) { 245 self::set_fields( 246 $item['prices'], 247 array( 248 'price' => '', 249 'regular_price' => '', 250 'sale_price' => '', 251 'price_range' => null, 252 ) 253 ); 254 $item['price_html'] = quotewise_hidden_price_html( $product ); 255 } 256 return $item; 219 257 } 220 258 -
devtonic-quote-requests-for-woocommerce/trunk/includes/frontend/class-devtonic-qr-button.php
r3712211 r3811305 109 109 $text = apply_filters( 'quotewise_button_text', $settings['button_text'], $product ); 110 110 $color = $settings['button_color']; 111 $placement = $settings['button_placement']; 111 // Per product: a "Quote only" product replaces Add to Cart even when the shop setting says alongside. 112 $placement = quotewise_is_quote_only( $product ) ? 'replace' : 'alongside'; 112 113 113 114 $template_args = array( -
devtonic-quote-requests-for-woocommerce/trunk/includes/helpers/functions-devtonic-qr.php
r3751148 r3811305 72 72 } 73 73 74 if ( ! function_exists( 'quotewise_product_modes' ) ) { 75 /** 76 * The choices in a product's Quote settings box. 77 * 78 * - default: follows the shop's Quote mode and Button placement. 79 * - force_on: the quote button always shows; Button placement decides whether it sits next 80 * to Add to Cart or replaces it. 81 * - quote_only: the quote button always shows and replaces Add to Cart, so the product is 82 * never sold through the cart, whatever Button placement says for the rest of the shop. 83 * - force_off: the quote button never shows. 84 * 85 * @return string[] 86 */ 87 function quotewise_product_modes() { 88 return array( 'default', 'force_on', 'quote_only', 'force_off' ); 89 } 90 } 91 74 92 if ( ! function_exists( 'quotewise_get_product_mode' ) ) { 75 93 function quotewise_get_product_mode( $product_id ) { 76 94 $value = get_post_meta( $product_id, '_quotewise_product_mode', true ); 77 if ( ! in_array( $value, array( 'default', 'force_on', 'force_off'), true ) ) {95 if ( ! in_array( $value, quotewise_product_modes(), true ) ) { 78 96 $value = 'default'; 79 97 } … … 93 111 return apply_filters( 'quotewise_button_visible', false, $product ); 94 112 } 95 if ( 'force_on' === $product_mode ) {113 if ( 'force_on' === $product_mode || 'quote_only' === $product_mode ) { 96 114 return apply_filters( 'quotewise_button_visible', true, $product ); 97 115 } … … 129 147 /** 130 148 * Quote-only: the Add to Quote button shows and replaces Add to Cart, so the product 131 * is never sold through the cart. The Pro version adds its per-role rules here. 149 * is never sold through the cart. That is every product with the button when Button 150 * placement is "Replace Add to Cart", or one product set to "Quote only" in its Quote 151 * settings box while the rest of the shop keeps Add to Cart. The Pro version adds its 152 * per-role rules here. 132 153 * 133 154 * @param WC_Product|int $product Product or product ID. … … 139 160 return false; 140 161 } 141 $quote_only = 'replace' === quotewise_get_setting( 'button_placement', 'alongside' ) && quotewise_button_should_show( $product ); 162 $replaces = 'replace' === quotewise_get_setting( 'button_placement', 'alongside' ) 163 || 'quote_only' === quotewise_get_product_mode( $product->get_id() ); 164 // Only while the quote button shows: a product with neither button could not be bought or quoted. 165 $quote_only = $replaces && quotewise_button_should_show( $product ); 142 166 return (bool) apply_filters( 'quotewise_is_quote_only', $quote_only, $product ); 143 167 } -
devtonic-quote-requests-for-woocommerce/trunk/languages/devtonic-quote-requests-for-woocommerce.pot
r3656027 r3811305 90 90 msgstr "" 91 91 92 msgid "Quote only: the quote button replaces Add to Cart" 93 msgstr "" 94 92 95 msgid "Force quote button OFF for this product" 96 msgstr "" 97 98 msgid "\"Quote only\" sells this product through quotes only, even when the rest of the shop keeps Add to Cart. It cannot be bought from the product page, the shop page or a direct add-to-cart link. With \"Hide the price\" on (Quotes > Settings > Display), its price is hidden too." 93 99 msgstr "" 94 100 -
devtonic-quote-requests-for-woocommerce/trunk/readme.txt
r3751148 r3811305 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 WC requires at least: 7.0 9 WC tested up to: 11. 19 WC tested up to: 11.3 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 * Add to Quote button on product pages, next to Add to Cart or in place of it 28 * Per-product control: force the button on, force it off, or follow the shop default28 * Per-product control: force the button on, force it off, follow the shop default, or make just that product quote only while the rest of the shop keeps Add to Cart 29 29 * Change the button text, color, and position 30 30 * Session-based quote basket, kept separate from the normal WooCommerce cart … … 42 42 * Works for guests too, no account needed to request a quote 43 43 * HPOS (High-Performance Order Storage) compatible 44 * Translation-ready (text domain: quotewise)44 * Translation-ready (text domain: devtonic-quote-requests-for-woocommerce) 45 45 46 46 The free version manages quotes end to end. It does not turn an accepted quote into a paid order. Taking the payment is the job of the Pro version, below. … … 73 73 == Installation == 74 74 75 1. Upload the ` quotewise` folder to `/wp-content/plugins/`, or install through the Plugins screen in WordPress.75 1. Upload the `devtonic-quote-requests-for-woocommerce` folder to `/wp-content/plugins/`, or install through the Plugins screen in WordPress. 76 76 2. Activate the plugin through the Plugins screen. 77 77 3. Make sure WooCommerce is also installed and active. … … 92 92 93 93 In the WooCommerce session, the same place as the normal cart. It does not mix into the regular cart, and it is not saved to the database until the customer submits the quote. 94 95 = Can I make only some products quote only? = 96 97 Yes. Keep Button placement on "Show alongside Add to Cart" under **Quotes → Settings → Display**. Then open each product that should be quote only and choose "Quote only" in its Quote settings box. Those products lose Add to Cart and cannot be bought from the product page, the shop page or a direct add-to-cart link, while every other product sells as normal. Turn on "Hide the price" to show your own text, such as "Price on request", in place of their price. 94 98 95 99 = Can a guest customer (not logged in) submit a quote? = … … 145 149 146 150 == Changelog == 151 152 = 1.0.4 = 153 * New: Quote only for single products. Choose "Quote only" in a product's Quote settings box and that product is sold through quotes only: no Add to Cart on the product page or the shop page, and no way to buy it with a direct link or through the Store API, while the rest of the shop keeps Add to Cart. With "Hide the price" on, its price is hidden too. Until now quote only was one setting for the whole shop. Thanks to Rodger Firmin for the idea. 154 * Fixed: on block themes with WooCommerce 11.3, the price of a quote-only product with "Hide the price" on could still be read in the page's hidden data, where WooCommerce's product blocks keep the products they show. It is left out there too now. 155 * Fixed: saving a guest's quote on its admin screen made the shop owner the customer of that quote. A quote now keeps its customer, or none when a guest asked. 156 * Tested with WordPress 7.1 and WooCommerce 11.3. 147 157 148 158 = 1.0.3 = … … 179 189 == Upgrade Notice == 180 190 191 = 1.0.4 = 192 Adds Quote only for single products, so a shop can sell most products as normal and keep a few on quote only. Your quotes and settings are untouched. 193 181 194 = 1.0.3 = 182 195 Quote lines now show what the customer chose, and a product priced by a calculator such as PriceWise is quoted at that price. Your quotes and settings are untouched. -
devtonic-quote-requests-for-woocommerce/trunk/templates/single-product/add-to-quote-button.php
r3656027 r3811305 19 19 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Template variables are provided by wc_get_template() $args (function-scoped, not globals); WooCommerce email header/footer hooks are invoked intentionally. 20 20 21 // When $placement is "replace", the Add to Cart button is hidden by the 22 // .quotewise-replace-add-to-cart body class (see assets/css/devtonic-qr-frontend.css). 21 // When $placement is "replace" (the product is quote-only, for the whole shop or this product 22 // alone), the Add to Cart button is hidden by the .quotewise-replace-add-to-cart body class 23 // (see assets/css/devtonic-qr-frontend.css). 23 24 ?> 24 25 <span class="quotewise-button-wrap">
Note:
See TracChangeset
for help on using the changeset viewer.