• Thanks for building this, it’s great and exactly what I was looking for. I’m just having following two issues:

    1. On Ajax update of product total, my delete (x) button is vanishing. That is, the plugin is deleting the .product-remove div Here’s code pre-Ajax update:

    <li>
    <div class="product-details">                                                                               <div class="product-name">Product</div>
    <span class="quantity">1 &times; <span class="amount">$14.95</span></span></div>
    <div class="product-remove">
    <a href="http://test.someurl.dev/cart/?remove_item=e0601ca81190bcf86488ba846679ffb6&_wpnonce=a42ed9c522" class="remove remove-product" title="Remove this item" data-cart_id="e0601ca81190bcf86488ba846679ffb6">&times;</a>
    </div
    <div class="ajax-loading"></div>

    And here’s after:

    <li>
    <div class="product-details">                                                                               <div class="product-name">Product</div>
    <span class="quantity">2 &times; <span class="amount">$29.90</span></span></div>
    <div class="ajax-loading"></div>
    </li>

    Can this be solved?

    2) Any way for plugin to target subtotal for cart only, like this:

    <span class="subtotal">
    <? php wc_cart_totals_subtotal_html(); ?>
    </span>

    Thanks,
    Michael

    https://wordpress.org/plugins/woocommerce-ajax-cart/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author moiseh

    (@moiseh)

    1. Hi, are you using modified/custom theme or old version of WP/WooCommerce? I’m using the default Twenty Thirteen theme and it’s fine.

    Thread Starter mqfell

    (@mqfell)

    Hi Mosieh, latest version of WC, but yes it is a custom theme. I don’t blame your plugin for this issue, just wondering if there was maybe a little tweak possible to target the Ajax update more narrowly so it doesn’t hit the product-remove div. And then also if possible to only update subtotal on cart page as subtotal is all I show. Thanks.

    Plugin Author moiseh

    (@moiseh)

    You can try to add the follwing lines between ob_start() and ob_get_clean() calls of wooajaxcart.php file:

    echo '<td class="product-remove">';
    echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a href="%s" class="remove" title="%s">&times;</a>', esc_url( WC()->cart->get_remove_url( $_POST['cart_item_key'] ) ), __( 'Remove this item', 'woocommerce' ) ), $_POST['cart_item_key'] );
    echo '</td>';
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Great Plugin but having 2 small issues’ is closed to new replies.