Plugin Directory

Changeset 2825412


Ignore:
Timestamp:
11/28/2022 06:28:12 PM (3 years ago)
Author:
ascendedcrow
Message:

Updated front end to add Other Images to be send to Bol.com

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

Legend:

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

    r2778437 r2825412  
    146146            "value": "sku"
    147147        },
    148         "Name": {
    149             "type": "Product",
    150             "value": "name"
    151         },
    152         "Description": {
    153             "type": "Product",
    154             "value": "description"
    155         },
     148        // "Name": {
     149        //     "type": "Product",
     150        //     "value": "name"
     151        // },
     152        // "Description": {
     153        //     "type": "Product",
     154        //     "value": "description"
     155        // },
    156156        "stock.amount": {
    157             "type": "Product",
    158             "value": "stock_quantity"
     157            "type": "OwnValue",
     158            "value": "0"
    159159        },
    160160        "condition.name": {
    161161            "type": "OwnValue",
    162162            "value": "NEW"
    163         },
    164         "Cover Image URL": {
    165             "type": "Product",
    166             "value": "images|src"
    167163        },
    168164        "fulfilment.method": {
  • shop-2-api/trunk/assets/bol2api_mapping_scripts.js

    r2795752 r2825412  
    161161            obj = woocommerce_option_properties[item];
    162162
    163             if (obj.type=="array") {
     163            if (obj.type === "array") {
    164164                if (item === "images") {
    165165                    for (const sub_item in obj.items.properties) {
     166                        if (sub_item !== 'src') {
     167                            continue;
     168                        }
     169
    166170                        let value_text = item + '|' + sub_item;
    167171                        let dropdown_values = {"value": value_text, "text": value_text}
     
    170174                            dropdown_values['selected'] = 'selected';
    171175                        }
    172                        
     176
    173177                        $('<option />', dropdown_values).appendTo(_select);
     178
     179                        for (let i = 1; i <= 20; i++) {
     180                            let value_text = item + '|' + sub_item + '|' + String(i);
     181                            let dropdown_values = {"value": value_text, "text": value_text}
     182
     183                            if (data['saved_value'] === value_text) {
     184                                dropdown_values['selected'] = 'selected';
     185                            }
     186
     187                            $('<option />', dropdown_values).appendTo(_select);
     188                        }
    174189                    }
    175190                }
     
    404419                unit_value.name = value.name + ' (Unit)';
    405420                unit_value.id = value.id + '_unit';
    406                 debugger;
    407421                add_product_mapping_row(unit_value,true);
    408422            }
  • shop-2-api/trunk/includes/Api/Shop2ApiConnect.php

    r2781839 r2825412  
    2121        $this->shop_2_api_url = getenv('SHOP_2_API_URL', true) ? getenv('SHOP_2_API_URL') : "https://www.shop2apidevelopment.com";
    2222        $this->header = ['Authorization' => 'Token ' . $token];
    23         if (get_site_url() == 'http://localhost:8000') {
     23        if (get_site_url() == 'http://localhost:8000' || get_site_url() == 'http://127.0.0.1:8000') {
    2424            $this->header = array_merge($this->header, ['authurl' => "https://pepperwall.nl/bol"]);
    2525        } else {
  • shop-2-api/trunk/readme.txt

    r2795752 r2825412  
    33Plugin URI: https://wordpress.org/plugins/shop-2-api/
    44Tags: WooCommerce, Bol
    5 Stable Tag: 1.0.16
     5Stable Tag: 1.0.17
    66Requires at least: 5.0
    77Requires PHP: 7.2
     
    1101102) Add icon if the value provided should be an image.
    111111
     112= 1.0.17 =
     1131) Updated front end to add Other Images to be send to Bol.com
     114
    112115== Instructions ==
    1131161) 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

    r2795752 r2825412  
    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.16
     7Version: 1.0.17
    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.16');
     36define ('VERSION', '1.0.17');
    3737
    3838// Register items in the project.
Note: See TracChangeset for help on using the changeset viewer.