I should have time this weekend... on son away on youth trip and wife going to see mother-in-law.

and when all else fails Define one and see how it acts

You are COMPLETELY Correct.

That is because that example is before the line that says:

VERSION 2 by Tom Moulton 5/2009

Look BELOW this line to see the updated format

What you need is in the last 10-15 lines of the file

tom

Here is the readme file I think it should have.

See the note:
***** Big changes see VERSION 2 below *******

Now go down to here:
VERSION 2 by Tom Moulton 5/2009
------------------------------------------------------------------------

/****************************************************************************
Author: Joe Hunt
Name: Import of CSV formatted items
Free software under GNU GPL
*****************************************************************************/

***** Big changes see VERSION 2 below *******

Recommended settings during install:

Menu Tab: Items and Inventory

Name: Import of CSV formatted items

Folder: import_items   (should follow unix folder convention)

Browse for the file: import_items.php on you local harddisk.

Press the Install button.

--- Before you use the Import Items module ---

Do a Company Backup from the Setup tab, Backup and Restore.

The comma separated file should be of the following type:
1. line should contain the following description:

id; description; category; units; mb_flag; currency; price;

In this case the separator is ';', id is the Stock ID, description is the Stock description,
category is a category you want to put your Stock. If this category doesn't exist it will
be created during import. units is the unit for the Stock.

The mb_flag is M for Manufacturered, B for Purchased or S for Service (no inventory)

currency is the currency for the price.
Leave empty for company currency.
price is the stock price. If you don't want the price to be entered, leave it empty.

Example of a CSV import file:

id; description; category; units; mb_flag; currency; price;
21; Item21; MyCat; each; B; ; 300;
22; Item22; MyCat; each; B; ; 200;
23; Item23; MyCat; each; B; ; 300;
24; Item24; MyCat; each; B; ; 200;
25; Item25; MyCat; each; B; ; 300;
26; Item26; MyCat; each; B; ; 200;

When the Import file is ready (you might prepare it in a spreadsheet if it is a huge one),
you are ready to go into the Import Module via Items and Inventory, right section.
First you see the default accounts for the various operations for the stocks. Leave them
as is, if you are satisfied with them.
The field separator is set to ';'. If you have used another separator, select it here.
Be aware, that if you have chosen ',' as a separator, you should enclose the fields with
double quotes ("Item21") because it might be common to put a comma inside a description.
Next you should select a Location to put the stocks into (the 'B' ones), Item Tax Type and
Sales Type. Last you browse to the CSV file and put it here.

If the items exist, they will be updated with the information here.

Now you are ready to press the Import CSV file button (Did you take a backup??)

Have fun!!

PS. The language inside the Import CSV file does NOT follow the traditional GETTEXT translations.
If you want to translate to another language, please rename the texts inside the file
import_items.php to your own language.
If you make improvements to this module, please share it with us!!.
We will then incorporate it into the module.

Contributor: Tom Moulton

Upgrade code to v2.1 database, perform same actions done during upgrade to create item_codes table

Also here is osCommerce SQL to dump items.

Remember to add trailing ";", also extra spaces on non-quoted strings may be a problem.

SELECT p.products_model, pd.products_name, cd.categories_name, 'each', 'B', 'USD', p.products_price FROM
products p left join products_description pd on p.products_id = pd.products_id and pd.language_id = 1
left join products_to_categories pc on p.products_id = pc.products_id
left join categories_description cd on pc.categories_id = cd.categories_id and cd.language_id = 1
where p.products_status = 1

The mb_flag is M for Manufacturered, B for Purchased or S for Service

tom
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
VERSION 2 by Tom Moulton 5/2009

This version supports importing Items, Sales Kits and BOM

The fields used will be different depending upon what is being imported.
It will still be a good idea to have a fixed number of (empty) fields to keep parsing simple.

The first field is the record type and that will decide what the rest of the line means.

TYPE = BOM

BOM;PARENT;COMPONENT;WORK CENTER;dummy;dummy;QUANTITY;dummy;dummy;dummy;

The loc_code will be selected from a Pull-Down menu as a default for the entire import.
The work center will be added if needed.

TYPE = UOM

UOM;ABBR;NAME;dummy;dummy;dummy;DECIMAL PLACES;dummy;dummy;dummy;

TYPE = KIT

KIT;ITEM_CODE;STOCK_ID;Description;Category;dummy;Quantity;dummy;Currency;Price;

Where ITEM_CODE is the code for a Kit and Stock_id is a part of that kit (Quantity each)
The Currency and Price, if present will update the price of the kit.


TYPE = FOREIGN

FOREIGN;ITEM_CODE;STOCK_ID;Description;Category;dummy;Quantity;dummy;dummy;dummy;

Where ITEM_CODE is the upc/etc code for an item and Stock_id is the item as we know it

ITEM;ITEM_CODE;STOCK_ID;Description;Category;units;dummy;MB_FLAG;Currency;Price;

Where Item_Code = STOCK_ID of the item.

TYPE = BUY

BUY;STOCK_ID;dummy;Description;Supplier Name;Supplier Units;Conversion Factor;dummy;Currency;Price;

