Changeset 2885872
- Timestamp:
- 03/23/2023 07:20:18 PM (3 years ago)
- Location:
- shop-2-api/trunk
- Files:
-
- 7 edited
-
assets/shop2api_order.js (modified) (3 diffs)
-
includes/Api/Shop2ApiConnect.php (modified) (2 diffs)
-
includes/Base/AjaxButtonActions.php (modified) (1 diff)
-
includes/Base/EnqueueWC.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
shop-2-api.php (modified) (2 diffs)
-
templates/bol-order-sync.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shop-2-api/trunk/assets/shop2api_order.js
r2868951 r2885872 103 103 function retrieve_from_shop2api() { 104 104 let json_data = settings.orders_data; 105 debugger; 105 106 if (json_data.length !== 0) { 106 107 let order_data = json_data[0]; … … 110 111 $('#orders-status').val(order_data.status); 111 112 $('#orders-paid').prop('checked', order_data.paid); 113 $('#orders-use-bol-price').prop('checked', order_data.use_bol_price); 114 $('#orders-email').val(order_data.order_email); 112 115 113 116 document.getElementById("orders-ean").value = order_data.woocommerce_ean_category; … … 116 119 if (order_data.woocommerce_ean_category === 'Product') { 117 120 populate_product_dropdown($('#orders-ean-value')); 121 122 } else { 123 populate_metadata_dropdown($('#orders-ean-value')); 124 } 125 if (order_data.combi_deal_ean_category === 'Product') { 118 126 populate_product_dropdown($('#orders-combideal-ean-value')); 119 } 120 121 if (order_data.woocommerce_ean_category === 'MetaData') { 122 populate_metadata_dropdown($('#orders-ean-value')); 127 } else { 123 128 populate_metadata_dropdown($('#orders-combideal-ean-value')); 124 129 } -
shop-2-api/trunk/includes/Api/Shop2ApiConnect.php
r2868951 r2885872 458 458 public function set_order_data( 459 459 $active, $status, $paid, $woocommerce_ean_field, $woocommerce_ean_category, $combideal_active, 460 $combideal_ean_field, $combideal_ean_category 460 $combideal_ean_field, $combideal_ean_category, $order_email, $use_bol_price 461 461 ) 462 462 { … … 483 483 "combi_deal_ean_field" => $combideal_ean_field, 484 484 "combi_deal_ean_category" => $combideal_ean_category, 485 "order_email" => $order_email, 486 "use_bol_price" => ($use_bol_price != ''), 485 487 ]; 486 488 -
shop-2-api/trunk/includes/Base/AjaxButtonActions.php
r2868951 r2885872 312 312 $_POST['orders-active'], $_POST['orders-status'], $_POST['orders-paid'], $_POST['orders-ean-value'], 313 313 $_POST['orders-ean'], $_POST['orders-combideals-active'], $_POST['orders-combideal-ean-value'], 314 $_POST['orders-combideal-ean'] 314 $_POST['orders-combideal-ean'], $_POST['orders-email'], $_POST['orders-use-bol-price'] 315 315 ); 316 316 -
shop-2-api/trunk/includes/Base/EnqueueWC.php
r2871058 r2885872 44 44 // Custom API Endpoint for getting Metadata 45 45 add_action( 'rest_api_init', array($this, 'register_meta_field_search_endpoint' )); 46 47 // Add Bol Order Id in the Order List 48 add_filter( 'manage_edit-shop_order_columns', array($this, 'add_custom_metadata_column_to_order_list' )); 49 add_action( 'manage_shop_order_posts_custom_column', array($this, 'display_custom_metadata_column_value'), 10, 2 ); 50 51 } 52 // Add Bol Number in Order List 53 function add_custom_metadata_column_to_order_list( $columns ) { 54 $columns['bol_order_id'] = 'Bol Order Id'; 55 return $columns; 56 } 57 function display_custom_metadata_column_value( $column, $post_id ) { 58 if ( $column == 'bol_order_id' ) { 59 $order = wc_get_order( $post_id ); 60 $custom_metadata_value = $order->get_meta( 'bol_order_id', true ); 61 echo $custom_metadata_value; 62 } 46 63 } 47 64 -
shop-2-api/trunk/readme.txt
r2871058 r2885872 3 3 Plugin URI: https://wordpress.org/plugins/shop-2-api/ 4 4 Tags: WooCommerce, Bol 5 Stable Tag: 1.0.2 25 Stable Tag: 1.0.23 6 6 Requires at least: 5.0 7 7 Requires PHP: 7.2 8 Tested up to: 6. 0.28 Tested up to: 6.1.1 9 9 Author: Adriaan Coetzee 10 10 Author URI: https://shop2API.com/ … … 131 131 1) Fix bug where the EAN numbers gets overwritten on quick-save. 132 132 133 = 1.0.23 = 134 1) Added Bol Order Id in the Order List 135 2) Added Use Bol.com Price on the Order Service Screen (Use the price from Bol.com) 136 3) Added WooCommerce Order field to the Order Service Screen (Overwrite the E-Mail received from Bol.com) 137 133 138 == Instructions == 134 139 1) After installing Shop2Api, a new menu item will be available in your WordPress installation, you can continue and click on it and enter you token which was mailed to you. -
shop-2-api/trunk/shop-2-api.php
r2871058 r2885872 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.2 27 Version: 1.0.23 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.2 2');36 define ('VERSION', '1.0.23'); 37 37 38 38 // Register items in the project. -
shop-2-api/trunk/templates/bol-order-sync.php
r2868951 r2885872 96 96 <td><select name="orders-combideal-ean-value" id="orders-combideal-ean-value"></select></td> 97 97 </tr> 98 <tr> 99 <td title="The E-Mail that will be on the order (E-Mails will be sent to this address)" style="padding: 15px 0px 0px 0px;"> 100 <span class="dashicons dashicons-info-outline"></span> 101 </td> 102 <td> 103 <label for="orders-email">WooCommerce Order E-Mail</label> 104 </td> 105 <td> 106 <input name="orders-email" id="orders-email" type="email"/> 107 <span id="orders-email" class="error-message"></span> 108 </td> 109 </tr> 110 <tr> 111 <td title="Use the price on the orders as it is on Bol.com and not as it is in WooCommerce" style="padding: 15px 0px 0px 0px;"> 112 <span class="dashicons dashicons-info-outline"></span> 113 </td> 114 <td> 115 <label for="orders-use-bol-price">Use Bol.com Price</label> 116 </td> 117 <td> 118 <input type="checkbox" name="orders-use-bol-price" id="orders-use-bol-price"/> 119 <span id="use-bol-price" class="error-message"></span> 120 </td> 121 </tr> 98 122 </tbody> 99 123 </table>
Note: See TracChangeset
for help on using the changeset viewer.