Skip to content

Instantly share code, notes, and snippets.

View cbarley10's full-sized avatar

Connor cbarley10

View GitHub Profile
{
"MA": [
{
"title": "What Will Solar Panels Cost in Massachusetts in 2024?",
"link": "https://www.consumeraffairs.com/solar-energy/massachusetts-solar-panel-cost.html",
"image": "https://ci3.googleusercontent.com/meips/ADKq_NZVQl7ArzpfFm_UmEsMO7lqQOVB78w6bGyfCoXpLPn8KTiBryN6Sjb3-a2C5n-5RB0RGeyjSITFQPee6_3MMI9mnjHaL0FY5GNPs-V_uPmu_yCNbQaWOjog5Rkd7Tccw2eUjkrL1aJHViYYE9gc6ylmF_s5GpVQJbX0bPMleVbURKntpBhpaez5Y5xdiaI0Fg1KmNH3iEvY4-rnqf16BtdkfQGaChBJixdvTRYzlaWDD9VGwXLVDBOHLDUioUVjIWzDnn99ILIA4ycXE9EsfpMQCCAqan8lmUTVnnw7IZUMX5U=s0-d-e1-ft#https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/669d5713-9b6a-46bb-bd7e-c542cff6dd6a/8daf31f6608b49a79b6c4d7f39ec0114/_CATEGORY%20IMAGES/Solar_heros/Solar_hero__0003_Email-Hero-Solar-5.png",
"description": "How much will it cost to install solar panels where you live? It varies greatly state by state, so we've crunched the numbers.",
"categories": ["solar", "homeowners"],
"id": 1
},
{
"ticketnetwork": {
"base_url": "https://www.ticketnetwork.com",
"logo": "https://www.ticketnetwork.com/e/_next/image?url=%2Ftn-logo-desktop.png&w=640&q=75",
"from_address": "hello@ticketnetwork.com",
"test": "{{ person.first_name }}",
"sender_name": "Ticket Network",
"some_html": "<h1>Test</h1>"
},
"tickets_expert": {
<?xml version="1.0" encoding="UTF-8"?>
<products>
<title>ProductsUp Xml Export</title>
<link>http://www.productsup.io</link>
<description>this file contains all productdata converted to Blank Export (with ID) xml. file was created at: 2024-04-07 13:22:14</description>
<product>
<id>4433068</id>
<Title>Justice Design Group Ambiance Wall Sconce</Title>
<URL>https://www.1800lighting.com/justice-design-group-ambiance-8-inch-wall-sconce-4433068.html</URL>
<Image_URL>https://www.1800lighting.com/dw/image/v2/BCFP_PRD/on/demandware.static/-/Sites-masterCatalog_capitollighting/default/dwf37e8d46/images/original/Justice-Design-Group_CER-6270-MAT_App.jpg</Image_URL>
[{
"venue_address": "55 Davis Square",
"venue_address2": "Crystal Ballroom",
"venue_city": "Somerville",
"venue_state": "MA",
"venue_postal_code": "02144",
"venue_country": "United States",
"venue_id": "1",
"venue_address_01": "55 Davis Square",
"venue_address2_01": "Crystal Ballroom",
@cbarley10
cbarley10 / priority.json
Created February 20, 2024 21:50
casperpriority.json
[{
"Name": "Casper Mattress 2023",
"ItemID": "123",
"Priority": 1
},
{
"Name": "Snow Mattress 2023",
"ItemID": "234",
"Priority": 2
},
<!DOCTYPE html>
<html class="no-js ie6 oldie" lang="en-US">
<html class="no-js ie7 oldie" lang="en-US">
<html class="no-js ie8 oldie" lang="en-US">
<html class="no-js" lang="en-US">
<head>
<title>inhisname.com | 520: Web server is returning an unknown error</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
@cbarley10
cbarley10 / catalog.json
Last active September 27, 2022 16:37
Custom Catalog Example with Store Categories
[
{
"id":"product1-man-stmarys",
"title":"Product1 Vape",
"link":"websitelinkhere",
"description":"product1 description",
"price":10,
"image_link":"imagelinkhere",
"categories":["vapes","manitoba","stmarys_street"],
"inventory_quantity":0,
def save_order_shipments(self, order):
if not order["shipments"]:
return
customer_properties_dict = copy.deepcopy(order["customer"])
customer_properties = CustomerProperties(
email=customer_properties_dict.pop(ProfileConstants.EMAIL_KEY)
)
customer_properties.set_custom_properties(customer_properties_dict)
def save_order_items(self, order):
if order["state"] not in ("complete",):
return
timestamp = (order["completed"] or order["updated"]) + timedelta(seconds=1)
for item in order["items"]:
quantity = item["Quantity"]
if not quantity:
def save_order(self, order):
# Check to see if there are any items in the order
# We checked earlier but we need to check again for Spree v2.0
if (
not order["customer"][ProfileConstants.EMAIL_KEY]
or not is_valid_email(order["customer"][ProfileConstants.EMAIL_KEY])
or not order["items"]
):
return