Regional Packages

Titel

OldNew
11Regional Packages

Permalänk

OldNew
11installation/regional_packages

Innehåll

OldNew
1# Installation: Regional Packages
12
3By selecting a country during the installation LiteCart can "patch"
4the installation with regional data. This is a guide how to create a
5patch for Sweden.
6
7## How To Create a Regional Pack
8
91. Create the following folder **~/install/data/SE/** where SE is
10the country code for this guide example. If you want to create a shared
11folder with other countries i.e. Denmark, comma separate the name the
12folder **~/install/data/DK,SE/**. It is important that you use the
13//two character// country ISO codes.
14
152. Create a subfolder named public_html
16**~/install/data/SE/public_html/**. This is where you put files
17that should be copied to the installation such as images, modules etc.
18
193. Create the file **~/install/data/SE/data.sql** containing MySQL
20queries.
21
22### Example of MySQL Queries
23
24Note all queries must be separated by the delimiter: --
25--------------------------------------------------------
26
27### Currency
28
29Add a currency: INSERT INTO \`lc_currencies\
30(\`status\`, \`code\`, \`name\`, \`value\`, \`decimals\`, \`prefix\`,
31\`suffix\`, \`priority\`, \`date_updated\`, \`date_created\`) VALUES (1,
32'SEK', 'Svenska kronor', '1.0000', 2, '', ' kr', 0, NOW(),
33NOW()); --
34--------------------------------------------------------
35ALTER TABLE \`lc_products_prices\` ADD \`SEK\` DECIMAL(11,4) NOT NULL;
36--
37--------------------------------------------------------
38ALTER TABLE \`lc_products_campaigns\` ADD \`SEK\` DECIMAL(11,4) NOT
39NULL;
40
41Make it the store currency and set new currency conversion values:
42 UPDATE \`lc_settings\` SET \`value\` = 'SEK' WHERE
43\`key\` in ('store_currency_code', 'default_currency_code'); --
44--------------------------------------------------------
45UPDATE \`lc_currencies\` SET \`value\` = 6.8 WHERE \`code\` = 'USD'
46LIMIT 1; --
47--------------------------------------------------------
48UPDATE \`lc_currencies\` SET \`value\` = 9.2 WHERE \`code\` = 'EUR'
49LIMIT 1;
50
51### Language
52
53Add a language: INSERT INTO \`lc_languages\
54(\`status\`, \`code\`, \`name\`, \`locale\`, \`charset\`, \`raw_date\`,
55\`raw_time\`, \`raw_datetime\`, \`format_date\`, \`format_time\`,
56\`format_datetime\`, \`decimal_point\`, \`thousands_sep\`,
57\`currency_code\`, \`priority\`, \`date_updated\`, \`date_created\`)
58VALUES (1, 'sv', 'Svenska', 'sv_SE.utf8,sv_SE.UTF-8,swedish',
59'UTF-8', 'Y-m-d', 'H:i', 'Y-m-d H:i', '%b %e %Y', '%H:%M',
60'%b %e %Y %H:%M', ',', ' ', '', 0, NOW(), NOW());
61
62### Geo Zones and VAT
63
64Add a new geo zone and set VAT rates: INSERT INTO
65\`lc_geo_zones\` (\`name\`, \`description\`, \`date_updated\`,
66\`date_created\`) VALUES ('SE VAT Zone', *, NOW(), NOW()); --
67--------------------------------------------------------
68SET \@TAX_ZONE_SE = LAST_INSERT_ID(); --
69--------------------------------------------------------
70INSERT INTO \`lc_zones_to_geo_zones\` (\`geo_zone_id\`,
71\`country_code\`, \`zone_code\`, \`date_updated\`, \`date_created\`)
72VALUES (@TAX_ZONE_SE, 'SE',*, NOW(), NOW()); --
73--------------------------------------------------------
74INSERT INTO \`lc_tax_classes\` (\`name\`, \`description\`,
75\`date_updated\`, \`date_created\`) VALUES ('Standard', *, NOW(),
76NOW()), ('Reduced',*, NOW(), NOW()), ('Groceries', *, NOW(), NOW());
77--
78--------------------------------------------------------
79INSERT INTO \`lc_tax_rates\` (\`tax_class_id\`, \`geo_zone_id\`,
80\`type\`, \`name\`, \`description\`, \`rate\`, \`customer_type\`,
81\`tax_id_rule\`, \`date_updated\`, \`date_created\`) VALUES (1,
82\@TAX_ZONE_SE, 'percent', 'SE VAT 25%',*, 25.0000, 'both',
83'both', NOW(), NOW()), (2, \@TAX_ZONE_SE, 'percent', 'SE VAT 12%',
84*, 12.0000, 'both', 'both', NOW(), NOW()), (3, \@TAX_ZONE_SE,
85'percent', 'SE VAT 6%',*, 6.0000, 'both', 'both', NOW(), NOW());

Uppdaterad av litecart den 29 dec. 2023 klockan 04:28

Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.