• Resolved kihonhappo

    (@kihonhappo)


    Hi,

    I’m facing the following problem:

    I have setup a custom eshop with elementor pro theme builder. At the single product page template I use the elementor [add to cart] button and in the menu I use the [menu cart] element. When I click the add to cart button to buy a product and ninja firewall is enabled the product doesn’t appear in the menu cart it is blocked but is in the woocommerce cart page. This not the case for the woocommerce [custom add to card] button that works fine, but I cant use it in the single product page template because I need the button to take the product link dynamically.

    Everything is upgraded in the latest versions.
    I have already report this at elementor pro support they dont know how to fix the issue and they investigate it …

    Any help would be appreciated.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Did you check in the firewall log (NinjaFirewall > Logs > Firewall Log) if there was anything related to this issue, i.e. the reason why you were blocked?

    If there’s nothing in the firewall log, can you check the “Firewall Policies > Advanced Policies” page: did you enable any policy from the “HTTP response headers” section?

    Thread Starter kihonhappo

    (@kihonhappo)

    HTTP response headers

    X-Content-Type-Options = yes
    X-Frame-Options = sameorigin
    X-Frame-Options = 1;mode=block
    SameSite = SameSite=Strict
    HttpOnly flag = yes
    Strict-Transport-Security = 1year+subdomains
    Referrer-Policy = no-referrer

    And in the logs I see a too many
    [404] [POST] [/wp-admin/admin-ajax.php] [Blocked access to admin-ajax.php]

    Also i notice sometimes if I add the first product and then visit the cart page in the next attempt to add a second product the menu cart starting to work.

    Thread Starter kihonhappo

    (@kihonhappo)

    I test all the headers looks like if the HttpOnly flag is active then the cart element does not work properly. I will do more testing and I will inform you..

    Thanks

    Plugin Author nintechnet

    (@nintechnet)

    It is likely the issue, as indicated in our documentation page:

    This header is not enabled by default because some themes or plugins may need to access cookies from JavaScript.

    WooCommerce is not affected by it, but I assume Elementor is. Check your browser’s console, it will show you if it blocked the JS code from accessing the cookie.

    Thread Starter kihonhappo

    (@kihonhappo)

    cant find any related error.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Elementor pro add to cart button and cart widget problem’ is closed to new replies.