Zen Follower
- Join Date:
- Oct 2005
- Posts:
- 274
- Plugin Contributions:
- 0
Australian ABN Tax Number v1.0 with 1.31?
Has anyone been able to get Australian ABN Tax Number v1.0 working with 1.31? Any clues how to modify it to work with1.31?
Mark.
Mark New
Views: 2,988
Zen Follower
Has anyone been able to get Australian ABN Tax Number v1.0 working with 1.31? Any clues how to modify it to work with1.31?
Mark.
Mark New
New Zenner
Hi Mark.
Have you got a copy that I can download? I'm interested in using this as well and I will attempt a hack, and post my solution here.
Thanks!
Marcus.
New Zenner
Nvm, found it:
http://www.zen-cart.com/archived_contributions/other/taxid_v1.0.zip
Will proceed to try and hack this to work with v1.3.x.
New Zenner
Ok the files work. Only the database-change SQL file and INSTALL.txt instructions needed tweaking. Firstly the database-change SQL file:
Second, changes to the instructions in INSTALL.txt:
<fieldset>
<legend><?php echo ENTRY_TAXID; ?></legend>
<label class="inputLabel" for="company"><?php echo ENTRY_TAXID; ?></label>
<?php echo zen_draw_input_field('taxid', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_taxid', '11') . ' id="taxid"') . (zen_not_null(ENTRY_TAXID_TEXT) ? '<span class="alert">' . ENTRY_TAXID_TEXT . '</span>': ''); ?>
</fieldset>
And lastly, edit the language files changes outlined in INSTALL.txt as you see fit:
admin/includes/languages/english.php
includes/languages/english.php
New Zenner
Hi,
Where you mention to change table prefix as necessary.
What do I change it to? I can't seem to work it out. (Sorry if it something easy)
New Zenner
Depending on how you install your Zen-Cart, your existing MYSQL tables may have the "zen_" prefix for their names, or they may not. Edit the included database-change SQL file included in the bundle as appropriate, before you run it.
That is, if your tables do not have the "zen_" prefix, remove any occurrences of this in the database-change SQL file.
New Zenner
2 statements processed.
ERROR: Cannot execute because table ($#@@*)_zen5.configuration does not exist. CHECK PREFIXES!
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
The table does exist because I checked my database to find out if it was there first.
This might sound lame, but what does CHECK PREFIXES mean? :blush:
New Zenner
You know when you install Zen-Cart, it would ask what prefix do you want for your table names? Prefix here means "something that goes in front of the table name".
In your case, it looks like your prefix is
($#@@*)_zen5
In the database change SQL script, the prefix is
zen
Change the script accordingly to reflect your prefix.
New Zenner
That's what I have done, but it tells me the config file does not exist, even though I checked and put the exact words in.
I am confused :cry:
New Zenner
Download the module again and start from scratch. Perform the changes that I've outlined.
The database SQL change file that I am referring to is named> database_changes.sqlin the bundle.
Good luck.
New Zenner
I reinstalled it and made the changes.
In the install txt. It says to load the database_changes.sql file into database, which is what I have been trying to do.
Should I be doing something else first instead?
I have made all the changes in the install.txt file.
New Zenner
Yes you have to run the database changes - otherwise it wouldn't work.
I'm guessing you're stumbling at this point:
INSERT INTO zen_configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '11', 'min length of Tax ID number', 1, 3, '2004-10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);
Change the above to be:
INSERT INTO ($#@@*)_zen5_configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '11', 'min length of Tax ID number', 1, 3, '2004-10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);
Note that change in front of the table name. That is the prefix. Am assuming that your table name prefix is "($#@@*)_zen5". Change that to your real prefix as appropriate.
New Zenner
O.k,
This is the original database_changes.sql file:
address_bookALTER TABLE zen_address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;
zen_configurationINSERT INTO zen_configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '0', 'min length of Tax ID number', 1, 3, '2004-10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);
Now this is what changes I make:
address_bookALTER TABLE craftyon_zen5_address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;
craftyon_zen5_configurationINSERT INTO craftyon_zen5_configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '0', 'min length of Tax ID number', 1, 3, '2004-
10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);
This is the error I get:
1146 Table 'craftyon_zen5.craftyon_zen5_address_book' doesn't exist
in:
[show fields from craftyon_zen5_address_book]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Now:
I changed it to this:
address_bookALTER TABLE craftyon_zen5.address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;
craftyon_zen5.configurationINSERT INTO craftyon_zen5.configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '0', 'min length of Tax ID number', 1, 3, '2004-
10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);
and I got this:
Failed: 2
ERROR: Cannot ADD column entry_taxid because it already exists.
ERROR: Cannot execute because table craftyon_zen5.configuration does not exist. CHECK PREFIXES!
Note: 2 statements ignored. See "upgrade_exceptions" table for additional details.
It is something simple, but I can't see it. :frusty:
New Zenner
The second error shows me that the first part of the script has executed. That's why it's complaining that the entry already exists.
As for your "configuration" table name, I can't help you there. You have to look at your table names carefully and make sure the script and what exists match up.
New Zenner
Thanks :smile:
I have done that, I have even copied and pasted the exact name into the file, it still doesn't work.
Thanks for your time though, I really do appreciate it. :yes:
Tell staff why this post should be reviewed.