Skip to content

Orders with variants not being able to be imported  #80

@joaquimchango

Description

@joaquimchango

Hello,
I am using the woocommerce connector on cloud managed site with ERPNExt. Orders with variants are not being imported and error is being thrown with message :
Item with id 22654 is missing in ERPNext! The Order 25176 will not be imported! For details of order see below

{"id": 25176, "parent_id": 0, "status": "completed", "currency": "CHF", "version": "7.8.0", "prices_include_tax": false, "date_created": "2023-05-29T06:09:15", "date_modified": "2023-06-30T13:44:08", "discount_total": "0.00", "discount_tax": "0.00", "shipping_total": "0.00", "shipping_tax": "0.00", "cart_tax": "0.00", "total": "17.90", "total_tax": "0.00", "customer_id": 0, "order_key": "wc_order_Rxc3k5owwBNEq", "billing": {"first_name": "Jurate", "last_name": "Juskaite", "company": "", "address_1": "Avenue Marc-Peter 4C, C16", "address_2": "", "city": "Versoix", "state": "GE", "postcode": "1290", "country": "CH", "email": "juratejuskaite@gmail.com", "phone": "0795493013"}, "shipping": {"first_name": "Jurate", "last_name": "Juskaite", "company": "", "address_1": "Avenue Marc-Peter 4C, C16", "address_2": "", "city": "Versoix", "state": "GE", "postcode": "1290", "country": "CH", "phone": ""}, "payment_method": "woocommerce_payments", "payment_method_title": "Visa credit card", "transaction_id": "pi_3NCzG0C7PbPhrUrq12ifCtqs", "customer_ip_address": "195.65.131.222", "customer_user_agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36", "created_via": "checkout", "customer_note": "", "date_completed": "2023-06-30T13:44:08", "date_paid": "2023-05-29T06:09:25", "cart_hash": "d68524cc1eebb9d751f26e2bcd5f0967", "number": "25176", "meta_data": [{"id": 321934, "key": "is_vat_exempt", "value": "no"}, {"id": 321935, "key": "trp_language", "value": "en_US"}, {"id": 321936, "key": "_intent_id", "value": "pi_3NCzG0C7PbPhrUrq12ifCtqs"}, {"id": 321937, "key": "_intention_status", "value": "succeeded"}, {"id": 321938, "key": "_stripe_customer_id", "value": "cus_NyxA48FtP7Ah4k"}, {"id": 321939, "key": "_wcpay_intent_currency", "value": "chf"}, {"id": 321941, "key": "_wcpay_fraud_meta_box_type", "value": "payment_started"}, {"id": 321942, "key": "_payment_method_id", "value": "pm_1NCzGcC7PbPhrUrqz3BGUB35"}, {"id": 321943, "key": "_charge_id", "value": "ch_3NCzG0C7PbPhrUrq1DhMT4gV"}, {"id": 321946, "key": "_wcpay_transaction_fee", "value": "0.82"}, {"id": 321948, "key": "_new_order_tracking_complete", "value": "yes"}, {"id": 762070, "key": "_woofunnel_custid", "value": "0"}, {"id": 762071, "key": "_woofunnel_cid", "value": "5"}], "line_items": [{"id": 1, "name": "African Print Casual Men's T-Shirt", "product_id": 22654, "variation_id": 22809, "quantity": 1, "tax_class": "", "subtotal": "17.90", "subtotal_tax": "0.00", "total": "17.90", "total_tax": "0.00", "taxes": [], "meta_data": [{"id": 10, "key": "size", "value": "XS", "display_key": "Size", "display_value": "XS"}, {"id": 11, "key": "style", "value": "9style", "display_key": "style", "display_value": "9style"}], "sku": "CJYH150375711KP", "price": 17.9, "image": {"id": 22808, "src": "https://fractal-african-fashion.com/wp-content/uploads/2023/04/a07e4ca8-57b7-4aa9-bca5-e2646df30a37-10.jpg"}, "parent_name": "African Print Casual Men's T-Shirt"}], "tax_lines": [], "shipping_lines": [{"id": 2, "method_title": "Free shipping", "method_id": "free_shipping", "instance_id": "1", "total": "0.00", "total_tax": "0.00", "taxes": [], "meta_data": [{"id": 17, "key": "Items", "value": "African Print Casual Men's T-Shirt × 1", "display_key": "Items", "display_value": "African Print Casual Men's T-Shirt × 1"}]}], "fee_lines": [], "coupon_lines": [], "refunds": [], "payment_url": "https://fractal-african-fashion.com/checkout/order-pay/25176/?pay_for_order=true&key=wc_order_Rxc3k5owwBNEq", "is_editable": false, "needs_payment": false, "needs_processing": true, "date_created_gmt": "2023-05-29T06:09:15", "date_modified_gmt": "2023-06-30T13:44:08", "date_completed_gmt": "2023-06-30T13:44:08", "date_paid_gmt": "2023-05-29T06:09:25", "currency_symbol": "CHF", "_links": {"self": [{"href": "https://fractal-african-fashion.com/wp-json/wc/v3/orders/25176"}], "collection": [{"href": "https://fractal-african-fashion.com/wp-json/wc/v3/orders"}]}}

When checking items list, ID 22654 it appears under a template not a variant. Is there anyway to fix the item_code which is given to each product?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions