WP eCommerce
[resolved] [Plugin: WP e-Commerce] Disable ajax on add to cart (3 posts)

  1. alesub
    Posted 3 years ago #

    Is there a way of disabling ajax on add to cart button so it goes to the cart/checkout page when clicked? This is very useful for stores where people buy just one product at a time.


  2. Vincent Robic
    Posted 2 years ago #

    A quick workaround, without hacking WP E-Commerce core :

    Open these files (located in your current theme) :

    • wpsc-grid_view
    • wpsc-list_view
    • wpsc-products_page
    • wpsc-single_product

    And find the product form in each of them :

    <form class="product_form" ... >

    All you need to do is to add within this form is :

    <input type="file" name="fake_file_to_disable_ajax" style="display: none;" />

    Why this workaround ? The Javascript function in wp-content/plugins/wp-e-commerce/wpsc-core/js/wp-e-commerce.js verifies that there is not file field before starting the ajax request.

  3. alesub
    Posted 2 years ago #

    Nice! what a cool way to avoid messing with core files!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic