Changeset 3360189
- Timestamp:
- 09/12/2025 12:26:02 AM (7 months ago)
- Location:
- product-quotation-for-woocommerce
- Files:
-
- 81 added
- 1 deleted
- 12 edited
-
tags/2.5.0 (added)
-
tags/2.5.0/README.txt (added)
-
tags/2.5.0/assets (added)
-
tags/2.5.0/assets/build (added)
-
tags/2.5.0/assets/build/backend.2.5.0.asset.php (added)
-
tags/2.5.0/assets/build/backend.2.5.0.js (added)
-
tags/2.5.0/assets/build/backend.css (added)
-
tags/2.5.0/assets/build/button.2.5.0.asset.php (added)
-
tags/2.5.0/assets/build/button.2.5.0.js (added)
-
tags/2.5.0/assets/build/cart.2.5.0.asset.php (added)
-
tags/2.5.0/assets/build/cart.2.5.0.js (added)
-
tags/2.5.0/assets/build/images (added)
-
tags/2.5.0/assets/build/images/button.3f1daf8f.png (added)
-
tags/2.5.0/assets/build/images/email.5183ffb9.png (added)
-
tags/2.5.0/assets/build/images/form.3bf7f595.png (added)
-
tags/2.5.0/assets/build/images/reset.3bcbcd44.png (added)
-
tags/2.5.0/assets/css (added)
-
tags/2.5.0/assets/css/pqfw-admin.css (added)
-
tags/2.5.0/assets/css/pqfw-frontend.css (added)
-
tags/2.5.0/assets/css/pqfw-quotations.css (added)
-
tags/2.5.0/assets/images (added)
-
tags/2.5.0/assets/images/bugs.svg (added)
-
tags/2.5.0/assets/images/cog.svg (added)
-
tags/2.5.0/assets/images/customization.svg (added)
-
tags/2.5.0/assets/images/docs.svg (added)
-
tags/2.5.0/assets/images/like.svg (added)
-
tags/2.5.0/assets/images/loader.gif (added)
-
tags/2.5.0/assets/images/logo-white.png (added)
-
tags/2.5.0/assets/images/pqfw-dashboard-icon.png (added)
-
tags/2.5.0/assets/images/preloader.apng (added)
-
tags/2.5.0/assets/images/support.svg (added)
-
tags/2.5.0/assets/js (added)
-
tags/2.5.0/assets/js/pqfw-frontend.js (added)
-
tags/2.5.0/autoload.php (added)
-
tags/2.5.0/functions.php (added)
-
tags/2.5.0/includes (added)
-
tags/2.5.0/includes/PQFW.php (added)
-
tags/2.5.0/includes/addons (added)
-
tags/2.5.0/includes/addons.php (added)
-
tags/2.5.0/includes/addons/contactform (added)
-
tags/2.5.0/includes/addons/contactform/contactform.php (added)
-
tags/2.5.0/includes/addons/elementor (added)
-
tags/2.5.0/includes/addons/elementor/elementor.php (added)
-
tags/2.5.0/includes/ajax (added)
-
tags/2.5.0/includes/ajax.php (added)
-
tags/2.5.0/includes/ajax/cart.php (added)
-
tags/2.5.0/includes/ajax/product.php (added)
-
tags/2.5.0/includes/ajax/quotations.php (added)
-
tags/2.5.0/includes/classes (added)
-
tags/2.5.0/includes/classes/admin.php (added)
-
tags/2.5.0/includes/classes/assets.php (added)
-
tags/2.5.0/includes/classes/cart.php (added)
-
tags/2.5.0/includes/classes/controls-manager.php (added)
-
tags/2.5.0/includes/classes/form-handler.php (added)
-
tags/2.5.0/includes/classes/form.php (added)
-
tags/2.5.0/includes/classes/frontend.php (added)
-
tags/2.5.0/includes/classes/helpers.php (added)
-
tags/2.5.0/includes/classes/hooks.php (added)
-
tags/2.5.0/includes/classes/mail.php (added)
-
tags/2.5.0/includes/classes/menu.php (added)
-
tags/2.5.0/includes/classes/migration.php (added)
-
tags/2.5.0/includes/classes/product.php (added)
-
tags/2.5.0/includes/classes/script-base.php (added)
-
tags/2.5.0/includes/classes/settings.php (added)
-
tags/2.5.0/includes/classes/shortcode.php (added)
-
tags/2.5.0/includes/quotations.php (added)
-
tags/2.5.0/includes/utils (added)
-
tags/2.5.0/includes/utils/Abstracts (added)
-
tags/2.5.0/includes/utils/Abstracts/quotation-mapper.php (added)
-
tags/2.5.0/includes/utils/Interfaces (added)
-
tags/2.5.0/includes/utils/Interfaces/Addon.php (added)
-
tags/2.5.0/includes/views (added)
-
tags/2.5.0/includes/views/email (added)
-
tags/2.5.0/includes/views/email/new-quote.php (added)
-
tags/2.5.0/includes/views/help.php (added)
-
tags/2.5.0/includes/views/pqfw-cart-shortcode.php (added)
-
tags/2.5.0/includes/views/quotation-detail.php (added)
-
tags/2.5.0/includes/views/quotation-products-detail.php (added)
-
tags/2.5.0/index.php (added)
-
tags/2.5.0/product-quotation-for-woocommerce.php (added)
-
trunk/README.txt (modified) (4 diffs)
-
trunk/assets/css/pqfw-admin.css (modified) (2 diffs)
-
trunk/assets/css/pqfw-frontend.css (modified) (1 diff)
-
trunk/assets/js/pqfw-frontend.js (modified) (2 diffs)
-
trunk/autoload.php (modified) (1 diff)
-
trunk/functions.php (added)
-
trunk/includes/PQFW.php (modified) (10 diffs)
-
trunk/includes/Views/help.php (modified) (1 diff)
-
trunk/includes/Views/pqfw-cart-shortcode.php (modified) (3 diffs)
-
trunk/includes/Views/quotation-detail.php (modified) (1 diff)
-
trunk/includes/Views/quotation-products-detail.php (modified) (2 diffs)
-
trunk/index.php (modified) (1 diff)
-
trunk/languages (deleted)
-
trunk/product-quotation-for-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
product-quotation-for-woocommerce/trunk/README.txt
r2900315 r3360189 1 1 === Product Quotation - Request a Quote for WooCommerce === 2 2 Contributors: mahfuz01 3 Tags: request a quote, email quote, quotations, request for quote, rfq, raq, proposal3 Tags: request a quote, email quote, quotations, request for quote, hide-price, send-email, proposal 4 4 Requires at least: 4.0 5 Tested up to: 6.2 6 Stable tag: 2.0.5 5 WC requires at least: 6.0 6 WC tested up to: 10.1.2 7 Tested up to: 6.8 8 Stable tag: 2.5.0 7 9 License: GPLv3 or later 8 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 40 42 * Automatically list each quotation submission on Dashboard. 41 43 * No complicated settings. All is set up to go. Simply install it and it works. 42 * Quotation Cart **Elementor** integration.43 * Translations Support for any languages ( Already translations included for: **German, Spanish, French**).44 45 [See the Live Demo](http://wpdiscountx.com/shop/)46 44 47 45 ## 💙 LOVED Product Quotation For WooCommerce? ## … … 50 48 51 49 Visit [Product Quotation Form For WooCommerce](https://github.com/mahafuz/product-quotation-for-woocommerce) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks]https://github.com/mahafuz/product-quotation-for-woocommerce). 52 53 ## Privacy Policy54 Product Quotation – Product Quotation For WooCommerce uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.55 56 Appsero SDK **does not gather any data by default.** The SDK only starts gathering basic telemetry data **when a user allows it via the admin notice**. We collect the data to ensure a great user experience for all our users.57 58 Integrating Appsero SDK **DOES NOT IMMEDIATELY** start gathering data, **without confirmation from users in any case.**59 60 Learn more about how [Appsero collects and uses this data](https://appsero.com/privacy-policy/).61 50 62 51 == Installation == … … 73 62 == Changelog == 74 63 75 = 2.0.5 - 17-04-2023 = 76 * Maintenance update 64 = 2.5.0 - 12-09-2025 = 65 * ADDED: New dashboard for better quotation management. 66 * IMPROVEMENTS: Compatibility with latest wordpress versions. 67 * FIXED: Minor bugs 77 68 78 69 = 2.0.4 - 24-05-2022 = -
product-quotation-for-woocommerce/trunk/assets/css/pqfw-admin.css
r2719227 r3360189 134 134 .pqfw-help-page {display: flex; 135 135 flex-wrap: wrap; 136 align-items: center; 136 align-items: center; 137 137 margin-top: 30px;} 138 138 … … 162 162 163 163 td.pqfw-product-thumbnail > a > img {max-width: 100%;} 164 165 .pqfw-initial-preloader { 166 height: 100vh; 167 width:calc( 160px + 100% ); 168 position: fixed; 169 left: 0; 170 top: 0; 171 bottom: 100%; 172 overflow: hidden; 173 } -
product-quotation-for-woocommerce/trunk/assets/css/pqfw-frontend.css
r2717061 r3360189 7 7 */ 8 8 9 10 9 #pqfw-frontend-form-wrap { 11 display: none;10 display: none; 12 11 } 13 12 14 13 .use-pqfw-form-default-design ul.pqfw-frontend-form { 15 list-style: none !important;16 margin: 0 !important;17 padding: 0 !important;18 width: 100%;14 list-style: none !important; 15 margin: 0 !important; 16 padding: 0 !important; 17 width: 100%; 19 18 } 20 19 21 20 .use-pqfw-form-default-design .pqfw-form-field { 22 margin-left: 0;23 margin-bottom: 10px;24 padding: 10px;21 margin-left: 0; 22 margin-bottom: 10px; 23 padding: 10px; 25 24 } 26 25 27 26 .use-pqfw-form-default-design .pqfw-form-label { 28 display: block;29 float: none;30 width: 100%;31 font-weight: bold;32 color: black;33 margin-bottom: 10px;34 font-size: 14px;27 display: block; 28 float: none; 29 width: 100%; 30 font-weight: bold; 31 color: black; 32 margin-bottom: 10px; 33 font-size: 14px; 35 34 } 36 35 37 36 .use-pqfw-form-default-design .pqfw-form-label .field-required { 38 color: red;37 color: red; 39 38 } 40 39 41 40 .woocommerce .use-pqfw-form-default-design .pqfw-form-field input, 42 41 .woocommerce .use-pqfw-form-default-design .pqfw-form-field textarea { 43 padding: 5px;44 background: #fafafa;45 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);46 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);47 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);48 border: 1px solid #ddd;49 color: #888;50 width: 100%;51 box-sizing: border-box;52 border-radius: 2px;42 padding: 5px; 43 background: #fafafa; 44 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); 45 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); 46 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); 47 border: 1px solid #ddd; 48 color: #888; 49 width: 100%; 50 box-sizing: border-box; 51 border-radius: 2px; 53 52 } 54 53 55 54 .use-pqfw-form-default-design .pqfw-form-field.hasError { 56 background: #FFE4E4;55 background: #ffe4e4; 57 56 } 58 57 59 58 .use-pqfw-form-default-design .pqfw-form-title { 60 padding: 10px;59 padding: 10px; 61 60 } 62 61 63 62 .use-pqfw-form-default-design .pqfw-form .loading-spinner.loading { 64 width: 16px;65 height: 16px;66 background: url('../images/loader.gif') no-repeat;67 display: inline-block;63 width: 16px; 64 height: 16px; 65 background: url("../images/loader.gif") no-repeat; 66 display: inline-block; 68 67 } 69 68 70 69 .use-pqfw-form-default-design .pqfw-form-response-status { 71 margin: 10px 0;72 padding: 10px;73 border-radius: 3px;74 font-size: 13px;70 margin: 10px 0; 71 padding: 10px; 72 border-radius: 3px; 73 font-size: 13px; 75 74 } 76 75 77 76 .use-pqfw-form-default-design .pqfw-form-response-status.success { 78 background: #00846433;79 border: 1px solid #00846433;77 background: #00846433; 78 border: 1px solid #00846433; 80 79 } 81 80 82 81 .use-pqfw-form-default-design .pqfw-form-response-status.error { 83 background: #FFE4E4;84 border: 1px solid #ffb1b1;82 background: #ffe4e4; 83 border: 1px solid #ffb1b1; 85 84 } 86 85 87 86 .use-pqfw-form-default-design .pqfw-form-response-status p { 88 margin: 2px 0;87 margin: 2px 0; 89 88 } 90 91 89 92 90 /* === Floating Form Style === */ 93 91 .use-pqfw-form-default-design.floating-form .pqfw-form-label { 94 float: left;95 width: 20%;92 float: left; 93 width: 20%; 96 94 } 97 95 98 96 .woocommerce .use-pqfw-form-default-design.floating-form .pqfw-form-field input, 99 .woocommerce .use-pqfw-form-default-design.floating-form .pqfw-form-field textarea { 100 float: left; 101 width: 79%; 97 .woocommerce 98 .use-pqfw-form-default-design.floating-form 99 .pqfw-form-field 100 textarea { 101 float: left; 102 width: 79%; 102 103 } 103 104 104 105 .use-pqfw-form-default-design.floating-form .pqfw-form-field { 105 overflow: hidden;106 overflow: hidden; 106 107 } 107 108 108 109 .woocommerce .use-pqfw-form-default-design.floating-form .pqfw-submit { 109 text-align: right;110 text-align: right; 110 111 } 111 112 112 113 .woocommerce .use-pqfw-form-default-design .pqfw-submit input[type="submit"] { 113 font-size: 16px; 114 padding: 5px 15px; 115 line-height: inherit; 116 height: inherit; 117 border: 1px solid #ccc; 118 -webkit-border-radius: 3px; 119 -moz-border-radius: 3px; 120 border-radius: 3px; 121 background: #0085ba; 122 border-color: #0073aa #006799 #006799; 123 -webkit-box-shadow: 0 1px 0 #006799; 124 box-shadow: 0 1px 0 #006799; 125 color: #fff; 126 text-decoration: none; 127 text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; 128 display: inline-block; 129 width: auto; 130 float: none; 114 font-size: 16px; 115 padding: 5px 15px; 116 line-height: inherit; 117 height: inherit; 118 border: 1px solid #ccc; 119 -webkit-border-radius: 3px; 120 -moz-border-radius: 3px; 121 border-radius: 3px; 122 background: #0085ba; 123 border-color: #0073aa #006799 #006799; 124 -webkit-box-shadow: 0 1px 0 #006799; 125 box-shadow: 0 1px 0 #006799; 126 color: #fff; 127 text-decoration: none; 128 text-shadow: 129 0 -1px 1px #006799, 130 1px 0 1px #006799, 131 0 1px 1px #006799, 132 -1px 0 1px #006799; 133 display: inline-block; 134 width: auto; 135 float: none; 131 136 } 132 137 133 a.button.pqfw-button.pqfw-add-to-quotation { 134 font-size: 14px; 135 margin: 10px 0; 136 display: inline-block; 137 transition: all 0.3s ease-in-out; 138 .quotify-quote-btn-loop { 139 align-items: center; 140 display: flex; 141 flex-direction: column; 142 gap: 12px; 143 justify-content: center; 144 white-space: normal; 145 word-break: break-word; 138 146 } 139 147 140 a.pqfw-view-quotation-cart {font-size: 14px;display: block;text-decoration: underline;} 148 .pqfw-add-to-quotation { 149 font-size: 14px; 150 display: flex; 151 align-items: center; 152 line-height: 1; 153 transition: all 0.3s ease-in-out; 154 background: #000; 155 padding: 15px 20px; 156 color: #fff; 157 border-radius: 4px; 158 text-decoration: none; 159 } 160 161 .pqfw-add-to-quotation:hover { 162 opacity: 0.5; 163 } 164 165 .pqfw-add-to-quotation > .loading-spinner.loading { 166 width: 16px; 167 height: 16px; 168 background: url("../images/loader.gif") no-repeat; 169 display: inline-block; 170 margin: 0 5px 0 0; 171 } 172 173 a.pqfw-view-quotation-cart { 174 font-size: 14px; 175 display: block; 176 text-decoration: underline; 177 } 141 178 142 179 li.pqfw-privacy-policy { 143 margin-left: 0;144 margin-bottom: 10px;145 padding: 0 10px;180 margin-left: 0; 181 margin-bottom: 10px; 182 padding: 0 10px; 146 183 } 147 184 148 185 .pqfw-privacy-policy-inner p { 149 margin: 0 0 10px;186 margin: 0 0 10px; 150 187 } 151 188 152 189 .pqfw-privacy-policy-inner { 153 font-size: 16px;190 font-size: 16px; 154 191 } 155 192 156 193 .pqfw-privacy-policy-inner label { 157 margin-bottom: 0 !important;194 margin-bottom: 0 !important; 158 195 } -
product-quotation-for-woocommerce/trunk/assets/js/pqfw-frontend.js
r2729562 r3360189 11 11 $( document ) 12 12 .on( "pqfw_init", function () { 13 14 13 var t = $( this ), 15 14 f = $( '#pqfw-frontend-form' ), … … 22 21 resposneStatus = $('.pqfw-form-response-status'); 23 22 24 t.on( "click", "# rsrfqfwc_submit", function ( ev ) {23 t.on( "click", "#quotify-form-submit", function ( ev ) { 25 24 26 25 ev.preventDefault(); -
product-quotation-for-woocommerce/trunk/autoload.php
r2709540 r3360189 1 1 <?php 2 2 /** 3 * Handling plugin spl autoloader golobally3 * Autoloader class for the entire plugin. 4 4 * 5 * @since 1.2.06 * @package PQFW5 * @since 2.0.4 6 * @package Quotify 7 7 */ 8 8 9 // if direct access than exit the file. 10 defined( 'ABSPATH' ) || exit; 9 namespace PQFW; 11 10 12 spl_autoload_register(function ( $class ) { 13 $prefix = 'PQFW\\'; 14 $base_dir = PQFW_PLUGIN_PATH . 'includes/'; 15 $len = strlen( $prefix ); 11 if ( ! defined( 'ABSPATH' ) ) { 12 exit; // Exit if accessed directly. 13 } 16 14 17 if ( strncmp( $prefix, $class, $len ) !== 0 ) { 18 return; 15 16 /** 17 * Autoloader class for the entire plugin. 18 * 19 * @since 2.0.4 20 */ 21 class Autoload { 22 23 /** 24 * Instance 25 * 26 * @access private 27 * @var object Class Instance. 28 * @since 1.1.0 29 */ 30 private static $instance; 31 32 /** 33 * Autoload directories for different namespaces. 34 * 35 * @var array 36 */ 37 private $autoload_directories = [ 38 'PQFW' => PQFW_PLUGIN_ROOT_DIR_PATH . 'includes/', 39 ]; 40 41 /** 42 * Initiator 43 * 44 * @since 1.1.0 45 * @return object initialized object of class. 46 */ 47 public static function get_instance() { 48 if ( ! isset( self::$instance ) ) { 49 self::$instance = new self(); 50 } 51 return self::$instance; 19 52 } 20 53 21 $class = substr( $class, $len ); 22 $arr = explode( '\\', $class ); 23 $index = absint( count( $arr ) - 1 ); 24 $fileName = strtolower( $arr[ $index ] ); 25 $fileName = str_replace( '_', '-', $fileName ); 26 $fileName = 'class-' . $fileName; 27 $arr[ $index ] = $fileName; 54 /** 55 * Register autoload directories for namespaces. 56 * 57 * @param string $ir_namespace Namespace to autoload. 58 * @param string $directory Directory path for the namespace. 59 */ 60 public function add_namespace_directory( $ir_namespace, $directory ) { 61 $this->autoload_directories[ $ir_namespace ] = $directory; 62 } 28 63 29 $class = join( '\\', $arr ); 30 $file = $base_dir . str_replace( '\\', '/', $class ) . '.php'; 64 /** 65 * Autoload classes. 66 * 67 * @param string $ir_class Class name. 68 */ 69 public function autoload( $ir_class ) { 70 foreach ( $this->autoload_directories as $ir_namespace => $directory ) { 71 if ( 0 === strpos( $ir_class, $ir_namespace ) ) { 72 $ir_class_to_load = $ir_class; 73 $filename = strtolower( 74 preg_replace( 75 [ '/^' . $ir_namespace . '\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/' ], 76 [ '', '$1-$2', '-', DIRECTORY_SEPARATOR ], 77 $ir_class_to_load 78 ) 79 ); 80 $file = $directory . $filename . '.php'; 81 // If the file is readable, include it. 82 if ( is_readable( $file ) ) { 83 require_once $file; 84 } 85 } 86 } 87 } 31 88 32 if ( file_exists( $file ) ) { 33 require $file; 89 /** 90 * Constructor 91 * 92 * @since 1.1.0 93 */ 94 public function __construct() { 95 spl_autoload_register( [ $this, 'autoload' ] ); 34 96 } 35 }); 97 } 98 99 100 Autoload::get_instance(); -
product-quotation-for-woocommerce/trunk/includes/PQFW.php
r2729562 r3360189 8 8 */ 9 9 10 namespace PQFW { 10 namespace PQFW {//phpcs:ignore 11 11 12 12 // if direct access than exit the file. … … 29 29 30 30 /** 31 * Contains plugin migration. 32 * 33 * @var mixed 34 */ 35 public $migration; 36 37 /** 38 * Container for the quotations 39 * 40 * @var mixed 41 */ 42 public $quotations; 43 44 /** 45 * Contains helpers methods. 46 * 47 * @var mixed 48 */ 49 public $helpers; 50 51 /** 52 * Container for the addons. 53 * 54 * @var mixed 55 */ 56 public $addons; 57 58 /** 59 * Container for the menus. 60 * 61 * @var mixed 62 */ 63 public $menu; 64 65 /** 66 * Container for the settings. 67 * 68 * @var mixed 69 */ 70 public $settings; 71 72 /** 73 * Contains the cart. 74 * 75 * @var mixed 76 */ 77 public $cart; 78 79 /** 80 * Contains the form controls. 81 * 82 * @var mixed 83 */ 84 public $controlsManager; 85 86 /** 87 * Collect quotation products details. 88 * 89 * @var mixed 90 */ 91 public $product; 92 93 /** 94 * Responsible for the plugin mail. 95 * 96 * @var mixed 97 */ 98 public $mailer; 99 public $mail; //phpcs:ignore 100 101 /** 31 102 * Returns single instance of the class 32 103 * … … 64 135 private function includes() { 65 136 $dependencies = [ 66 'autoload.php' 137 'autoload.php', 138 'functions.php', 67 139 ]; 68 140 … … 70 142 if ( ! file_exists( PQFW_PLUGIN_PATH . $path ) ) { 71 143 status_header( 500 ); 72 wp_die( esc_html__( 'Plugin is missing required dependencies. Please contact support for more information.', ' pqfw' ) );144 wp_die( esc_html__( 'Plugin is missing required dependencies. Please contact support for more information.', 'quotify' ) ); 73 145 } 74 146 … … 86 158 private function preLoad() { 87 159 $this->migration = new \PQFW\Classes\Migration(); 160 add_action( 'woocommerce_init', [ $this, 'sessionStart' ] ); 88 161 } 89 162 … … 97 170 private function loader() { 98 171 $this->helpers = new \PQFW\Classes\Helpers(); 99 $this-> assets = new \PQFW\Classes\Assets();172 $this->menu = new \PQFW\Classes\Menu(); 100 173 $this->settings = new \PQFW\Classes\Settings(); 101 $this->form = new \PQFW\Classes\Form(); 102 $this->admin = new \PQFW\Classes\Admin(); 174 175 new \PQFW\Ajax(); 176 new \PQFW\Classes\Assets(); 177 178 new \PQFW\Classes\Form_Handler(); 179 new \PQFW\Classes\Shortcode(); 180 181 $this->quotations = new \PQFW\Quotations(); 182 $this->addons = new \PQFW\Addons(); 183 103 184 $this->cart = new \PQFW\Classes\Cart(); 104 $this->request = new \PQFW\Classes\Request();105 $this->form_handler = new \PQFW\Classes\Form_Handler();106 $this->quotations = new \PQFW\Classes\Quotations();107 $this->shortcode = new \PQFW\Classes\Shortcode();108 $this->frontend = new \PQFW\Classes\Frontend();109 185 $this->controlsManager = new \PQFW\Classes\Controls_Manager(); 110 186 $this->product = new \PQFW\Classes\Product(); 111 $this->mail er = new \PQFW\Classes\Mailer();112 $this->strings = new \PQFW\Classes\Strings(); 113 114 if ( ! function_exists( 'WC' ) ) {115 add_action( 'admin_notices', [ $this, 'woocommerce_not_loaded' ]);116 }187 $this->mail = new \PQFW\Classes\Mail(); 188 189 new \PQFW\Classes\Form(); 190 new \PQFW\Classes\Frontend(); 191 new \PQFW\Classes\Admin(); 192 \PQFW\Classes\Hooks::init(); 117 193 118 194 add_action( 'plugin_action_links_' . PQFW_PLUGIN_BASENAME, [ $this, 'addPluginActionLinks' ] ); 119 195 add_action( 'admin_init', [ $this, 'redirect' ] ); 120 add_action( 'woocommerce_init', [ $this, 'sessionStart' ] ); 121 122 // Initialize the integrations. 123 $this->integrations(); 196 add_action( 'quotify/templates/form', [ $this, 'display_form' ] ); 197 } 198 199 /** 200 * Displays the contact form. 201 * 202 * @return void 203 */ 204 public function display_form() { 124 205 } 125 206 … … 133 214 public function addPluginActionLinks( $links ) { 134 215 // return if pro is active. 135 $settings = '<a href="' . admin_url( 'admin.php?page=pqfw-settings' ) . '">' . esc_html__( 'Settings', 'pqfw' ) . '</a>'; 136 $help = sprintf( '<a href="%s"><span style="color:#f18500; font-weight: bold;">%s</span></a>', admin_url( 'admin.php?page=pqfw-help' ), esc_html__( 'Help', 'pqfw' ) ); 216 $settings = '<a href="' . admin_url( 'admin.php?page=pqfw-product-quotations-settings' ) . '">' . esc_html__( 'Settings', 'quotify' ) . '</a>'; 217 $help = sprintf( 218 '<a href="%s"><span style="color:#f18500; font-weight: bold;">%s</span></a>', admin_url( 'admin.php?page=pqfw-product-quotations-help' ), 219 esc_html__( 'Help', 'quotify' ) 220 ); 137 221 array_unshift( $links, $settings ); 138 222 array_push( $links, $help ); … … 151 235 152 236 if ( ! isset( $_GET['activate-multi'] ) && ( ! empty( $_GET['activate'] ) ) && ( 'true' === $_GET['activate'] ) ) { 153 wp_safe_redirect( admin_url( 'admin.php?page=pqfw- settings' ) );237 wp_safe_redirect( admin_url( 'admin.php?page=pqfw-product-quotations' ) ); 154 238 } 155 239 } 156 }157 158 /**159 * Check if a plugin is installed160 *161 * @since 1.0.0162 * @param string $basename The plugin basename.163 */164 public function is_plugin_installed( $basename ) {165 if ( ! function_exists( 'get_plugins' ) ) {166 include_once ABSPATH . '/wp-admin/includes/plugin.php';167 }168 169 $installed_plugins = get_plugins();170 171 return isset( $installed_plugins[ $basename ] );172 }173 174 /**175 * Check if woocommerce plugin is activated176 *177 * @since v1.0.0178 */179 public function woocommerce_not_loaded() {180 if ( ! current_user_can( 'activate_plugins' ) ) {181 return;182 }183 184 $woocommerce = 'woocommerce/woocommerce.php';185 186 if ( $this->is_plugin_installed( $woocommerce ) ) {187 $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $woocommerce . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $woocommerce );188 189 $message = __( '<strong>Product Quotation For WooCommerce</strong> requires <strong>WooCommerce</strong> plugin to be active. Please activate WooCommerce to continue.', 'pqfw' );190 $button_text = __( 'Activate WooCommerce', 'pqfw' );191 } else {192 $activation_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );193 $message = __( '<strong>Product Quotation For WooCommerce</strong> requires <strong>WooCommerce</strong> plugin to be installed and activated. Please install WooCommerce to continue.', 'pqfw' );194 $button_text = __( 'Install WooCommerce', 'pqfw' );195 }196 197 $button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';198 199 printf( '<div class="error"><p>%1$s</p>%2$s</div>', $message, $button );200 240 } 201 241 … … 210 250 } 211 251 } 212 213 /**214 * Contains & runs the integration.215 *216 * @since 2.0.3217 */218 private function integrations() {219 // Elementor.220 if ( defined( 'ELEMENTOR_PATH' ) ) {221 add_action( 'elementor/editor/after_enqueue_styles', [ $this->assets, 'elmentorEditorStyle' ] );222 223 add_action( 'elementor/widgets/widgets_registered', function() {224 $this->elementor = \Elementor\Plugin::instance()->widgets_manager->register( new \PQFW\Classes\Addons\Elementor() );225 });226 }227 }228 252 } 229 253 230 254 } 231 255 232 namespace { 256 namespace {//phpcs:ignore 233 257 // if direct access than exit the file. 234 258 defined( 'ABSPATH' ) || exit; … … 239 263 * @since 1.0.0 240 264 */ 241 function pqfw() { 265 function pqfw() {//phpcs:ignore 242 266 return \PQFW\PQFW::instance(); 243 267 } -
product-quotation-for-woocommerce/trunk/includes/Views/help.php
r2716683 r3360189 1 <div class="wrap"> 2 <h1 class="screen-reader-text">Product Quotation For WooCommerce Help Page</h1> 3 4 <h1 class="pqfw-help-page-title" style="font-weight: bold">Help</h1> 5 6 <div class="pqfw-help-page"> 7 <!-- <div class="help-block"> 8 <img src="<?php //echo esc_url( PQFW_PLUGIN_URL . 'assets/images/docs.svg' ); ?>" alt="Looking for Something?"> 9 <h3>Looking for Something?</h3> 10 <p>We have detailed documentation on every aspects of weForms.</p> 11 <a target="_blank" href="#" class="button button-primary">Visit the Plugin Documentation</a> 12 </div> --> 13 <!-- <div class="help-block"> 14 <img src="<?php //echo esc_url( PQFW_PLUGIN_URL . 'assets/images/support.svg' ); ?>" alt="Need Any Assistance?"> 15 <h3>Need Any Assistance?</h3> 16 <p>Our EXPERT Support Team is always ready to Help you out.</p> 17 <a target="_blank" href="#" class="button button-primary">Contact Support</a> 18 </div> --> 19 <div class="help-block"> 20 <img src="<?php echo esc_url( PQFW_PLUGIN_URL . 'assets/images/bugs.svg' ); ?>" alt="Found Any Bugs?"> 21 <h3>Found Any Bugs?</h3> 22 <p>Report any Bug that you Discovered, Get Instant Solutions.</p> 23 <a target="_blank" href="https://github.com/mahafuz/product-quotation-for-woocommerce/issues/new" class="button button-primary">Report to GitHub</a> 24 </div> 25 <!-- <div class="help-block"> 26 <img src="<?php //echo esc_url( PQFW_PLUGIN_URL . 'assets/images/customization.svg' ); ?>" alt="Require Customization?"> 27 <h3>Require Customization?</h3> 28 <p>We would Love to hear your Integration and Customization Ideas.</p> 29 <a target="_blank" href="#" class="button button-primary">Contact Our Services</a> 30 </div> --> 31 <div class="help-block"> 32 <img src="<?php echo esc_url( PQFW_PLUGIN_URL . 'assets/images/like.svg' ); ?>" alt="Like The Plugin?"> 33 <h3>Like The Plugin?</h3> 34 <p>Your Review is very important to us as it helps us to grow more.</p> 35 <a target="_blank" href="https://wordpress.org/support/plugin/product-quotation-for-woocommerce/reviews/#new-post" class="button button-primary">Review Us on WP.org</a> 36 </div> 37 </div> 38 </div> 1 <h1>l|l</h1> -
product-quotation-for-woocommerce/trunk/includes/Views/pqfw-cart-shortcode.php
r2729562 r3360189 1 <?php 2 /** 3 * Woocommerce cart view template. 4 * 5 * @since 1.0.0 6 * @package Quotify 7 */ 8 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } // Exit if accessed directly 12 ?> 1 13 <div class="woocommerce"> 2 14 <form class="woocommerce-cart-form"> … … 7 19 <th class="product-thumbnail"> </th> 8 20 <th class="product-name"> 9 <?php esc_html_e( 'Product', ' woocommerce' ); ?>21 <?php esc_html_e( 'Product', 'quotify' ); ?> 10 22 </th> 11 <th class="product-price"><?php esc_html_e( 'Price', ' woocommerce' ); ?></th>23 <th class="product-price"><?php esc_html_e( 'Price', 'quotify' ); ?></th> 12 24 <th class="product-quantity"> 13 <?php esc_html_e( 'Quantity', ' woocommerce' ); ?>25 <?php esc_html_e( 'Quantity', 'quotify' ); ?> 14 26 </th> 15 27 <th class="product-subtotal"> 16 <?php esc_html_e( 'Message', ' woocommerce' ); ?>28 <?php esc_html_e( 'Message', 'quotify' ); ?> 17 29 </th> 18 30 </tr> … … 20 32 <tbody id="pqfw-quotations-list-row"></tbody> 21 33 </table> 34 </form> 22 35 23 <!-- Put form here. -->24 <?php pqfw()->form->form(); ?>25 </form>36 <?php 37 do_action( 'quotify/templates/cart/form' ); 38 ?> 26 39 </div> -
product-quotation-for-woocommerce/trunk/includes/Views/quotation-detail.php
r2719764 r3360189 1 1 <?php 2 2 /** 3 * Displays quotaion detail meta box.3 * Woocommerce cart view template. 4 4 * 5 5 * @since 1.2.0 6 * @package PQFW6 * @package Quotify 7 7 */ 8 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } // Exit if accessed directly 8 12 ?> 9 13 <div class="pqfw-quotation-detail-wrap"> 10 14 <ul class="pqfw-list-of-person-detail"> 11 <li><strong><?php esc_html_e( 'Name', ' pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_name', true ) ); ?></li>12 <li><strong><?php esc_html_e( 'Email', ' pqfw' ); ?></strong> <a href="mailto:<?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?>">15 <li><strong><?php esc_html_e( 'Name', 'quotify' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_name', true ) ); ?></li> 16 <li><strong><?php esc_html_e( 'Email', 'quotify' ); ?></strong> <a href="mailto:<?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?>"> 13 17 <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?></a> 14 18 </li> 15 <li><strong><?php esc_html_e( 'Phone', ' pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_phone', true ) ); ?></li>16 <li><strong><?php esc_html_e( 'Subject', ' pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_subject', true ) ); ?></li>17 <li><strong><?php esc_html_e( 'Message', ' pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_comments', true ) ); ?></li>19 <li><strong><?php esc_html_e( 'Phone', 'quotify' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_phone', true ) ); ?></li> 20 <li><strong><?php esc_html_e( 'Subject', 'quotify' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_subject', true ) ); ?></li> 21 <li><strong><?php esc_html_e( 'Message', 'quotify' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_comments', true ) ); ?></li> 18 22 </ul> 19 23 </div> -
product-quotation-for-woocommerce/trunk/includes/Views/quotation-products-detail.php
r2716683 r3360189 1 1 <?php 2 2 /** 3 * Displays quotaion products details.3 * Woocommerce cart view template. 4 4 * 5 5 * @since 1.2.0 6 * @package PQFW6 * @package Quotify 7 7 */ 8 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } // Exit if accessed directly 8 12 ?> 9 13 <div class="pqfw-quotation-produts-detail"> … … 11 15 <thead> 12 16 <tr> 13 <th class="pqfw-product-thumbnail pqfw-list-products-head"><?php esc_html_e( 'Image', ' pqfw' ); ?></th>14 <th class="pqfw-list-products-head"><?php esc_html_e( 'Product', ' pqfw' ); ?></th>15 <th class="pqfw-list-products-head"><?php esc_html_e( 'Price', ' pqfw' ); ?></th>16 <th class="pqfw-list-products-head"><?php esc_html_e( 'Quantity', ' pqfw' ); ?></th>17 <th class="pqfw-list-products-head"><?php esc_html_e( 'Message', ' pqfw' ); ?></th>17 <th class="pqfw-product-thumbnail pqfw-list-products-head"><?php esc_html_e( 'Image', 'quotify' ); ?></th> 18 <th class="pqfw-list-products-head"><?php esc_html_e( 'Product', 'quotify' ); ?></th> 19 <th class="pqfw-list-products-head"><?php esc_html_e( 'Price', 'quotify' ); ?></th> 20 <th class="pqfw-list-products-head"><?php esc_html_e( 'Quantity', 'quotify' ); ?></th> 21 <th class="pqfw-list-products-head"><?php esc_html_e( 'Message', 'quotify' ); ?></th> 18 22 </tr> 19 23 </thead> -
product-quotation-for-woocommerce/trunk/index.php
r2709540 r3360189 1 1 <?php 2 // Silence is golden. 2 /** 3 * Silence is golden. 4 * 5 * @package Quotify 6 */ -
product-quotation-for-woocommerce/trunk/product-quotation-for-woocommerce.php
r2729562 r3360189 4 4 * Plugin URI: https://github.com/mahafuz/product-quotation-for-woocommerce 5 5 * Description: Removes the 'Add to cart' button from WooCommerce and adds a simple 'Request for quotation' form on all product pages instead of it. 6 * Version: 2.0.4 6 * Version: 2.5.0 7 * Requires Plugins: woocommerce 7 8 * Author: Mahafuz <m.mahfuz.me@gmail.com> 8 9 * Author URI: https://github.com/mahafuz/ … … 17 18 18 19 /** 19 * Defining plugin constan s20 * Defining plugin constants. 20 21 * 21 22 * @since 1.2.0 22 23 */ 23 24 define( 'PQFW_PLUGIN_FILE', __FILE__ ); 24 define( 'PQFW_PLUGIN_NAME', __( 'Products Quotation For WooCommerce', ' pqfw' ) );25 define( 'PQFW_PLUGIN_NAME', __( 'Products Quotation For WooCommerce', 'quotify' ) ); 25 26 define( 'PQFW_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 26 27 define( 'PQFW_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); 28 define( 'PQFW_PLUGIN_SLUG', 'pqfw-product-quotations' ); 29 30 define( 'PQFW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) ); 31 define( 'PQFW_PLUGIN_ROOT_URI', plugins_url( '/', __FILE__ ) ); 32 define( 'PQFW_PLUGIN_ROOT_DIR_PATH', plugin_dir_path( __FILE__ ) ); 33 34 define( 'PQFW_PLUGIN_ASSETS', trailingslashit( PQFW_PLUGIN_URL . 'assets' ) ); 35 define( 'PQFW_PLUGIN_ASSETS_DIR', trailingslashit( PQFW_PLUGIN_PATH . 'assets' ) ); 36 define( 'PQFW_ADDONS_DIR_PATH', trailingslashit( PQFW_PLUGIN_PATH . 'addons' ) ); 37 define( 'PQFW_ADDONS_SETTINGS_KEY', 'pqfw_addons' ); 27 38 define( 'PQFW_PLUGIN_LANGUAGES_PATH', plugin_dir_path( __FILE__ ) . 'languages/' ); 28 define( 'PQFW_PLUGIN_VIEWS', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes/Views' ) ); 29 define( 'PQFW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) ); 30 define( 'PQFW_PLUGIN_VERSION', '2.0.4' ); 39 define( 'PQFW_PLUGIN_VIEWS', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes/views' ) ); 40 define( 'PQFW_PLUGIN_VERSION', '2.5.0' ); 31 41 32 42 /** … … 42 52 require PQFW_PLUGIN_PATH . 'includes/PQFW.php'; 43 53 44 add_action( 'plugins_loaded', function () {54 add_action( 'plugins_loaded', function () { 45 55 pqfw(); 46 56 }); 47 48 /**49 * Initialize the plugin tracker50 *51 * @since 1.2.052 * @return void53 */54 function appsero_init_tracker_product_quotation_for_woocommerce() {55 if ( ! class_exists( 'Appsero\Client' ) ) {56 require PQFW_PLUGIN_PATH . 'appsero/client/src/Client.php';57 }58 59 $client = new Appsero\Client(60 'e806fe7d-f314-425d-8be4-9f62fdaf71cf',61 'Product Quotation - Product Quotation For WooCommerce',62 __FILE__63 );64 65 // Active insights.66 $client->insights()->init();67 }68 appsero_init_tracker_product_quotation_for_woocommerce();
Note: See TracChangeset
for help on using the changeset viewer.