VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: lipes on February 03, 2012, 01:23:16 AM

Title: State for country - error
Post by: lipes on February 03, 2012, 01:23:16 AM
(VM 2.0.0)
I'am trying to add some states..
and i've entered firstly a city state name called "Braga" ..
and then for other city state "Bragança"..

it gives me this error:
VirtueMartModelState::store TableStates: :store failed
Duplicate entry '171-BR' for key 'idx_state_2_code' SQL=INSERT INTO `jos_virtuemart_states` (`virtuemart_state_id`,`virtuemart_country_id`,`virtuemart_worldzone_id`,`state_name`,`state_3_code`,`state_2_code`,`published`,`created_on`,`created_by`,`modified_on`,`modified_by`) VALUES ('0','171','1','BRAGANÇA','BRN','BRN','1','2012-02-03 00:18:25','42','2012-02-03 00:18:25','42')
Title: Re: State for country - error
Post by: Milbo on February 03, 2012, 01:47:21 AM
Please use 2.0.1c
Title: Re: State for country - error
Post by: lipes on February 03, 2012, 01:56:20 AM
lol...  i've done the update before read anything.. I was thinking about it before...
but i lose all my modifications in the VM modules of vm2.0.0
I forgot to save the data of my changes in the modules (css, etc)...   :-X  ouch!....
I have to see if I can remember what I lost to to reapply it again :o

tks..
Title: Re: State for country - error
Post by: PRO on February 03, 2012, 03:09:10 AM
prolipes, you should do overrides, and not modify core files
Title: Re: State for country - error
Post by: lipes on February 03, 2012, 03:37:06 AM
humm..
i dont understand what "overrides" means...
there is some topic/post here with a tutorial of that "overrides"?!

i exchange the normal file to other name? the VM calls that "other" name from where? is a bit complex..
Title: Re: State for country - error
Post by: PRO on February 03, 2012, 03:41:26 AM
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Title: Re: State for country - error
Post by: lipes on February 03, 2012, 03:45:08 AM
wow.. very nice :D

Thanks!
Title: Re: State for country - error
Post by: lipes on February 03, 2012, 03:52:31 AM
i've copied my 2 edited files into ->  \templates\mp3\html\mod_virtuemart_product\tmpl\default.php

and -> \templates\mp3\html\mod_virtuemart_product\helper.php

i also add this lines to templateDetails.xml

      <folder>html/mod_virtuemart_product</folder>
      <folder>html/mod_virtuemart_product/tmpl</folder>
      <filename>html/mod_virtuemart_product/helper.php</filename>
      <filename>html/mod_virtuemart_product/tmpl/default.php</filename>

but i got same result.. without any changes from the default instalation...