• Hello, please i do need urgent help, i am using the product options plugon on my website, along with the oxygen builder, when every i set a product custom option to (required), the product does not add to cart, and when ever i when i move to my cart i get this error.

    Please specify the product required option(s)

    please how can i overcome this?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    This plugin works only on the product page. Where one product is displayed per page.

    There is a modification to make it work on a listing page:
    “Product options on the Shop page”
    https://hottons.com/po_modifications_other

    But I don’t know if it will work for your case.

    Also this plugin does not support ajax carts.
    Because the ajax cart plugins do not send the selected product options as parameters.

    Stanislav

    Thread Starter akanitony

    (@akanitony)

    Hello, thanks for your reply, is it possible that you can customize this to support custom Ajax add to cart, because some options actually works.

    Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    I see the validation of required product options with JavaScript does not work on your website.
    It is because the .js files of this plugin are not loaded.

    Try to replace the code:

    
    public function enqueue_frontend_scripts(){
        if (is_singular('product')){  
          wp_enqueue_script('pofw_product_options', $this->_pluginUrl . 'view/frontend/web/product/main.js', array('jquery', 'jquery-ui-widget'));
          wp_enqueue_style('pofw_product_options', $this->_pluginUrl . 'view/frontend/web/product/main.css');		  		  			
        }
      }
    

    with:

    
    public function enqueue_frontend_scripts(){
       // if (is_singular('product')){  
          wp_enqueue_script('pofw_product_options', $this->_pluginUrl . 'view/frontend/web/product/main.js', array('jquery', 'jquery-ui-widget'));
          wp_enqueue_style('pofw_product_options', $this->_pluginUrl . 'view/frontend/web/product/main.css');		  		  			
       // }
      }
    

    in the file:
    wp-content/plugins/product-options-for-woocommerce/product-options-for-woocommerce.php

    Stanislav

    Thread Starter akanitony

    (@akanitony)

    Not Still Working it once i click the add to cart nothing happens, but if you visit the website and add the second product it automatically adds to cart, this is because the product is not set to required.

    Thread Starter akanitony

    (@akanitony)

    Once i set a product option to not required, it does not add to cart, but once i set it to not required it adds to cart

    Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    I have checked the product “Test product february” on your website.

    The “custom option” that it has is not of my plugin.

    Stanislav

    Thread Starter akanitony

    (@akanitony)

    It is sir, it is a dropdown where I added custom option just to test it out

    I think this is where the issue comes from, I Commented out those two lines of code and
    everything now seems to work just fine, except i know that i just nulled the required validation.. (HAHA). I would really appreciate if you can modify this code to solve this issue thanks

    foreach ($this->getProductOptions($productId) as $option){
          $oId = (int) $option['option_id'];      
          if ($option['required'] == 1 && (empty($_POST['pofw_option'][$oId]) || (is_array($_POST['pofw_option'][$oId]) && $_POST['pofw_option'][$oId][0] == ''))){                     
            $isValid = true;
           // wc_add_notice(__('Please specify the product required option(s).', 'product-options-for-woocommerce' ), 'error');
           // break;       
          }              											                                                    
        }  
          
        return $isValid;
      }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Please specify the product required option(s)’ is closed to new replies.