title: opencart error Fatal error: Uncaught Exception: Error: Unknown column
body: <p>So first of I apologize for my rocky explanation. My PHP skills need serious refinement.</p>
  <p>I did get this error</p>
  <blockquote>
  <p>Fatal error: Uncaught Exception: Error: Unknown column 'is_unlimited' in 'field list'<br />Error No: 1054<br />INSERT INTO <code>oc_seller_group</code> SET <code>product_id</code> = '1202' ,<code>gquantity</code> = '0',<code>gprice</code> = '59',<code>group_commission</code> = '0',<code>expiry</code> = '30',<code>membership_type</code> = 'stm',<code>trial_status</code> = '0',<code>group_image</code> = 'catalog/Image.jpg', <code>defaultCategoryProduct</code> = '0',<code>defaultCategoryQuantity</code> = '0', <code>defaultCategoryPrice</code> = '0' ,<code>defaultNoOfListing</code> = '0',<code>defaultListingDuration</code> = '0', <code>defaultGroupCommissionPercentage</code> = '0',<code>defaultGroupCommissionFixed</code> = '0',<code>defaultListingFee</code> = '0',<code>autoApprove</code> = '1', <code>is_unlimited</code>='1' in /public_html/system/library/db/mysqli.php:40 Stack trace: #0 /storage/modification/system/library/db.php(58): DB\MySQLi-&gt;query('INSERT INTO <code>oc...') #1 /public_html/admin/model/customerpartner/seller_add_group.php(157): DB-&gt;query('INSERT INTO </code>oc...') #2 /storage/modification/system/engine/loader.php(264): ModelCustomerpartnerSellerAddGroup- in /public_html/system/library/db/mysqli.php on line 40</p>
  </blockquote>
  <p>Here's the code of seller_add_group.php file:</p>
  <pre><code>    public function addGroupCust($data = array()) {
  
      $product_id = $this-&gt;add_group_as_product($data);
  
      if (isset($data['wk_autoApprove']) &amp;&amp; $data['wk_autoApprove']) {
          $autoApprove = 1;
      } else {
          $autoApprove = 0;
      }
  
      $sql=&quot;INSERT INTO `&quot; . DB_PREFIX . &quot;seller_group` SET `product_id` = '&quot; . (int)$product_id.&quot;' ,`gquantity` = '&quot; . (int)$data['defaultCategoryQuantity'] . &quot;',`gprice` = '&quot;.(float)$data['wk_product_price'] . &quot;',`group_commission` = '&quot;. (float)$data['wk_group_commission'] . &quot;',`expiry` = '&quot; . (int)$data['wk_group_expiry'] . &quot;',`membership_type` = '&quot; . $this-&gt;db-&gt;escape($data['wk_group_type']) . &quot;',`trial_status` = '&quot; . (int)$data['wk_group_trial'] . &quot;',`group_image` = '&quot; . $this-&gt;db-&gt;escape($data['image']) . &quot;', `defaultCategoryProduct` = '&quot; . (int)$data['defaultCategoryProduct'] . &quot;',`defaultCategoryQuantity` = '&quot; . (int)$data['defaultCategoryQuantity'] . &quot;', `defaultCategoryPrice` = '&quot; . (float)$data['defaultCategoryPrice'] . &quot;' ,`defaultNoOfListing` = '&quot; . (int)$data['defaultNoOfListing'] . &quot;',`defaultListingDuration` = '&quot; . (int)$data['defaultListingDuration'] . &quot;', `defaultGroupCommissionPercentage` = '&quot; . (float)$data['defaultGroupCommissionPercentage'] . &quot;',`defaultGroupCommissionFixed` = '&quot; . (float)$data['defaultGroupCommissionFixed'] . &quot;',`defaultListingFee` = '&quot; . (float)$data['defaultListingFee'] . &quot;',`autoApprove` = '&quot; . (int)$autoApprove.&quot;', `is_unlimited`='&quot; . (int)$data['allow_unlimited'] . &quot;'&quot;;
  
      $this-&gt;db-&gt;query($sql);
  
      $id = $this-&gt;db-&gt;getLastId();
  
      foreach ($data['wk_name'] as $key =&gt; $value) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_name` SET `id`='&quot; . (int)$id.&quot;', `language_id` = '&quot; . (int)$value['language_id'] . &quot;', name = '&quot; . $this-&gt;db-&gt;escape($value['name']) . &quot;'&quot;);
      }
  
      $account_menu = '';
      $productTabs = '';
      $profileOption = '';
      $publicSellerProfile = '';
  
      if (isset($data['wk_seller_group_allowed_account_menu'])) {
          foreach ($this-&gt;request-&gt;post['wk_seller_group_allowed_account_menu'] as $key =&gt; $menu) {
              $account_menu .= $key.&quot;:&quot; . $menu.&quot;,&quot;;
          }
          $account_menu = rtrim($account_menu,',');
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'account', `value` = '&quot; . $this-&gt;db-&gt;escape($account_menu) . &quot;'&quot;);
      }
  
      if (isset($data['wk_seller_group_allowed_product_tabs'])) {
          foreach ($this-&gt;request-&gt;post['wk_seller_group_allowed_product_tabs'] as $key =&gt; $option) {
              $productTabs .= $key.&quot;:&quot; . $option.&quot;,&quot;;
          }
          $productTabs = rtrim($productTabs,',');
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'producttab', `value` = '&quot; . $this-&gt;db-&gt;escape($productTabs) . &quot;'&quot;);
      }
  
      if (isset($data['wk_seller_group_allowed_profile_options'])) {
          foreach ($this-&gt;request-&gt;post['wk_seller_group_allowed_profile_options'] as $key =&gt; $option) {
              $profileOption .= $key.&quot;:&quot; . $option.&quot;,&quot;;
          }
          $profileOption = rtrim($profileOption,',');
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'profileoption', `value` = '&quot; . $this-&gt;db-&gt;escape($profileOption) . &quot;'&quot;);
      }
  
      if (isset($data['wk_seller_group_allowed_public_seller_profile'])) {
          foreach ($this-&gt;request-&gt;post['wk_seller_group_allowed_public_seller_profile'] as $key =&gt; $option) {
              $publicSellerProfile .= $key.&quot;:&quot; . $option.&quot;,&quot;;
          }
          $publicSellerProfile = rtrim($publicSellerProfile,',');
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'publicsellerprofile', `value` = '&quot; . $this-&gt;db-&gt;escape($publicSellerProfile) . &quot;'&quot;);
      }
  
      if (isset($data['productQuantity'])) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'productQuantity', `value` = '&quot; . $this-&gt;db-&gt;escape(serialize($data['productQuantity'])) . &quot;'&quot;);
      }
  
      if (isset($data['productListing'])) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'productListing', `value` = '&quot; . $this-&gt;db-&gt;escape(serialize($data['productListing'])) . &quot;'&quot;);
      }
  
      if (isset($data['productListingDuration'])) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'productListingDuration', `value` = '&quot; . $this-&gt;db-&gt;escape(serialize($data['productListingDuration'])) . &quot;'&quot;);
      }
  
      if (isset($data['productgroupCommission'])) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'productgroupCommission', `value` = '&quot; . $this-&gt;db-&gt;escape(serialize($data['productgroupCommission'])) . &quot;'&quot;);
      }
  
      if (isset($data['productListingFee'])) {
          $this-&gt;db-&gt;query(&quot;INSERT INTO `&quot;.DB_PREFIX.&quot;seller_group_setting` SET `group_id` = '&quot; . (int)$id.&quot;', `setting_for`= 'productListingFee', `value` = '&quot; . $this-&gt;db-&gt;escape(serialize($data['productListingFee'])) . &quot;'&quot;);
      }
  
      return $product_id;
  }
  </code></pre>