Unable to change “add to cart” quantity after upgrading to V

This topic has 9 replies, 2 voices, and was last updated 2 hours, 23 minutes ago ago by Luca Rossi

  • Avatar: azicard
    azicard
    Participant
    December 5, 2024 at 21:40

    Good day,

    I just upgraded to the last version (V9.4) and I’m no longer able to change the add to cart quantity both on the category page and the product page. However I’m still able to update the quantity on the cart page.

    Please advise.

    Thank you!

    Regards.

    Please, contact administrator
    for this information.
    8 Answers
    Avatar: azicard
    azicard
    Participant
    December 5, 2024 at 21:43

    Also you provided the following custom code back in November. So please confirm if it’s causing the issue. Thank you!

    ********
    add_filter( ‘woocommerce_quantity_input_args’, ‘jk_woocommerce_quantity_input_args’, 10, 2 ); // Simple products
    function jk_woocommerce_quantity_input_args( $args, $product ) {
    if ( !is_cart() ) {
    global $post;
    $product = wc_get_product( $post->ID );
    $custom_number = $product->get_meta( ‘custom_order_number_field’ );
    $args[‘input_value’] = $custom_number ? $custom_number : 1; // Starting value (we only want to affect product pages, not cart)
    $args[‘max_value’] = 80000; // Maximum value
    $args[‘min_value’] = $custom_number; // Minimum value
    $args[‘step’] = $custom_number; // Quantity steps
    }
    return $args;
    }

    Avatar: Justin
    Luca Rossi
    Support staff
    December 6, 2024 at 08:20

    Dear @azicard,

    We hope this message finds you well.

    The custom code you are referring to originates from your implementation. To address a specific issue, we have made a minor adjustment by adding the following lines:

    
    if ( !is_cart() ) {  
    
    
    }  
    

    This modification ensures that the custom code does not affect the cart page.

    We kindly suggest commenting out this adjustment and testing the functionality again to verify the results.

    Should you have any further questions or require additional assistance, please do not hesitate to reach out.

    Best regards,
    The 8Theme Team

    Avatar: azicard
    azicard
    Participant
    December 6, 2024 at 22:47

    Hello,

    I commented out the change. While I can update the “add to cart” quantity on both the category page and the product page, the custom “add to cart” value (ie the previous issue) is no longer working.

    Please note that the custom code was provided by your team as a solution to my previous issue.

    https://www.8theme.com/topic/issues-on-quantity-and-custom-value-after-upgrading-to-v9-4/

    Please advise how I can resolve this issue.

    Thank you.

    Avatar: Justin
    Luca Rossi
    Support staff
    December 7, 2024 at 11:34

    Dear @azicard,

    We kindly request that you review our previous response once more: (https://www.8theme.com/topic/issues-on-quantity-and-custom-value-after-upgrading-to-v9-4/#post-422876).

    Please note that we only made adjustments to the custom code that was already present in your child theme prior to our intervention.

    In light of this, we recommend completely removing the custom code to determine if the “Add to Cart” functionality resumes working as expected.

    Should you have any further questions or require additional assistance, please do not hesitate to reach out.

    Best regards,
    The 8Theme Team

    Avatar: azicard
    azicard
    Participant
    December 7, 2024 at 15:08

    Hello,

    As mentioned earlier, I commented out the change. While I can update the “add to cart” quantity on both the category page and the product page, the custom “add to cart” value (ie the previous issue) is no longer working.

    Please confirm if a custom “add to cart” value is a feature provided by your theme? If so, please provide instructions on how to enable/use this feature.

    Thank you.

    Avatar: Justin
    Luca Rossi
    Support staff
    December 8, 2024 at 09:56

    Hi @azicard,

    Unfortunately, the custom “add to cart” value feature is not available in our XStore theme yet.

    If you would like our development team to consider making the XStore theme compatible with this plugin, we kindly encourage you to submit your suggestion on our Taskboard: https://www.8theme.com/taskboard/. Suggestions that receive significant support from other customers will be carefully reviewed by our team for potential inclusion in future updates.

    We appreciate your understanding and cooperation in this matter.

    Kind regards,
    The 8Theme Team

    Avatar: azicard
    azicard
    Participant
    December 19, 2024 at 23:56

    Hello,

    I was able to fix the custom code so that the add to cart value is working on both catalog page and product page.

    However, since you made the change such that the custom code doesn’t apply to the cart page, the custom add to cart value isn’t being carried over.

    If I remove the change you made, it seems to break the cart page, but in V9.2 the custom code was working fine with the cart page.

    Can you please provide some suggestions on how to address this issue (ie being able to carry the custom add to cart value or step value to the cart page)?

    Thank you!

    Avatar: Justin
    Luca Rossi
    Support staff
    December 20, 2024 at 02:28

    Dear @azicard,

    Further customization will fall out of scope our support standard services we provide.

    If you are interested in pursuing personalized customizations, we encourage you to submit a request through our customization panel, which can be accessed via the following link: https://www.8theme.com/account/#etheme_customization_panel.

    Through this platform, you can collaborate directly with our technical team to explore the feasibility of your request. Please note that customization services may involve additional charges, which will be determined after a detailed review of your specific requirements.

    If you have any further questions or need additional assistance, please do not hesitate to contact us. We are here to help.

    Best regards,
    The 8Theme Team

  • Viewing 9 results - 1 through 9 (of 9 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.