Jumprit's Knowledge

Jumprit's knowledge and references to share.

Adding States in Prestashop —

To create or add states in Prestashop shipping module, follow these steps: (eg. adding states for Australia)

 

1. Go to Shipping > Countries, edit Australia, then change “Contains States” to “Yes”, then Australia will become an option in the Country field when adding states.
2. Go to Shipping > States > Click Add New.
Done..!! 😎

 

 

————————————————————————————————————————-
Another way is to edit your /install/sql/db_settings_lite.sql so you will automatically get Australia states on fresh install of prestashop.
You need to add this:

INSERT INTO `PREFIX_state` (`id_country`, `id_zone`, `name`, `iso_code`, `active`) VALUES
(24, 5, ‘Australian Capital Territory’, ‘ACT’, 1),
(24, 5, ‘New South Wales’, ‘NSW’, 1),
(24, 5, ‘Northern Territory’, ‘NT’, 1),
(24, 5, ‘Queensland’, ‘QLD’, 1),
(24, 5, ‘South Australia’, ‘SA’, 1),
(24, 5, ‘Tasmania’, ‘TAS’, 1),
(24, 5, ‘Victoria’, ‘VIC’, 1),
(24, 5, ‘Western Australia’, ‘WA’, 1);

If you want to add GST (tax), you can edit:

INSERT INTO `PREFIX_tax` (`id_tax`, `rate`) VALUES (1, 19.6),(2, 5.5),(3, 17.5);

 

INSERT INTO `PREFIX_tax_lang` (`id_tax`, `id_lang`, `name`) VALUES
(1, 1, ‘VAT 19.6%’),(1, 2, ‘TVA 19.6%’),(1, 3, ‘IVA 19.6%’),
(2, 1, ‘VAT 5.5%’),(2, 2, ‘TVA 5.5%’),(2, 3, ‘IVA 5.5%’),
(3, 1, ‘VAT 17.5%’),(3, 2, ‘TVA UK 17.5%’),(3, 3, ‘IVA UK 17.5%’);

 

INSERT INTO `PREFIX_tax_zone` (`id_tax`, `id_zone`) VALUES
(1, 1),
(2, 1);

so will become:

INSERT INTO `PREFIX_tax` (`id_tax`, `rate`) VALUES (1, 19.6),(2, 5.5),(3, 17.5),(4, 10);

 

INSERT INTO `PREFIX_tax_lang` (`id_tax`, `id_lang`, `name`) VALUES
(1, 1, ‘VAT 19.6%’),(1, 2, ‘TVA 19.6%’),(1, 3, ‘IVA 19.6%’),
(2, 1, ‘VAT 5.5%’),(2, 2, ‘TVA 5.5%’),(2, 3, ‘IVA 5.5%’),
(3, 1, ‘VAT 17.5%’),(3, 2, ‘TVA UK 17.5%’),(3, 3, ‘IVA UK 17.5%’),
(4, 1, ‘GST 10%’),(4,2,’GST 10%’),(4,3,’GST 10%’);

 

INSERT INTO `PREFIX_tax_zone` (`id_tax`, `id_zone`) VALUES
(1, 1),
(2, 1),
(4, 5);

This will add a GST 10% tax in the Oceania zone. 😀


Categorised as: Prestashop



Leave a Reply