shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

How to Remove Quantity Field from the Enquiry Cart Page

Overview

The Quantity Field on the Enquiry Cart Page allows users to select the quantity of the products they wish to enquire about.

However, there may be situations where you prefer to hide this field, such as when your enquiry process does not require quantity input or to simplify the user experience.

This guide outlines two simple steps to remove the Quantity Field from the Enquiry Cart Page using custom CSS and PHP modifications.

1. Why Remove the Quantity Field?

There are several reasons why you might want to remove the Quantity Field from the Enquiry Cart Page:

  • Simplified User Interface: If your business doesn’t require users to specify product quantities for enquiries, removing the field can make the form cleaner and easier to navigate.
  • Prevent Errors: By removing the ability to change quantities, you reduce the chances of users accidentally submitting incorrect information.
  • Customization: You may want to customize the enquiry process to make it more streamlined, especially if you offer products with fixed quantities or personalized services.

2. Step 1: Add Custom CSS

To hide the Quantity Field on the Enquiry Cart Page, you can add custom CSS to the PEP (Product Enquiry Pro) settings.

This method hides the field visually without affecting its functionality in the backend.

Steps to Add Custom CSS:

  1. Navigate to the PEP Settings:
    • Go to your WordPress Dashboard.
    • From the Product Enquiry Pro menu, click on Settings.
    • Under the Settings submenu, click on the Display tab.
  2. Add Custom CSS:
    • Find the Add Custom CSS section.
    • Paste the following CSS code into the input field:
.generated_for_desktop.wdm_shop_tbl th.product-quantity.cart-quantity, .generated_for_desktop.wdm_shop_tbl td.product-quantity, .generated_for_mobile.wdm_shop_tbl th.product-quantity.cart-quantity, .generated_for_mobile.wdm_shop_tbl  td.product-quantity  {
    display: none;
}

This CSS rule will hide the Quantity Field in the Enquiry Cart without affecting other functionality. The !important tag ensures that the CSS rule takes precedence over other styles.

3. Save the Changes:

  • After adding the CSS, scroll down and click the Save Changes button to apply the custom CSS.

3. Step 2: Modify functions.php File

For additional control or if you prefer to hide the quantity field through PHP rather than CSS, you can modify the functions.php file of your theme or child theme.

Steps to Modify the functions.php File:

Scroll to the bottom of the functions.php file and add the following code snippet:

  1. Open the functions.php File:
    • From your WordPress Dashboard, go to AppearanceTheme Editor.
    • On the right side, find and click on functions.php under Theme Files.
  2. Add the Following Code:
    • Scroll to the bottom of the functions.php file and add the following code snippet:
// PEP Custom Code
add_filter('quoteup_return_colspan_update_button_enq_cart', 'quoteup_modify_colspan_value');

function quoteup_modify_colspan_value($colSpan)
{
    $colSpan--;
    return $colSpan;
}

// End of PEP Custom Code

This PHP function removes the Quantity Field from the Enquiry Cart page by modifying the WooCommerce checkout fields. It specifically targets the quantity field and unsets it.

3. Save the Changes:

  • After adding the code, click the Update File button to save your changes.

4. Conclusion

By following the two simple steps in this guide, you can remove the Quantity Field from the Enquiry Cart Page in WISDM Product Enquiry Pro (PEP):

  1. Add custom CSS via the PEP settings.
  2. Optionally, modify the functions.php file for additional flexibility.

These modifications allow you to streamline your product enquiry process and improve the overall user experience.

If you need further customization or run into any issues, don’t hesitate to reach out to support for assistance.

Updated on December 23, 2024
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Was this article helpful?

shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1570834.cloudwaysapps.com/gruajwrvrc/public_html/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Related Articles