Plugin Directory

Changeset 3015222


Ignore:
Timestamp:
12/28/2023 06:08:43 PM (2 years ago)
Author:
ascendedcrow
Message:

1.0.29.3: Dropdown fix

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

Legend:

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

    r3012560 r3015222  
    379379    function set_wc_category_field_dropdown() {
    380380        let items = settings.map_data;
     381        let dropdown_items = [];
     382
    381383        let data_container = $('span[name="wc-data-container"]');
    382384        data_container.children().remove();
    383385
    384386        let _select = $('<select />', {name:"wc_cat_dropdown", id:"wc_cat_dropdown", class:"bol-cat-dropdown"});
    385 
    386387        items.forEach(
    387388            function(currentValue) {
    388                 let select_value = {
    389                     value:currentValue.bol_category_code, text:currentValue.bol_category_name
    390                 }
    391                 $('<option />', select_value).appendTo(_select);
     389                let bol_category_code = currentValue.bol_category_code;
     390                let already_added = dropdown_items.includes(bol_category_code);
     391                if (already_added === false) {
     392                    let select_value = {
     393                        value: bol_category_code, text: currentValue.bol_category_name
     394                    }
     395                    $('<option />', select_value).appendTo(_select);
     396                    dropdown_items.push(bol_category_code)
     397                }
    392398            }
    393399        )
  • shop-2-api/trunk/readme.txt

    r3012560 r3015222  
    33Plugin URI: https://wordpress.org/plugins/shop-2-api/
    44Tags: WooCommerce, Bol
    5 Stable Tag: 1.0.29.2
     5Stable Tag: 1.0.29.3
    66Requires at least: 5.0
    77Requires PHP: 7.2
  • shop-2-api/trunk/shop-2-api.php

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