News:

Support the VirtueMart project and become a member

Main Menu

State for country - error

Started by lipes, February 03, 2012, 01:23:16 AM

Previous topic - Next topic

lipes

(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')
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

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..
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

prolipes, you should do overrides, and not modify core files

lipes

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..
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25


lipes

VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

#7
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... 
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25