Customer Groups Addon 2.6.1 - gives an error on LC 2.6.1

Designer
From Romania
Member since Jun 2024

Customer Groups Addon 2.6.1 - gives an error on LC 2.6.1

Fatal error: 1146 - Table 'litecart_2025_01_13.lc_customer_groups' doesn't exist select c.*, cg.name as customer_group_name from lc_customers c left join lc_customer_groups cg on (c.group_id = cg.id) where c.id order by c.date_created desc, c.id desc; in ~/includes/library/lib_database.inc.php (Line 199)

tim
Founder
From Sweden
Member since May 2013
tim

If there were no instructions in the readme you downloaded, run this query in phpmyadmin:

    CREATE TABLE IF NOT EXISTS `lc_customer_groups` (
      `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
      `type` ENUM('retail','wholesale') NOT NULL DEFAULT 'retail',
      `name` VARCHAR(32) NOT NULL DEFAULT '',
      `description` VARCHAR(512) NOT NULL DEFAULT '',
      `date_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
      PRIMARY KEY (`id`)
    );

    INSERT INTO `lc_customer_groups` (`id`, `name`, `description`, `date_updated`, `date_created`)
    VALUES (NULL, 'Default', '', NOW(), NOW());

    INSERT INTO `lc_settings` (`id`, `setting_group_key`, `type`, `title`, `description`, `key`, `value`, `function`, `priority`, `date_updated`, `date_created`)
    VALUES (NULL, 'defaults', 'local', 'Default Customer Group', 'The default customer group for new customers.', 'default_customer_group_id', '1', 'customer_groups()', '99', NOW(), NOW());

    ALTER TABLE `lc_customers` ADD `group_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `status`;

    UPDATE `lc_customers` set `group_id` = 1;
tim
Founder
From Sweden
Member since May 2013
tim

Try having the payment module respond an error with the option:

  function options(...) {
  if ($subtotal < 100) {
    $error = 'Minimum subtotal not reached for this option';
  }

  return [
      'title' => 'My Payment module',
      'options' => [
        [
          ...
          'error' => $error // <------------ See this
        ],
    ];
}

https://www.litecart.net/en/wiki/how_to_create_a_payment_module

Designer
From Romania
Member since Jun 2024

@tim

would by applying the above codes etc, work together with my Price Matrix addon you think?

tim
Founder
From Sweden
Member since May 2013
tim

Sorry no :( As one of them would overwrite the other price.

Designer
From Romania
Member since Jun 2024

no worries. im glad I asked you first.

You
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.