• Resolved mk8436

    (@mk8436)


    I’m not able to add to cart via CoCart api through Gravity nested form webhook. In logged in user I’m getting success response from api when webhook trigger but cart was empty every time.

    Please check screenshot : https://uploadnow.io/files/QBdyDVB

    Getting woocommerce error log from cocart

    2023-04-11T05:34:31+00:00 DEBUG 
    ====CoCart Lite Version: 3.8.1====
    ====Start Log April 11, 2023 @ 1:34 am====
    cocart_return_empty_cart is deprecated since version 3.0.0! Use cocart_empty_cart instead. But only if you are using API v2.
    ====End Log====
    
    
    2023-04-11T05:34:31+00:00 DEBUG 
    ====CoCart Lite Version: 3.8.1====
    ====Start Log April 11, 2023 @ 1:34 am====
    cocart_ok_to_add_response is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API.
    ====End Log====
    
    
    2023-04-11T05:34:31+00:00 DEBUG 
    ====CoCart Lite Version: 3.8.1====
    ====Start Log April 11, 2023 @ 1:34 am====
    cocart_ok_to_add is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API.
    ====End Log====
    
    

    Let me know what is the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    If you are referring to Gravity Forms webhook then you may not have authenticated CoCart.

    I’m going to be frank with you. I don’t support Gravity Forms so I don’t know what it’s capable of doing but it looks like it’s documented well so it should provide the answers your looking for if you look harder.

    As you have to be a customer of Gravity Forms to use it, I’m sure they have a support team that can help you further.

    Thank you.

    Thread Starter mk8436

    (@mk8436)

    Thank you for your response,

    Please check above woocommerce debug log where all issue from cocart api. please can you explain?

    Plugin Author Sébastien Dumont

    (@sebd86)

    They are just warnings that show to developers if WP_DEBUG is set to true.

    Thread Starter mk8436

    (@mk8436)

    I’m getting coCart response but not able add to cart front end on cart page. Also added cart item on cocart_carts table. but cart page always show empty.

    please check response

    {
        "data": {
            "cart_hash": "2f40a64c0c16e4aa04bcb43566c38d23",
            "cart_key": "6e11c7fdc644fb584db1cf47abb2252c",
            "currency": {
                "currency_code": "USD",
                "currency_symbol": "$",
                "currency_minor_unit": 2,
                "currency_decimal_separator": ".",
                "currency_thousand_separator": ",",
                "currency_prefix": "$",
                "currency_suffix": ""
            },
            "customer": {
                "billing_address": {
                    "billing_first_name": "",
                    "billing_last_name": "",
                    "billing_company": "",
                    "billing_country": "US",
                    "billing_address_1": "",
                    "billing_address_2": "",
                    "billing_city": "",
                    "billing_state": "NY",
                    "billing_postcode": "",
                    "billing_phone": "",
                    "billing_email": ""
                },
                "shipping_address": {
                    "shipping_first_name": "",
                    "shipping_last_name": "",
                    "shipping_company": "",
                    "shipping_country": "US",
                    "shipping_address_1": "",
                    "shipping_address_2": "",
                    "shipping_city": "",
                    "shipping_state": "NY",
                    "shipping_postcode": ""
                }
            },
            "items": [
                {
                    "item_key": "8c4affa31b07160b64a5acb0e447e3e0",
                    "id": 327,
                    "name": "2022-23 Afterschool DRILLS. SKILLS. FUN.",
                    "title": "2022-23 Afterschool DRILLS. SKILLS. FUN.",
                    "price": "3500",
                    "quantity": {
                        "value": 1,
                        "min_purchase": 1,
                        "max_purchase": -1
                    },
                    "totals": {
                        "subtotal": "3500",
                        "subtotal_tax": 0,
                        "total": 35,
                        "tax": 0
                    },
                    "slug": "2021-22-afterschool-drills-skills-fun-registration-10",
                    "meta": {
                        "product_type": "subscription_variation",
                        "sku": "",
                        "dimensions": {
                            "length": "",
                            "width": "",
                            "height": "",
                            "unit": "in"
                        },
                        "weight": 0,
                        "variation": {
                            "Billing period": "Weekly",
                            "Attendance": "1 Day per week"
                        },
                        "virtual": true,
                        "downloadable": false
                    },
                    "backorders": "",
                    "cart_item_data": {
                        "product_extras": {
                            "product_id": 310,
                            "title": "2022-23 Afterschool DRILLS. SKILLS. FUN.",
                            "groups": [],
                            "price_with_extras": 35,
                            "original_price": 35,
                            "aelia_currency": false
                        },
                        "product_extras_": {
                            "product_id": 310,
                            "title": "2022-23 Afterschool DRILLS. SKILLS. FUN.",
                            "groups": [],
                            "price_with_extras": 35,
                            "original_price": 35,
                            "aelia_currency": false
                        },
                        "deposit": {
                            "enable": "no",
                            "deposit": 35,
                            "tax_total": 0,
                            "tax": 0,
                            "remaining": 0,
                            "total": 35,
                            "payment_schedule": []
                        }
                    },
                    "featured_image": "https://ref.breakawayhoops.com/wp-content/uploads/2022/07/BREAKAWAY-HOOPS-AFTERSCHOOL-CLINICS-e1659654212335-300x300.jpg",
                    "categories": false,
                    "tags": false,
                    "stock_status": {
                        "status": "In Stock",
                        "stock_quantity": null,
                        "hex_color": "#7ad03a"
                    },
                    "gallery": [],
                    "permalink": "https://ref.breakawayhoops.com/program/2022-23-afterschool-drills-skills-fun/?attribute_billing-period=Weekly&attribute_attendance=1+Day+per+week",
                    "is_discounted": false,
                    "price_regular": "3500",
                    "price_sale": "0",
                    "price_discounted": "0"
                }
            ],
            "item_count": 1,
            "items_weight": 0,
            "coupons": [],
            "needs_payment": true,
            "needs_shipping": false,
            "shipping": [],
            "fees": [],
            "taxes": [],
            "totals": {
                "subtotal": "3500",
                "subtotal_tax": "0",
                "fee_total": "0",
                "fee_tax": "0",
                "discount_total": "0",
                "discount_tax": "0",
                "shipping_total": "0",
                "shipping_tax": "0",
                "total": "3500",
                "total_tax": "0"
            },
            "removed_items": [],
            "cross_sells": [],
            "notices": {
                "success": [
                    "“2022-23 Afterschool DRILLS. SKILLS. FUN.” has been added to your cart."
                ]
            }
        },
        "headers": {
            "X-CoCart-API-Timestamp": 1681217020,
            "CoCart-Timestamp": 1681217020,
            "X-CoCart-API-Version": "3.8.1",
            "CoCart-Version": "3.8.1",
            "Allow": "POST"
        },
        "status": 200
    }
    • This reply was modified 1 year, 1 month ago by mk8436.
    Plugin Author Sébastien Dumont

    (@sebd86)

    Please keep your issues separate @mk8436 and would appreciate it if you write your response in your native language and use a translator (like Google) to English before writing here so I can understand you better.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not able to add to cart via CoCart API through Gravity nested form webhook’ is closed to new replies.