コード例 #1
0
def update_variant_images():
    shop = Shopify()
    store_products = get_all_products(shopify.Product)
    source_products = save_products_in_db.get_source_products()
    for store in store_products:
        for source in source_products:
            if store.handle == source['handle'] and store.handle == 'american-eagle-long-sleeves-pique-polo-shirt':
                shop.create_image_of_variants(source, store)
コード例 #2
0
def update_variant_by_handle():
    shop = Shopify()
    store_products = get_all_products(shopify.Product)
    source_products = save_products_in_db.get_source_products()
    for product in store_products:
        if product.handle == 'mustang-cotton-stretch-ankle-socks':
            for source in source_products:
                if source['handle'] == 'mustang-cotton-stretch-ankle-socks':
                    shop.create_image_of_variants(source, product)