Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I would like to use the Discount Groups mod on my store. Can someone confirm that this will work? Also, im having trouble translating the SQL instructions into pure SQL - Could someone translate the following for me?

 

# Database: catalog

# Table: 'customers_groups'

#

CREATE TABLE `customers_groups` (

`customers_groups_id` int(11) NOT NULL auto_increment,

`customers_groups_name` varchar(32) NOT NULL default '',

`customers_groups_discount` int(11) NOT NULL default '0',

PRIMARY KEY (`customers_groups_id`)

) TYPE=MyISAM;

 

# Database: catalog

# Table: 'groups_to_categories'

#

CREATE TABLE `groups_to_categories` (

`customers_groups_id` int(11) NOT NULL default '0',

`categories_id` int(11) NOT NULL default '0',

`discount` int(11) NOT NULL default '0',

PRIMARY KEY (`customers_groups_id`,`categories_id`)

) TYPE=MyISAM; F

 

add to the "customers_groups" table a record with id "1", name "Default" and discount = 0

 

add the column "customers_groups_id" int(11) to "customers" table with default value = 1;

 

execute on table "customers":

UPDATE customers SET customers_groups_id = 1;

 

add the column "category_id" int(11) to "customers_basket" table ;

  • 1 month later...
Posted

It works, But I am having a problem with getting the product_listing price to actually ahow and no just be ?0.00 any ideas?

 

Well here is the SQL file I have made that you can just execute onto your server, its easier than doing it manually! :D

 

CREATE TABLE `customers_groups` (
 `customers_groups_id` int(11) NOT NULL auto_increment,
 `customers_groups_name` varchar(32) NOT NULL default '',
 `customers_groups_discount` int(11) NOT NULL default '0',
 PRIMARY KEY  (`customers_groups_id`)
) TYPE=MyISAM; 

CREATE TABLE `groups_to_categories` (
 `customers_groups_id` int(11) NOT NULL default '0',
 `categories_id` int(11) NOT NULL default '0',
 `discount` int(11) NOT NULL default '0',
 PRIMARY KEY  (`customers_groups_id`,`categories_id`)
) TYPE=MyISAM;

INSERT INTO `customers_groups` VALUES (1, 'default', 0);

ALTER TABLE `customers` ADD `customers_groups_id` int(11) NOT NULL default '1';

UPDATE customers SET customers_groups_id = 1;

ALTER TABLE `customers_basket` ADD `category_id` int(11) NOT NULL;

 

Hope this helps!

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...