This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import csv | |
import os | |
import re | |
def natural_sort_key(s): | |
return [int(text) if text.isdigit() else text.lower() for text in re.split(r'(\d+)', s)] | |
orders_dir = "orders" | |
xml_files = sorted([os.path.join(orders_dir, file) for file in os.listdir(orders_dir) if file.endswith(".xml")], key=natural_sort_key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Shopify provides no way to accept all Product Category suggestions from the admin, or via matrixify import. | |
* Select all products via Product admin, Bulk Edit, open dev tools and paste in the below JS to click accept | |
* on each suggestion, and keep scrolling the page to reveal more suggestions and keep accepting. | |
* Once done, hit Save. | |
*/ | |
async function clickAndScroll() { | |
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
const scrollContainer = document.querySelector('._ScrollContainer_vnhhx_5._RightPadding_vnhhx_15'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var values = ["Red","Green","Blue"]; | |
var unique = values.filter(filterunique); | |
jQuery.each(unique, function(index,value) { | |
if(!jQuery('input[value="'+value+'"]').length) { | |
jQuery('#add_new_option_button').click(); | |
jQuery('#manage-options-panel table tbody tr:last-child .required-option').val(value); | |
} | |
}); |