Add To Cart With Quantity (Simple Products) Not Adding Correct Quantity Amount

This topic has 13 replies, 3 voices, and was last updated 3 years, 4 months ago ago by Rose Tyler

  • Avatar: kaos77
    kaos77
    Participant
    December 5, 2020 at 05:44

    Hello,
    I’ve enabled the Add To Cart With Quantity (Simple Products) feature and looks great. However, when I adjust the quantity of the product there is only 1 item being added instead of what was entered.

    Please, contact administrator
    for this information.
    12 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    December 5, 2020 at 08:36

    Hello,

    Try to disable all the third-party plugins, that do not come bundled with XSote https://xstore.helpscoutdocs.com/article/36-included-plugins , and check how it works then.

    Regards

    Avatar: kaos77
    kaos77
    Participant
    December 5, 2020 at 09:05

    Hello,
    I just disabled all plugins and the issue still exists.
    I am able to adjust quantities only from the off-canvas mini cart, single product page and cart page. Quantities don’t seem to be working from the product listing pages, product category listing pages and home page widget sliders.

    Also, another issue I am having is with the ajax category filters. Although I have set me product per row count to 4, whenever I click on one of the categories with ajax enabled, the product count per row goes back to 3. I’ve checked all settings and there is no option that has 3 products per row set.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 5, 2020 at 13:05

    Hello,

    Could you, please, provide us with temporary WP Dashboard and FTP access to your site to check the issue in more detail?

    Regards

    Avatar: kaos77
    kaos77
    Participant
    December 5, 2020 at 14:25

    Hello,
    So I ended up modifying the content-product.php file under theme folder.
    and replaced

    echo '<div class="quantity-wrapper">';
    woocommerce_quantity_input( array(), $product, true );
    woocommerce_template_loop_add_to_cart();
    echo '</div>';

    with the following:

    ?>
                            <form action="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="cart" method="post" enctype='multipart/form-data'>
                            <?php woocommerce_quantity_input(); ?>
                            <button type="submit" class="add_to_cart_button ajax_add_to_cart single_add_to_cart_button button alt">Add to Cart</button>
                            </form>
                            <?php

    Which seems to have resolved the quantity issue. However, this fix does not solve the issues with all the other widgets such as the product slider, etc. I would have to apply similar fix.

    I went ahead a removed all my modifcations and reset it back to normal so that your team can look into this issue.

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 5, 2020 at 15:55

    Hello,

    1) Did you make any changes in the parent theme template files except the mentioned changes and the style change? If you need to change something you need to use the child theme, all the changes you made in the parent theme will be lost after theme update, so if you don’t want this then use child theme https://developer.wordpress.org/themes/advanced-topics/child-themes/

    2) Log in to your Cloudflare account http://prntscr.com/vwdweo to allow us to flush the CDN cache. In other case, we won’t see our changes.

    Our developers will be able to check the issue after the weekend, on Monday – Tuesday.

    Regards

    Avatar: kaos77
    kaos77
    Participant
    December 5, 2020 at 23:48

    Hello,
    Did you replace the functions.php file??? This is very important for our site to function. You just removed our wholesale registration form as well. What is wrong with you? We could never get the functions.php to work in child theme so we manually patch it whenever there’s a theme update. Please RESTORE or send us the original modified functions.php file and everything you guys replaced. This is ridiculous you would just delete all files without letting us know.

    Cloudflare credentials have been inserted and cache has been purged and your modifications still don’t work.

    Avatar: kaos77
    kaos77
    Participant
    December 6, 2020 at 00:31

    Hello,
    I was able to recover the wholesale registration form and place under child theme and it is working. However, all of the other custom files are missing. Please restore, place them in child theme or send me these files.

    Avatar: kaos77
    kaos77
    Participant
    December 6, 2020 at 00:36

    Also, we have a plugin running that removes the add to cart button and product prices until user logs in. However, this does not seem to fix the products with the Add To Cart With Quantity (Simple Products) feature. It also doesn’t apply to products that load through ajax. All prices are exposed. Only users that have logged in should be able to view prices and add item to cart. All standard woocommerce buttons seem to work but not with XStore’s Add To Cart With Quantity (Simple Products) feature.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 6, 2020 at 10:17

    Hello,

    1) We did not remove your changed theme. We just renamed it http://prntscr.com/vwratf and uploaded source files as the parent theme to make sure that your changes do not affect the add to cart option.
    2) If you made changes in that theme then move them all to the child theme. Use child theme functions.php to place changed functions. It works fine if you place them in the correct way. If you need to change styles you can use child theme style.css to add your custom styles and overwrite parent theme styles.
    Your custom is ok once I purged the CDN cache http://prntscr.com/vwrc6x

    3) What other changes did you make in child theme files? Move the changed files to child theme, please, and then reply back and our developers will start to work on the q-ty issue.

    Regards

    Avatar: kaos77
    kaos77
    Participant
    December 7, 2020 at 10:02

    Hello,
    I checked and now I do see the xstore-customer folder with all original files so thank you for making a backup. Most of the modifications were located in functions.php and some other template files that modified the admin panel like adding numbering to the pdf invoices, extra product fields etc. I’ll restore these back into the child theme after the qty issue is fixed. The old versions of XStore for some reason never worked with the Child Theme but the latest version does. I did noticed some styles are not overriding properly under the child theme but I’ll take care of it. For the moment please fix the qty issue from the product listing and the product slider on the homepage.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 8, 2020 at 13:17

    Hello,

    Ok. I have passed your issue to our developers. I’ll inform you once they fix the problem.

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    December 12, 2020 at 09:53

    Hello,

    The fix will be included in the next theme update.

    Regards

  • Viewing 13 results - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.