feat: Implement Siti Stock Plugin for WooCommerce integration
- Added core plugin structure with main class Siti_Stock_Plugin. - Implemented settings management through Siti_Stock_Settings. - Developed admin interface for settings configuration via Siti_Stock_Admin. - Created inventory management with external stock handling in Siti_Stock_Inventory_Manager. - Integrated synchronization service to fetch and apply stock updates from external API in Siti_Stock_Sync_Service. - Added custom product data store to manage combined stock values in Siti_Stock_Product_Data_Store. - Registered hooks for admin menus, settings, and synchronization processes. - Implemented REST API endpoint for triggering stock sync. - Added cron scheduling for automatic stock synchronization. - Included localization support for Dutch language.
This commit is contained in:
19
assets/css/admin.css
Normal file
19
assets/css/admin.css
Normal file
@@ -0,0 +1,19 @@
|
||||
.siti-stock-settings {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.siti-stock-settings .description {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.siti-stock-cron-info {
|
||||
margin-top: 20px;
|
||||
border-left: 4px solid #2271b1;
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.siti-stock-cron-info.is-visible {
|
||||
display: block;
|
||||
}
|
||||
15
assets/js/admin.js
Normal file
15
assets/js/admin.js
Normal file
@@ -0,0 +1,15 @@
|
||||
(function ($) {
|
||||
function toggleCronInfo() {
|
||||
var info = $('.siti-stock-cron-info');
|
||||
var checkbox = $('[data-siti-stock-toggle="cron"]');
|
||||
|
||||
if (!info.length || !checkbox.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
info.toggleClass('is-visible', checkbox.is(':checked'));
|
||||
}
|
||||
|
||||
$(document).on('change', '[data-siti-stock-toggle="cron"]', toggleCronInfo);
|
||||
$(toggleCronInfo);
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user