Where Supplier must alrady exist

The rest should be as described elsewhere.

No I have not. It is getting closer to the top of my todo list...
I am sorry, a number of things broke recently (other projects) that I needed to fix

tom

231

(15 replies, posted in Announcements)

Oh! Sorry for the confusion... I have not done any work with 'unstable' (because of it's very nature!)

232

(15 replies, posted in Announcements)

in the top level I am doing a

cvs -q update -PAd

That should get everything... maybe you did not commit the file?

There is a special state for Added files that have not been comitted.

tom

233

(15 replies, posted in Announcements)

joe wrote:

Yes, there are db changes, but maybe you don't need to update your modules. You can check the file alter2.2.sql to see if there are changes to be fixed in the modules.

/Joe

I do not see a alter2.2.sql file, so I assume there have been no DB changes..

tom

234

(59 replies, posted in Modules Add-on's)

The osC ProductsID must match the FA ItemID.
If you run the osCommerce 'Price Check' it will point out errors

I have noticed that I do not resolve some Item Codes properly.

ex. osC AL-075M is really FA HA-60 it does not resolve properly.
I will look into that too

I have a number of additions to the importer, but got side tracked.
I will get back to it soon

tom

236

(15 replies, posted in Announcements)

I lost track. Have there been (or are they any planned) db changes in the 2.2 release?

I may need to update my modules if there are.

tom

I have all those things implemented in the module I created.

If you need help getting it working, let me know

tom

238

(2 replies, posted in Accounts Payable)

Thanks.

239

(2 replies, posted in Accounts Payable)

When receiving items and you enter the Q of this delivery and hit update, shouldn't the Value of items received be updated?

http://moulton.us/po_rx.jpg

tom

I think everything was ok in this table.

"9";"13";"1";"1766";"1859";"2009-06-23";"2009-06-23";"8";"1";"13";"7.1";"0";"15";"0";"0";"0";"1";"1";"24";"0";"0"
"14";"12";"2";"1766";"1859";"2009-06-23";"0000-00-00";"8";"0";"0";"0";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0"
"24";"10";"0";"1766";"1859";"2009-06-23";"2009-06-24";"8";"1";"13";"7.1";"0";"15";"0";"0";"22.1";"1";"1";"9";"0";"0"

No negative numbers and allocation =0 on all but the last.

I ended up editing debtor_trans alloc=0 for the problem records.

tom

Joe,

Does this also include the situation I had?

Customer Branch A/R account = Bank Account

I tried voiding out those transactions and re-entering the customer payment hoping I would then be able to allocate it properly, but I get an error.

There are no unsettled transactions to allocate.

How do I unsettle the transaction so I can get it allocated properly?

tom

I think the latest version does support that.

I also have a version that I am testing that allows for a single dimension for items.

Once I have that tested I will have it posted.

It also allows for *export* of items as well...

tom

I had to void an invoice and I was able to recreate a new one with out changing anything else. (I had the shipping cost wrong)

tom

Actually the module that you downloaded only supports different databases.
I have found that if you are using the same mysql server and username
that php will attempt to re-use the connection, so it is recommended that
you use a different username for the second connection.

I have a version I am cleaning up that also supports havig all the tables in the same database.

As far as which cart is better, let's not dredge up the tep/osc zc history I seem
to recall a lot of flame wars over the how the fork was done and qustions if
ZC violated GPL

tom

I believe you can do this by using Dimensions.

If you add a Dimension for Hardware and Furniture and then add the proper dimension to each item in the Item's properties (stock_master) you can then
run dimension reports that will break things dwn.

You can even create Quick Entries so you can divide any shipping/handling
charges down by dimension.

(I am fairly sure I am correct... Joe will correct me or clarify smile )

tom

246

(1 replies, posted in Wish List)

It would be nice if the places you have a Customer List pull-down
(like Customer Payment) there was a text box where you can start typing the name and it could be selected much like the Stock_ID does on Sales Order entry

tom

247

(0 replies, posted in Modules Add-on's)

I am working on a module to export various items to be imported with the Import Module.

I Expanded the Import because I would need to reload items, etc over and over while I was getting used to things.

I have been using it a few weeks and am changing the way I do some things and want to Export to include a number of changes I made
online but not in my CVS files...

stay tuned

tom

248

(12 replies, posted in Installation)

exactly

There is no 'getting started guide' but I can give a few suggestions...

1) The IDE is your favorite text editor...
2) I often find it easiest to edit the web pages in-place
3) The best way to learn how FA code works is to look at the Downloadable Modules
4) Often a lot of what you want to add can be added via a module
5) using CVS to keep the official code in-sync makes life easier (I like it so when I totally mess up I can do diff's against known good code)

I started improving the Import module and then wrote the module for osCommerce (web store) customer/order import.

I use the import module and Backup/Restore (Setup tab) a lot.
I like to wipe out the db to a known state and re-test things... also helps to look at DB before and after..
helps answer "why did it do THAT?"

that is all I can think of of the top of my head

tom

250

(6 replies, posted in Installation)

Will the Create Company change the table prefix from 0_ to 1_ ?