Jump to content
thirty bees forum
  • 0

After Fresh Install of TB 1.6 State Field is missing on adresses


Question

Posted

I did a new approach to upgrade TB from 1.0.8 to 1.6.   I did a fresh Install of TB 1.6. Then I exported my customer and order data from database and imported these on the freshly installed 1.6. test environment.

My default country is Switzerland and I have set 'contains states' to yes. Regardless if I work on shop addresses page or customer addresses page, the State just pops up for a second and then the field disappers. I cannot save or change addresses as long as the 'contains states' flag is set to ON.

I could not figure out why the states field is disappearing. I looks like some javascript code might set the field state to hidden.

6 answers to this question

Recommended Posts

  • 0
Posted

With Debug Profiling I also catched the database query that queries the containts_states flag. This query results with the field set to '1'.

  • 0
Posted

Okay, I have found the problem. The table for 'States' was not populated. Once there is at least on entry, the field stays visible. It is minor, but I would be more logically to show the state field anyway if the flag for the country is set to 'ON'.

  • 0
Posted

Still I found one more question not solved. If have 4 countries enabled.

Deutschland
Frankreich
Liechtenstein
Österreich
Schweiz

99% of customers belong to Schweiz. However since the alphabetical sort order is taken for the ordering of the countries. Deutschland is the default set if no choice is made. So it is wrong for 99% of the customers.

Is there an option to set a default country without coding?

 

  • 0
Posted
42 minutes ago, Scully said:

Okay, I have found the problem. The table for 'States' was not populated. Once there is at least on entry, the field stays visible. It is minor, but I would be more logically to show the state field anyway if the flag for the country is set to 'ON'.

Regarding this can you confirm if this list is complete and contains all the 'states' in Switzerland and I'll be able to make a PR so datakick can include it in the localization pack and you would be able to import them from Localization ->  Import a localization pack ?

 

<states>
    <state name="Aargau (de)" iso_code="CH-AG" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Appenzell Ausserrhoden (de)" iso_code="CH-AR" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Appenzell Innerrhoden (de)" iso_code="CH-AI" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Basel-Landschaft (de)" iso_code="CH-BL" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Basel-Stadt (de)" iso_code="CH-BS" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Bern (de), Berne (fr)" iso_code="CH-BE" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Fribourg (fr), Freiburg (de)" iso_code="CH-FR" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Genève (fr)" iso_code="CH-GE" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Glarus (de)" iso_code="CH-GL" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Graubünden (de)" iso_code="CH-GR" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Jura (fr)" iso_code="CH-JU" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Luzern (de)" iso_code="CH-LU" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Neuchâtel (fr)" iso_code="CH-NE" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Nidwalden (de)" iso_code="CH-NW" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Obwalden (de)" iso_code="CH-OW" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Sankt Gallen (de)" iso_code="CH-SG" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Schaffhausen (de)" iso_code="CH-SH" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Schwyz (de)" iso_code="CH-SZ" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Solothurn (de)" iso_code="CH-SO" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Thurgau (de)" iso_code="CH-TG" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Ticino (it)" iso_code="CH-TI" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Uri (de)" iso_code="CH-UR" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Valais (fr), Wallis (de)" iso_code="CH-VS" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Vaud (fr)" iso_code="CH-VD" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Zug (de)" iso_code="CH-ZG" country="CH" zone="Europe" tax_behavior="0" />
    <state name="Zürich (de)" iso_code="CH-ZH" country="CH" zone="Europe" tax_behavior="0" />
	</states>


Regarding the default country you can set this here Localization->Localization:

image.thumb.png.d1c5a2086d76a9891ccbd31820d580c0.png

While at this issue we can fix the tax rates too:
(current rates in thirty bees)

<taxes>
    <tax id="1" name="TVA CH 8.0%" rate="8.0"/>
    <tax id="2" name="TVA CH 3.8%" rate="3.8"/>
    <tax id="3" name="TVA CH 2.5%" rate="2.5"/>
    <taxRulesGroup name="CH Standard Rate (8.0%)">
      <taxRule iso_code_country="ch" id_tax="1"/>
    </taxRulesGroup>
    <taxRulesGroup name="CH Reduced Rate (3.8%)">
      <taxRule iso_code_country="ch" id_tax="2"/>
    </taxRulesGroup>
    <taxRulesGroup name="CH Super Reduced Rate (2.5%)">
      <taxRule iso_code_country="ch" id_tax="3"/>
    </taxRulesGroup>
  </taxes>

I see the following information currently online, if you can confirm this is true:
 

Quote

Normal rate: 8,1 %

The normal rate is 8,1 %.

Reduced rate: 2,6 %

A reduced rate of 2,6 % applies for certain categories of goods and services, particularly:

  • Foodstuffs (except alcoholic beverages) according to the Foodstuffs Act of 20 June 2014 (exception: the normal rate applies for foodstuffs that form part of restaurant services);
  • Cattle, poultry, fish;
  • Seeds, living plants, cut flowers;
  • Grains;
  • Animal feed and fertilizer;
  • Medications;
  • Newspapers, magazines, books and other printed products without advertising character of the kinds to be stipulated by the Federal Council;
  • Electronic newspapers, magazines and books without advertising character of the kinds to be stipulated by the Federal Council;
  • Services of radio and television companies (exception: the normal rate applies for services of a commercial nature);
  • Menstrual hygiene products (from 1 January 2025).

Special rate: 3,8 %

Accommodation services (overnight stays with breakfast) in the hotel and accommodation business (e.g. letting of holiday apartments) are subject to a rate of 3,8 %.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...