Woocommerce products listing ajax or jquery block add to card

Home Forums BulletProof Security Free Woocommerce products listing ajax or jquery block add to card

This topic contains 11 replies, has 3 voices, and was last updated by  lukas 2 years, 8 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #23943

    lukas
    Participant

    Hello, we use theme organic life, and we have a problem on product listing woocommerce does not add the item to the cart, obviously something is blocking jquery ajax falls. Please a special code which that Allow. thanks

    Temu used this http://demo.themeum.com/wordpress/organic-life/, product listing is here: http://demo.themeum.com/wordpress/organic-life/shop/ on this page and the Add button is not working to basket directly to the home page for the product to work, my shop url you can send via a private message.

    #23947

    AITpro Admin
    Keymaster

    Please post the BPS Security Log entry for what is being blocked.  Also click the WooCommerce tag link in the right sidebar to see if a solution is already created for the issue.

    #23954

    lukas
    Participant

    Hello, the email I sent you a link to my shop url. Log is empty, please look at me for it. many thanks

    #24011

    lukas
    Participant

    Hello, I sent you the email link at. You looked at my problem please? Thanks for the help

    #24019

    AITpro Admin
    Keymaster

    We have not received the email with the link.  Please resend the email.

    #24020

    lukas
    Participant

    Hello, I mailed URL link to the contact form section http://www.ait-pro.com/contact/ right now

    #24025

    AITpro Admin
    Keymaster

    I received your link, but do not see anything wrong.  Not really sure what you want me to look at since you sent me a link to your root website URL.  Do the standard BPS troubleshooting steps below to confirm or eliminate that BPS is causing the problem or to isolate which BPS Security feature is causing the problem.

    http://forum.ait-pro.com/forums/topic/read-me-first-free/#bps-free-general-troubleshooting

    #24032

    rafaelmagic
    Participant

    Lukas,

    Their shouldn’t be anything blocking WooCommerce Ajax  in the Free version. If you are using the Pro version and have the Plugin Firewall, the solution is below. I suspect that the issue with Ajax might be your caching plugins. Which plugin are you using for caching??
    http://forum.ait-pro.com/forums/topic/woocommerce/

    /woocommerce/assets/js/(.*).js
    #24054

    lukas
    Participant

    Hello, thanks for analysis and advice. I went according to the instructions turned off Root Folder BulletProof Mode Deactivate wp-admin Folder BulletProof Mode and custom code I have two codes. One which authorizes http head and the other to permit the pdf catalog in iframe plugin pdf viewer – jupdf pdf viewer. Even after deactivation does not add to the cart and the woocommerce ajax obviously still something blocks. Here is the content of my custom code:

    These custom codes allow HTTP head and iframe pdf viewer. Nothing more. WP admin custom note is empty. I use the free version of BPS. The problem persists, woocommerce ajax is enabled in the settings woocommerce

    CUSTOM CODE REQUEST FILTERED METHODS: Whitelist User Agents or remove HEAD here

    REQUEST # METHODS FILTERED
    # If you want to allow HEAD Requests use BPS Custom Code and
    # Remove / delete HEAD | Request Method from the filter.
    # Example: RewriteCond% {} ^ REQUEST_METHOD (TRACE | Delete | TRACK | debug) [NC]
    # The TRACE, DELETE, TRACK and DEBUG Request methods should never be removed.
    RewriteCond% {} ^ REQUEST_METHOD (TRACE | Delete | TRACK | debug) [NC]
    RewriteRule ^ (. *) $ - [F]
    
    CUSTOM CODE TIMTHUMB FORBID RFI and MISC FILE SKIP / BYPASS RULE:
    # TIMTHUMB FORBID RFI and MISC FILE SKIP/BYPASS RULE
    # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
    # Remote File Inclusion (RFI) security rules
    # Note: Only whitelist your additional domains or files if needed - do not whitelist hacker domains or files
    RewriteCond %{QUERY_STRING} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC,OR]
    RewriteCond %{THE_REQUEST} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC]
    RewriteRule .* index.php [F]
    #
    # Example: Whitelist additional misc files: (example\.php|another-file\.php|phpthumb\.php|thumb\.php|thumbs\.php)
    RewriteCond %{REQUEST_URI} (jupdf/index\.html|timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [NC]
    # Example: Whitelist additional website domains: RewriteCond %{HTTP_REFERER} ^.*(YourWebsite.com|AnotherWebsite.com).*
    RewriteCond %{HTTP_REFERER} ^.*vitaminbottle.*
    RewriteRule . - [S=1]
    
    #24056

    AITpro Admin
    Keymaster

    The Request Methods Filtered code should look like this code below.  The code you posted above is not valid, but I assume that was just a copy and paste problem with your post.  Since you have eliminated that BPS is causing the problem then you should do the standard WordPress troubleshooting steps next:  deactivate all other plugins and test.  Switch your theme to a WordPress theme and test.  If the problem is with a WooCommerce setting or setup then I really cannot offer much help since I do not use WooCommerce and have very limited knowledge of WooCommerce.  So you would want to contact the WooCommerce folks to get help for that.

    BPS Pro 11.6+ & BPS free .53.2+
    You may see this code or the 11.5+/.53.1+ code in your root htaccess file.  The code does the same exact thing and is whitelisted in the same exact way.

    # REQUEST METHODS FILTERED
    # If you want to allow HEAD Requests use BPS Custom Code and copy
    # this entire REQUEST METHODS FILTERED section of code to this BPS Custom Code
    # text box: CUSTOM CODE REQUEST METHODS FILTERED.
    # See the CUSTOM CODE REQUEST METHODS FILTERED help text for additional steps.
    RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK|DEBUG) [NC]
    RewriteRule ^(.*)$ - [F]
    #RewriteCond %{REQUEST_METHOD} ^(HEAD) [NC]
    #RewriteRule ^(.*)$ /wp-content/plugins/bulletproof-security/405.php [L]

    BPS Pro 11.5+ & BPS free .53.1+

    # REQUEST METHODS FILTERED 
    # If you want to allow HEAD Requests use BPS Custom Code and copy 
    # this entire REQUEST METHODS FILTERED section of code to this BPS Custom Code 
    # text box: CUSTOM CODE REQUEST METHODS FILTERED. 
    # See the CUSTOM CODE REQUEST METHODS FILTERED help text for additional steps. 
    RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK|DEBUG) [NC] 
    RewriteRule ^(.*)$ - [F] 
    RewriteCond %{REQUEST_METHOD} ^(HEAD) [NC] 
    RewriteRule ^(.*)$ - [R=405,L]

    BPS Pro 11.4|BPS free .53 and lower versions

    # REQUEST METHODS FILTERED
    # If you want to allow HEAD Requests use BPS Custom Code and 
    # remove/delete HEAD| from the Request Method filter.
    # Example: RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK|DEBUG) [NC]
    # The TRACE, DELETE, TRACK and DEBUG Request methods should never be removed.
    RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK|DEBUG) [NC]
    RewriteRule ^(.*)$ - [F]
    #24060

    rafaelmagic
    Participant

    Lukas,

    When you deactivated Root and Admin protecting your are turning off BPS. So your problem is somewhere else.

    Assuming your not using any “Caching” plugin like Wp-SuperCache, W3Total Cache because they can cache AJAX if not setup correctly. Also 3rd party database caching will cause issues. You might also check with your Hosting Tech if they enabled some type of Server Caching.

    Before you get started make sure that your browsers on your computer and your JavaScript is ALL up to date. Download and install Mozilla and Google Chrome. Download and install CCleaner to erase your browser caching.

    As mentioned above, switch themes and deactivate ALL your plugins. One of them is conflicting with WooCommerce. More than likely its a badly written or not updated plugin’s java that is conflict with WooCommerce Add To Cart Java.

    What you are doing is switching to a default theme like the twenty-one theme and the ONLY plugin activated should be WooCommerce. Now check if the Add to Cart works.

    If it doesn’t, go over to the support forum of WooCommerce. WooCommerce requires that PHP sessions paths are saved to a tmp folder. Its a php.ini setting with the session.save_path that has to be  set to /tmp

    If it does work, activate your Custom Theme and Test the Add To Cart. Then activate your plugins one by one till you find the problem.

    Good luck.

    #25589

    lukas
    Participant

    You can delete this topic, I solved the problem. I blocked the display of text buy the child theme through funcions.php. I removed the code and it works.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.