Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello,

I am trying to set-up this contribution as we sell organic beer and wine and must confirm that the customer is of legal drinking age.

This is the only solution that I have found. If someone knows a better way that would be appreciated.

 

Anyhow. When I try to install the MySQL file that comes with the contribution it generates an error.

The file:

 

/*

 mySQL-Database for Age Restricted Category - MS 2.2

contrib: http://www.oscommerce.com/community/contributions,2544

WARNING: This file ads a configuration group 1979.
	 First look if your database doesn't contain this configuration group yet.
 Otherwise you must change this first!
*/

ALTER TABLE configuration MODIFY configuration_value TEXT;

insert  into configuration values 

('', 'AGE PAGE Category', 'AGE_PAGE_CATEGORY', '18', 'Enter the category ID of the category you want to restrict', 1979, 1, null, null, null, 'tep_cfg_textarea('),
('', 'AGE PAGE redirect +18', 'AGEPAGE_SHOW', 'index.php?cPath=2_18', 'This is the link to the restricted category', 1979, 2, null, null, null, 'tep_cfg_textarea('),
('', 'AGE PAGE redirect -18', 'AGEPAGE_REDIRECT', 'index.php', 'User not older than 18 will be redirected to this page', 1979, 3, null, null, null, 'tep_cfg_textarea(');

insert  into configuration_group values 
(1979, 'AGE PAGE', 'age page category', 99, 1);

 

In myPHPAdmin I am selecting this file and tring to run it (Run SQL query/queries). However I get the following error.

 

Error

SQL-query : 

/* mySQL-Database for Age Restricted Category - MS 2.2 contrib: http://www.oscommerce.com/community/contributions,2544 WARNING: This file ads a configuration group 1979. First look if your database doesn't contain this configuration group yet. Otherwise you must change this first! */ ALTER TABLE configuration MODIFY configuration_value TEXT;

INSERT INTO configuration
VALUES (
'', 'AGE PAGE Category', 'AGE_PAGE_CATEGORY', '18', 'Enter the category ID of the category you want to restrict', 1979, 1, NULL , NULL , NULL , 'tep_cfg_textarea('
), (
'', 'AGE PAGE redirect +18', 'AGEPAGE_SHOW', 'index.php?cPath=2_18', 'This is the link to the restricted category', 1979, 2, NULL , NULL , NULL , 'tep_cfg_textarea('
), (
'', 'AGE PAGE redirect -18', 'AGEPAGE_REDIRECT', 'index.php', 'User not older than 18 will be redirected to this page', 1979, 3, NULL , NULL , NULL , 'tep_cfg_textarea('
);

INSERT INTO configuration_group
VALUES ( 1979, 'AGE PAGE', 'age page category', 99, 1 );


MySQL said: 

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 ';   INSERT  INTO configuration VALUES (  '',  'AGE PAGE Category
Back

 

The Hosting company is using MySQL v.5, and PHP 4

 

Can anyone offer advice?

 

I could try and do it manually with Insert, but I am not sure what goes where.

 

Thanks for your time.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...