Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Filter Error oscommerce 2.3.4


radhavallabh

Recommended Posts

Hi,

I am using oscommerce 2.3.4- Just used the Category Filter mod;

 

On Admin side when I try to Delete a value

 

from part Categories Filters Values
 ---> Step 2, Add values for each filter

I get below error-

 

1054 - Unknown column 'c.categories_id' in 'field list'

select c.categories_id, cd.categories_name, cf.categories_filters_name from categories C, categories_filters_attributes cfa, categories_filters cf, categories_description cd where cd.categories_id = c.categories_id and cd.language_id = '1' and cf.language_id = '1' and cfa.categories_id = c.categories_id and cfa.categories_filters_values_id='1' and cf.categories_filters_id = cfa.categories_filters_id order by cd.categories_name

 

I used below SQL to get this addon running-

On running the sql in phpMyadmin I get error-

 

SELECT *
FROM

WHERE CONCAT_WS( "-", `categories_filters_id` , `language_id` , `categories_filters_name` , `sort_order` ) = "1-1"
ORDER BY `categories_filters_id` , `language_id` , `categories_filters_name` , `sort_order`

MySQL said: b_help.png

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE CONCAT_WS("-", `categories_filters_id`,  `language_id`,  `categories_filte' at line 3

CREATE TABLE IF NOT EXISTS `categories_filters` (
  `categories_filters_id` int(11) NOT NULL AUTO_INCREMENT,
  `language_id` int(11) NOT NULL DEFAULT '1',
  `categories_filters_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `sort_order` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`categories_filters_id`,`language_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `categories_filters_attributes` (
  `categories_filters_attributes_id` int(11) NOT NULL AUTO_INCREMENT,
  `categories_id` int(11) NOT NULL,
  `categories_filters_id` int(11) NOT NULL,
  `categories_filters_values_id` int(11) NOT NULL,
  PRIMARY KEY (`categories_filters_attributes_id`),
  KEY `idx_categories_attributes_categories_id` (`categories_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `categories_filters_log` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT,
  `log_date` datetime NOT NULL,
  `log_results` int(11) NOT NULL DEFAULT '0',
  `log_categories_id` int(11) NOT NULL,
  `log_http_server` varchar(255) NOT NULL,
  `log_ip` varchar(64) NOT NULL,
  `log_user_agent` varchar(255) NOT NULL,
  `log_url` varchar(255) NOT NULL,
  `log_query` text NOT NULL,
  PRIMARY KEY (`log_id`),
  KEY `log_url` (`log_url`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `categories_filters_searches` (
  `categories_filters_searches_id` int(11) NOT NULL AUTO_INCREMENT,
  `categories_filters_values_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL DEFAULT '1',
  `products_column` varchar(64) NOT NULL DEFAULT 'pd.products_name',
  `categories_filters_searches_type` enum('like','not like','=','!=','<','<=','>','>=') NOT NULL DEFAULT 'like',
  `categories_filters_searches_wildcard` enum('none','left','right','both') NOT NULL DEFAULT 'both',
  `categories_filters_searches_value` varchar(255) NOT NULL,
  `categories_filters_searches_and_operator` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`categories_filters_searches_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `categories_filters_values` (
  `categories_filters_values_id` int(11) NOT NULL AUTO_INCREMENT,
  `categories_filters_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL DEFAULT '1',
  `categories_filters_values_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `values_sort_order` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`categories_filters_values_id`,`language_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


INSERT INTO `categories_filters` (`categories_filters_id`, `language_id`, `categories_filters_name`, `sort_order`) VALUES(1, 1, 'Series', 1);
INSERT INTO `categories_filters` (`categories_filters_id`, `language_id`, `categories_filters_name`, `sort_order`) VALUES(2, 1, 'Cost', 0);
INSERT INTO `categories_filters` (`categories_filters_id`, `language_id`, `categories_filters_name`, `sort_order`) VALUES(3, 1, 'Audio', 2);

INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(1, 10, 1, 6);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(2, 10, 1, 7);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(3, 10, 2, 3);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(4, 10, 2, 4);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(5, 10, 2, 5);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(6, 10, 3, 1);
INSERT INTO `categories_filters_attributes` (`categories_filters_attributes_id`, `categories_id`, `categories_filters_id`, `categories_filters_values_id`) VALUES(7, 10, 3, 2);


INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(1, 6, 1, 'pd.products_name', 'like', 'both', 'speed', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(2, 7, 1, 'pd.products_name', 'like', 'both', 'siege', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(3, 3, 1, 'p.products_price', '<', 'none', '30', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(4, 4, 1, 'p.products_price', '>=', 'none', '30', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(5, 4, 1, 'p.products_price', '<=', 'none', '40', 1);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(6, 5, 1, 'p.products_price', '>', 'none', '40', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(7, 1, 1, 'pd.products_description', 'like', 'both', 'dolby surround', 0);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(8, 1, 1, 'pd.products_description', 'not like', 'both', 'dolby surround 5.1', 1);
INSERT INTO `categories_filters_searches` (`categories_filters_searches_id`, `categories_filters_values_id`, `language_id`, `products_column`, `categories_filters_searches_type`, `categories_filters_searches_wildcard`, `categories_filters_searches_value`, `categories_filters_searches_and_operator`) VALUES(9, 2, 1, 'pd.products_description', 'like', 'both', 'dolby surround 5.1', 0);


INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(1, 3, 1, 'Dolby Surround', 1);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(2, 3, 1, 'Dolby Surround 5.1', 2);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(3, 2, 1, 'Under $30', 1);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(4, 2, 1, '$30-$40', 2);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(5, 2, 1, 'Over $40', 3);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(6, 1, 1, 'Speed', 1);
INSERT INTO `categories_filters_values` (`categories_filters_values_id`, `categories_filters_id`, `language_id`, `categories_filters_values_name`, `values_sort_order`) VALUES(7, 1, 1, 'Under Siege', 2);


Please any help in fixing this will be deeply and highly appreciated!!!!!

Thank you in advance....

Awaiting an early resolution....... :)

Regards/

radhavallabh

Link to comment
Share on other sites

I installed that addon at least 6 times into a non-BS and BS osC shop for testing and it worked for me every single time.

Even though the SQL data needs updating to UTF-8 it still worked with it as is.

 

Uninstall and retry again.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...