Plugin Directory

Changeset 2738043


Ignore:
Timestamp:
06/06/2022 01:04:55 PM (4 years ago)
Author:
ascendedcrow
Message:

1.0.12

1) Added new features to the order service
1.1) Added the status to which the order will be synced over, "Pending, Processing, On Hold"
1.2) Added marked as paid checkbox where the order will be marked as processing and the stock will be updated accordingly.

Location:
shop-2-api/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • shop-2-api/trunk/assets/shop2api_order.js

    r2720219 r2738043  
    8888        if (json_data.length !== 0) {
    8989            $('#orders-active').prop('checked', json_data[0].active);
     90            $('#orders-status').val(json_data[0].status);
     91            $('#orders-paid').prop('checked', json_data[0].paid);
    9092        }
    9193    }
  • shop-2-api/trunk/includes/Api/Shop2ApiConnect.php

    r2720219 r2738043  
    411411
    412412    // Set Order data
    413     public function set_order_data($active)
     413    public function set_order_data($active, $status, $paid)
    414414    {
    415415        $order = $this->get_order();
     
    427427        $data = [
    428428            'active' => ($active != ''),
     429            'paid' => ($paid != ''),
     430            'status' => $status,
    429431            "product" => $order["id"]
    430432        ];
  • shop-2-api/trunk/includes/Base/AjaxButtonActions.php

    r2720219 r2738043  
    278278        $this->check_nonce();
    279279        $shop_2_api_response = $this->shop_2_api_connections->set_order_data(
    280             $_POST['orders-active']
     280            $_POST['orders-active'], $_POST['orders-status'], $_POST['orders-paid']
    281281        );
    282282
  • shop-2-api/trunk/readme.txt

    r2720219 r2738043  
    87872) Fix small bugs on the koopblok service.
    8888
     89= 1.0.12 =
     901) Added new features to the order service
     911.1) Added the status to which the order will be synced over, "Pending, Processing, On Hold"
     921.2) Added marked as paid checkbox where the order will be marked as processing and the stock will be updated accordingly.
     93
    8994== Instructions ==
    90951) 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

    r2720219 r2738043  
    55Plugin URI: https://wordpress.org/plugins/shop-2-api/
    66Description: 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.11
     7Version: 1.0.12
    88Requires at least: 5.0
    99Requires PHP:      7.2
     
    3434define('SHOP2API_PLUGIN_URL', plugin_dir_url( __FILE__ ));
    3535define('SHOP2API_PLUGIN', plugin_basename( __FILE__ ));
    36 define ('VERSION', '1.0.11');
     36define ('VERSION', '1.0.12');
    3737
    3838// Register items in the project.
  • shop-2-api/trunk/templates/bol-order-sync.php

    r2720219 r2738043  
    1919                            <span id="active" class="error-message"></span>
    2020                        </td>
     21                    </tr>
     22                    <tr>
     23                        <td title="Set Incoming Orders as Paid, this will set the status in processing and update stock items."
     24                            style="padding: 15px 0px 0px 0px;">
     25                            <span class="dashicons dashicons-info-outline"></span>
     26                        </td>
     27                        <td>
     28                            <label for="orders-paid">Incoming Orders Is Paid (Reduce Stock Items)</label>
     29                        </td>
     30                        <td>
     31                            <input type="checkbox" name="orders-paid" id="orders-paid"/>
     32                            <span id="paid" class="error-message"></span>
     33                        </td>
    2134                    </tr>
    22 <!--                    <tr>-->
    23 <!--                        <td title="The EAN Field on WooCommerce." style="padding: 15px 0px 0px 0px;">-->
    24 <!--                            <span class="dashicons dashicons-info-outline"></span>-->
    25 <!--                        </td>-->
    26 <!--                        <td>-->
    27 <!--                            <label>WooCommerce EAN Field</label>-->
    28 <!--                        </td>-->
    29 <!--                        <td>-->
    30 <!--                            <select name="wc-ean-field" id="wc-ean-field" ></select>-->
    31 <!--                            <span id="woocommerce_ean_field" class="error-message"></span>-->
    32 <!--                        </td>-->
    33 <!--                    </tr>-->
     35                    <tr>
     36                        <td title="Set the status of the incoming order to a pre-defined WC status."
     37                            style="padding: 15px 0px 0px 0px;">
     38                            <span class="dashicons dashicons-info-outline"></span>
     39                        </td>
     40                        <td>
     41                            <label for="orders-status">Incoming Orders Status</label>
     42                        </td>
     43                        <td>
     44                            <select name="orders-status" id="orders-status">
     45                                <option value="pending">Pending</option>
     46                                <option value="processing">Processing</option>
     47                                <option value="on-hold">On-Hold</option>
     48                                <option value="completed">Completed</option>
     49                            </select>
     50                            <span id="status" class="error-message"></span>
     51                        </td>
     52                    </tr>
    3453                </tbody>
    3554            </table>
Note: See TracChangeset for help on using the changeset viewer.