Plugin Directory

Changeset 2885872


Ignore:
Timestamp:
03/23/2023 07:20:18 PM (3 years ago)
Author:
ascendedcrow
Message:

Version = 1.0.23 =

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

Legend:

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

    r2868951 r2885872  
    103103    function retrieve_from_shop2api() {
    104104        let json_data = settings.orders_data;
     105        debugger;
    105106        if (json_data.length !== 0) {
    106107            let order_data = json_data[0];
     
    110111            $('#orders-status').val(order_data.status);
    111112            $('#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);
    112115
    113116            document.getElementById("orders-ean").value = order_data.woocommerce_ean_category;
     
    116119            if (order_data.woocommerce_ean_category === 'Product') {
    117120                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') {
    118126                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 {
    123128                populate_metadata_dropdown($('#orders-combideal-ean-value'));
    124129            }
  • shop-2-api/trunk/includes/Api/Shop2ApiConnect.php

    r2868951 r2885872  
    458458    public function set_order_data(
    459459        $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
    461461    )
    462462    {
     
    483483            "combi_deal_ean_field" => $combideal_ean_field,
    484484            "combi_deal_ean_category" => $combideal_ean_category,
     485            "order_email" => $order_email,
     486            "use_bol_price" => ($use_bol_price != ''),
    485487        ];
    486488
  • shop-2-api/trunk/includes/Base/AjaxButtonActions.php

    r2868951 r2885872  
    312312            $_POST['orders-active'], $_POST['orders-status'], $_POST['orders-paid'], $_POST['orders-ean-value'],
    313313            $_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']
    315315        );
    316316
  • shop-2-api/trunk/includes/Base/EnqueueWC.php

    r2871058 r2885872  
    4444        // Custom API Endpoint for getting Metadata
    4545        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        }
    4663    }
    4764
  • shop-2-api/trunk/readme.txt

    r2871058 r2885872  
    33Plugin URI: https://wordpress.org/plugins/shop-2-api/
    44Tags: WooCommerce, Bol
    5 Stable Tag: 1.0.22
     5Stable Tag: 1.0.23
    66Requires at least: 5.0
    77Requires PHP: 7.2
    8 Tested up to: 6.0.2
     8Tested up to: 6.1.1
    99Author: Adriaan Coetzee
    1010Author URI: https://shop2API.com/
     
    1311311) Fix bug where the EAN numbers gets overwritten on quick-save.
    132132
     133= 1.0.23 =
     1341) Added Bol Order Id in the Order List
     1352) Added Use Bol.com Price on the Order Service Screen (Use the price from Bol.com)
     1363) Added WooCommerce Order field to the Order Service Screen (Overwrite the E-Mail received from Bol.com)
     137
    133138== Instructions ==
    1341391) 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  
    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.22
     7Version: 1.0.23
    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.22');
     36define ('VERSION', '1.0.23');
    3737
    3838// Register items in the project.
  • shop-2-api/trunk/templates/bol-order-sync.php

    r2868951 r2885872  
    9696                <td><select name="orders-combideal-ean-value" id="orders-combideal-ean-value"></select></td>
    9797            </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>
    98122            </tbody>
    99123        </table>
Note: See TracChangeset for help on using the changeset viewer.