Changeset 3055588
- Timestamp:
- 03/20/2024 07:36:18 PM (2 years ago)
- Location:
- shop-2-api/trunk
- Files:
-
- 8 edited
-
assets/bol2api_common_scripts.js (modified) (2 diffs)
-
includes/Api/Shop2ApiConnect.php (modified) (1 diff)
-
includes/Base/AjaxButtonActions.php (modified) (2 diffs)
-
includes/Tables/Bol2WcOrderReport.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
shop-2-api.php (modified) (2 diffs)
-
templates/dashboard.php (modified) (4 diffs)
-
translation/shop2api_dashboard.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shop-2-api/trunk/assets/bol2api_common_scripts.js
r2825412 r3055588 2 2 $( document ).ready( function() { 3 3 $( '#sync-wc-product' ).on( 'click', sync_woocommerce_to_bol); 4 $( '#refresh-dropdowns' ).on( 'click', refresh_dropdown); 4 5 $( '.shop-2-api-connect-save-sync' ).on( 'click', sync_woocommerce_to_bol); 5 6 $('.content').show("slow"); … … 30 31 } 31 32 }); 32 }; 33 } 34 35 function refresh_dropdown() { 36 let data = { 37 'action' : 'refresh_wc_dropdowns', 38 'nonce' : settings.nonce 39 }; 40 41 $.post( settings.ajaxurl, data, function( response ) { 42 if ( response.success === true ) { 43 alert('Dropdowns should be refreshed.') 44 } else { 45 alert("There was an error retrieving the data:" + response.data); 46 } 47 }); 48 } 33 49 })( jQuery ); -
shop-2-api/trunk/includes/Api/Shop2ApiConnect.php
r3034619 r3055588 352 352 return wp_remote_post( 353 353 $this->shop_2_api_url . '/woocommerce/start_product_sync/', 354 [ 355 'headers' => $this->header 356 ] 357 ); 358 } 359 public function refresh_wc_dropdowns() 360 { 361 return wp_remote_post( 362 $this->shop_2_api_url . '/woocommerce/refresh-dropdowns/', 354 363 [ 355 364 'headers' => $this->header -
shop-2-api/trunk/includes/Base/AjaxButtonActions.php
r3034619 r3055588 52 52 // Sync Woocommerce to Bol (sync_woocommerce_to_bol) 53 53 add_action('wp_ajax_sync_woocommerce_to_bol', array($this, 'sync_woocommerce_to_bol')); 54 55 // Refresh WooCommerce Dropdowns 56 add_action('wp_ajax_refresh_wc_dropdowns', array($this, 'refresh_wc_dropdowns')); 54 57 55 58 // Register a free account on shop2api … … 295 298 } 296 299 300 public function refresh_wc_dropdowns(): void 301 { 302 $shop_2_api_response = $this->shop_2_api_connections->refresh_wc_dropdowns(); 303 $this->handle_api_response($shop_2_api_response); 304 } 305 297 306 public function get_bol_connection_report(): void 298 307 { -
shop-2-api/trunk/includes/Tables/Bol2WcOrderReport.php
r2825412 r3055588 79 79 if ($item['status'] == 'ERROR') { 80 80 $last_html .= '<i data-reference="'.$item['reference'].'" id="order-report-icon-stop" class = "material-icons order-report-icon-stop" style="font-size: 22px; cursor:pointer;" title="Do Not Sync (Remove from dashboard)">stop</i>'; 81 $last_html .= '<i data-reference="'.$item['reference'].'" id="order-report-icon-retry" class = "material-icons order-report-icon-retry" style="font-size: 22px; cursor:pointer;" title=" Retry After Error is fixed, this will set the status to PENDING">sync</i>';81 $last_html .= '<i data-reference="'.$item['reference'].'" id="order-report-icon-retry" class = "material-icons order-report-icon-retry" style="font-size: 22px; cursor:pointer;" title="This will remove the order and will be retried.">retry</i>'; 82 82 } 83 83 return wp_kses($last_html, $allowed_html); -
shop-2-api/trunk/readme.txt
r3034619 r3055588 3 3 Plugin URI: https://wordpress.org/plugins/shop-2-api/ 4 4 Tags: WooCommerce, Bol 5 Stable Tag: 1.0. 29.65 Stable Tag: 1.0.30.0 6 6 Requires at least: 5.0 7 7 Requires PHP: 7.2 … … 79 79 2) Fix some Order screen bugs. 80 80 81 = 1.0.31 = 82 1) Added Sync Dropdown and Sync products Button. 81 83 82 84 == Instructions == -
shop-2-api/trunk/shop-2-api.php
r3034619 r3055588 5 5 Plugin URI: https://wordpress.org/plugins/shop-2-api/ 6 6 Description: The plugin Shop2Api will sync products between e-Commerce platforms. The current supported e-Commerce platforms are WooCommerce to Bol.com, and we are working on Amazon, Shopify and others. We added a koopblok service so that you can check if you lower your price can you get koopblok. 7 Version: 1.0.3 0.07 Version: 1.0.31.0 8 8 Requires at least: 5.0 9 9 Requires PHP: 7.2 … … 34 34 define('SHOP2API_PLUGIN_URL', plugin_dir_url( __FILE__ )); 35 35 define('SHOP2API_PLUGIN', plugin_basename( __FILE__ )); 36 define ('VERSION', '1.0.3 0.0');36 define ('VERSION', '1.0.31.0'); 37 37 38 38 // Register items in the project. -
shop-2-api/trunk/templates/dashboard.php
r2983482 r3055588 105 105 </div> 106 106 107 <div class="card inline" id='get-started-card-completed' >107 <div class="card inline" id='get-started-card-completed' style="min-height: 350px"> 108 108 <h1 style="font-weight: bold;"><?php echo $offer_product_heading; ?></h1> 109 109 <div id="connection-completed" class="tooltip"> … … 141 141 </div> 142 142 143 <div class="card inline" id='order-card' >143 <div class="card inline" id='order-card' style="min-height: 350px"> 144 144 <h1 style="font-weight: bold;"><?php echo $order_card_heading ; ?></h1> 145 145 <div id="shop2api-map-order-sync" class="tooltip"> … … 181 181 </div> 182 182 183 <div class="card inline" id='support-buttons' style="min-height: 350px"> 184 <h1 style="font-weight: bold;"><?php echo $support_card_heading ; ?></h1> 185 <div> 186 <p> 187 <label for="sync-wc-product">Sync Products/Offers/Stock Manually</label> 188 </p> 189 <button id="sync-wc-product" class="shop-2-api-connect-save">Sync</button> 190 </div> 191 <div> 192 <p> 193 <label for="refresh-dropdowns">Refresh Category/Attribute Dropdowns</label> 194 </p> 195 <button id="refresh-dropdowns" class="shop-2-api-connect-save">Refresh</button> 196 </div> 197 </div> 198 183 199 <div class="card inline" id='sync-summary-product-card'> 184 200 <h1> … … 204 220 </div> 205 221 206 <div class="card inline" id='sync-summary-offer-card' >222 <div class="card inline" id='sync-summary-offer-card' > 207 223 <h1> 208 224 <?php echo $sync_summary_offer ?> -
shop-2-api/trunk/translation/shop2api_dashboard.php
r2983482 r3055588 43 43 $order_card_stock_sync_tooltip = wp_kses(__("Sync stock after order was synced,"), $allowed_html); 44 44 $order_card_stock_sync_active = wp_kses(__("Sync Stock After Order Synced"), $allowed_html); 45 46 //Support Buttons 47 $support_card_heading = wp_kses(__("Support"), $allowed_html);
Note: See TracChangeset
for help on using the changeset viewer.