Adding loyalty program coupon entry to form by click (#343)
This commit is contained in:
parent
78fd206c0c
commit
dac3c9f6f7
@ -1,3 +1,6 @@
|
||||
## 2024-09-11 4.8.3
|
||||
* Added loyalty program coupon entry in the form by click
|
||||
|
||||
## 2024-08-26 4.8.2
|
||||
* Fixed base file customization issue
|
||||
* Added a hook to update the list of meta fields
|
||||
|
6
src/assets/js/retailcrm-loyalty-cart.js
Normal file
6
src/assets/js/retailcrm-loyalty-cart.js
Normal file
@ -0,0 +1,6 @@
|
||||
function inputLoyaltyCode() {
|
||||
let couponInput = document.getElementById('coupon_code');
|
||||
let couponCode = document.getElementById('input_loyalty_code');
|
||||
|
||||
couponInput.value = couponCode.innerText;
|
||||
}
|
@ -747,6 +747,13 @@ if (!class_exists('WC_Retailcrm_Base')) {
|
||||
if ($result) {
|
||||
echo $result;
|
||||
}
|
||||
|
||||
$jsScriptPath = plugins_url() . self::ASSETS_DIR . '/js/retailcrm-loyalty-cart.js';
|
||||
$wpAdminUrl = ['url' => get_admin_url()];
|
||||
|
||||
wp_register_script('retailcrm-loyalty-cart', $jsScriptPath, false, '0.1');
|
||||
wp_enqueue_script('retailcrm-loyalty-cart', $jsScriptPath, '', '', true);
|
||||
wp_localize_script('retailcrm-loyalty-cart', 'AdminUrl', $wpAdminUrl);
|
||||
} catch (Throwable $exception) {
|
||||
writeBaseLogs($exception->getMessage());
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ if (!class_exists('WC_Retailcrm_Loyalty')) :
|
||||
}
|
||||
|
||||
$resultString .= ' <div style="text-align: left; line-height: 3"><b>' . __('It is possible to write off', 'retailcrm') . ' ' . $lpDiscountSum . ' ' . __('bonuses', 'retailcrm') . '</b></div>';
|
||||
return $resultString. '<div style="text-align: left;"><b>' . __('Use coupon:', 'retailcrm') . ' <u><i>' . $coupon->get_code() . '</i></u></i></b></div>';
|
||||
return $resultString. '<div style="text-align: left;"><b>' . __('Use coupon:', 'retailcrm') . ' <u><i style="cursor: grab" id="input_loyalty_code" onclick="inputLoyaltyCode()">' . $coupon->get_code() . '</i></u></i></b></div>';
|
||||
}
|
||||
|
||||
public function clearLoyaltyCoupon()
|
||||
|
@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla
|
||||
Requires PHP: 7.0
|
||||
Requires at least: 5.3
|
||||
Tested up to: 6.5
|
||||
Stable tag: 4.8.2
|
||||
Stable tag: 4.8.3
|
||||
License: GPLv1 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-1.0.html
|
||||
|
||||
@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
|
||||
|
||||
|
||||
== Changelog ==
|
||||
= 4.8.3 =
|
||||
* Added loyalty program coupon entry in the form by click
|
||||
|
||||
= 4.8.2 =
|
||||
* Fixed base file customization issue
|
||||
* Added a hook to update the list of meta fields
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Description: Integration plugin for WooCommerce & Simla.com
|
||||
* Author: RetailDriver LLC
|
||||
* Author URI: http://retailcrm.pro/
|
||||
* Version: 4.8.2
|
||||
* Version: 4.8.3
|
||||
* Tested up to: 6.5
|
||||
* Requires Plugins: woocommerce
|
||||
* WC requires at least: 5.4
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @link https://wordpress.org/plugins/woo-retailcrm/
|
||||
*
|
||||
* @version 4.8.2
|
||||
* @version 4.8.3
|
||||
*
|
||||
* @package RetailCRM
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user