Viewing 4 reply threads
  • Author
    Posts
    • #5426
      hirschbrat
      Member

      Hello,

      I used the following code to update the price field based on the product chosen in the select field. The code worked in version 9.4. but not in 9.9.7.

      $choices = array(
                 1 => 'Product1' 
                 ,2 => 'Product2' 
       );
      $conditions = array(
          array(
              'type' => 'update'
              ,'value' => 1
              ,'field' => 'fvb_order_cart:price'
              ,'update' => 199.99
          )
          ,array(
              'type' => 'update'
              ,'value' => 2
              ,'field' => 'fvb_order_cart:price'
              ,'update' => 299.99
          )
      );
      print_r($conditions);
      
      //wp_reset_postdata();
      
        piklist('field', array(
          'type' => 'group'
          ,'label' => 'Warenkorb'
          ,'field' => 'fvb_order_cart'
          ,'add_more' => true
          ,'fields' => array(
              array(
                  'type' => 'select'
                  ,'field' => 'product'
                  ,'label' => 'Produkt'
                  ,'columns' => 6
                  ,'choices' => $choices
                  ,'conditions' => $conditions
              )
              ,array(
                  'type' => 'text'
                  ,'field' => 'price'
                  ,'label' => 'Preis [EUR]'
                  ,'columns' => 3
                  ,'value' => '0.00'
                  ,'description' => 'This field is updated by the Select field above'
              )
              ,array(
                  'type' => 'number'
                  ,'field' => 'number'
                  ,'label' => 'Anzahl'
                  ,'columns' => 2
                  ,'value' => 1
                  ,'description' => 'This field is updated by the Select field above'
              )
          )
          ,'validate' => array(
            array(
              'type' => 'fvb_resource'
              ,'options' => array(
                  'resource' => 'cart'
              )
            )
          )
        ));
    • #5441
      Steve
      Keymaster

      @hirschbrat– bug confirmed. We’ll get this taken care of during our unit tests and fix in the next version.

    • #6131
      Rachel
      Member

      @Steve, is there a fix for this yet?

    • #6152
      Steve
      Keymaster

      Not yet. Should be in next version.

    • #7607
      hirschbrat
      Member

      Are there any news when this bug will be fixed? Still does not work in v 0.9.9.9.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.