Forums / All Other Contributions/Addons / Australian ABN Tax Number v1.0 with 1.31?

Australian ABN Tax Number v1.0 with 1.31?

Locked

Views: 2,988

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
19 May 2006, 12:17 AM
#1
marknew avatar

marknew

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.

30 Jan 2007, 6:31 AM
#2
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

30 Jan 2007, 8:04 AM
#4
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

Ok the files work. Only the database-change SQL file and INSTALL.txt instructions needed tweaking. Firstly the database-change SQL file:

  1. change table prefix as necessary
  2. varchar(10) -> change field length as necessary

Second, changes to the instructions in INSTALL.txt:

  1. where it says to edit includes/modules/pages/create_account/header_php.php, edit includes/modules/create_account.php instead.
  2. where it says to edit catalog/includes/templates/YOUR_TEMPLATE/templates/tpl_create_account_default.php, edit catalog/includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php instead.
  3. BUT do not follow the change given. Instead, use this:
<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

26 Feb 2007, 3:05 AM
#5
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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)

26 Feb 2007, 3:23 AM
#6
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

26 Feb 2007, 8:55 PM
#7
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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:

26 Feb 2007, 11:27 PM
#8
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

27 Feb 2007, 5:18 AM
#9
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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:

27 Feb 2007, 5:22 AM
#10
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

27 Feb 2007, 5:43 AM
#11
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

27 Feb 2007, 5:47 AM
#12
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

27 Feb 2007, 6:14 AM
#13
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

O.k,

This is the original database_changes.sql file:

Table structure for table address_book

ALTER TABLE zen_address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;

Table structure for table zen_configuration

INSERT 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:

Table structure for table address_book

ALTER TABLE craftyon_zen5_address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;

Table structure for table craftyon_zen5_configuration

INSERT 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:

Table structure for table address_book

ALTER TABLE craftyon_zen5.address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;

Table structure for table craftyon_zen5.configuration

INSERT 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:

27 Feb 2007, 6:36 AM
#14
mooi avatar

mooi

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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.

27 Feb 2007, 9:43 AM
#15
beckinoz avatar

beckinoz

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
22
Plugin Contributions:
0

Re: Australian ABN Tax Number v1.0 with 1.31?

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: