Forums / All Other Contributions/Addons / Sage Line 50 Zen export module

Sage Line 50 Zen export module

Results 1 to 20 of 79
30 Sep 2007, 09:17
#1
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Sage Line 50 Zen export module

If anyone is interested i have written a module for Zen to export the Audit Trail tranasction files (sales finances), the Stock Transaction files (sales stock) and the Stock Records file (product records to populate the products into Sage).

If there is interest i will submit for addition to the downloads area.

James

www.janetsystems.com
30 Sep 2007, 14:17
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: Sage Line 50 Zen export module

I would be interested in this. Please go ahead and submit it to the downloads section.
01 Oct 2007, 10:38
#3
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

Now available to download!

As i've written in the notes, i wrote this to fulfill my needs, not the masses, but will provide a great easy starting point to go from.
02 Oct 2007, 10:18
#4
brosville avatar

brosville

New Zenner

Join Date:
Oct 2007
Posts:
4
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

downloaded and installed the "stock" version - no problems, works beautifully, but the "orders" version appears to have an error in the sql file - all I get is error messages. Also, are the two designed to work together? (as there will then be two files named "sage.php":smile:
02 Oct 2007, 12:05
#5
brosville avatar

brosville

New Zenner

Join Date:
Oct 2007
Posts:
4
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

can't find the "alter post" button - please disregard the "2 versions of sage.php" line - I was looking into the wrong folder!:lookaroun
03 Oct 2007, 06:04
#6
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

Hi, Can you post a line of the error and i'll look into it.

I suspect its the addition of the new table Sage_update and the intitial value.

Thanks for the feedback
J
03 Oct 2007, 09:57
#7
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj

This is very exciting thank you. I have failled to get QBI to work (I am in the UK and it only works on the US versions) I have yet to make a decision re accounts packages as I have been looking for a link like this.

Couple of questions while I wait for a trial version of sage to be sent through from them. Can it deal with stock attributes. Typically I sell Baby vests, t-shirts etc in different colours and ages so can have upto 2 or 3 attributes for a product. I am assuming this is put into one sku in sage. Does it map these out.

Second question is managing stock. Can you input stock back to Zencart once a purchase order has been raised in sage stock has arrived and booked into sage can this then update Zencart? - I can see issue here with the attributes and mapping stock back into Zencart.

Many thanks in advance.

MG
04 Oct 2007, 07:30
#8
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

First thing you need to look at is Sage. Unfortunately within sage,each product has its own specific product id. i.e a large vest would be id 124, a small vest 123. This makes it really tricky if using stock attributes in Zen with a Sage system, because it is still one product id within Zen, i.e both small and large vests come under "vests" with a product id of 125...

Second thing you need to decide is which program are you going to use for the stock management levels...sage or zen?

I sell a number of different value goods from T-shirts at 17.50 to expensive items around the 1K mark. So, all i did was split out the different attributes into individual products for the the more expensive items on the website, as I don't really need to know whether i have 2 medium and 2 large t-shirts in stock at the same price, i just need to know that i have 4 total t-shirts in stock worth £££ for the accounts. T-shirts are still sold as attributes on my website so that tells me how many i have instock, and then the Sage tells me i have a total ammount of t-shirts worth £££ in stock which is fine for the financial side.

For the update from Sage back to website, again, you need to decide what products to split and what to keep with attributes before doing this. I have written a one button software that runs from your desktop (a proper program rather than a zen module) that does all the above and uploads that data back from sage to web. james ' @ ' janetsystems.com for more info on that.

As i said, I wrote the module for my own needs, so it is more suited to UK with use of VAT and exporting e.t.c. But could make some changes if people have ideas.

J

www.janetsystems.com
05 Oct 2007, 21:51
#9
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Caljj

Thank you for the info. I have just tried to run the orders module and I get


1054 Unknown column 'SAGE_STATUS' in 'where clause'
in:
[SELECT * FROM fmorders WHERE orders_status <= SAGE_STATUS AND date_purchased >= 'SAGE_STARTSDATE 00:00:01' AND date_purchased <= 'SAGE_ENDSDATE 23:59:59' ORDER BY orders_id ASC]

What might cause this. I cannot see sage_status anywhere.

Thanks

MG
06 Oct 2007, 08:51
#10
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

Hi,

Oops, yes can see why that would happen, I seem to have encountered a copy paste error when producing the install sql script so that none of the configuration data is there...:censored:

I'll upload what it is supposed to be later today.
Apologies.

J
08 Oct 2007, 23:37
#11
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj

Have you been able to upload? can you post the script in this thread if easier?

Thanks and regards

MG
09 Oct 2007, 11:32
#12
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

Hi Apologies for the delay, its always a pain when you overwrite something without realising, so had to start from scratch and been very busy.:frusty:

I've just uploaded now, so should be available soon, else here is the sql below that you can just copy/paste for the install

Kind regards

James

www.janetsystems.com

CREATE TABLE sage_update
(last_update datetime);

Insert into sage_update Values ('0000-00-00 00:00:00');

SET @t7=0;
SELECT (@t7:=configuration_group_id) as t7
FROM configuration_group
WHERE configuration_group_title= 'SAGE';
DELETE FROM configuration WHERE configuration_group_id = @t7;
DELETE FROM configuration_group WHERE configuration_group_id = @t7;

INSERT INTO configuration_group VALUES (NULL, 'Sage Configuration', 'Set Sage Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SET @t7=0;
SELECT (@t7:=configuration_group_id) as t7 
FROM configuration_group
WHERE configuration_group_title= 'Sage Configuration';

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES
(NULL, 'Output File Name', 'SAGE_OUTPUT_FILENAME', 'sage_stock_transaction.csv', 'Set the name of your sage stock output file', @t7, 1, NOW(), NULL, NULL),
(NULL, 'Output File Name', 'SAGE_OUTPUT_FILENAME2', 'sage_sales_transaction.csv', 'Set the name of your sage sales output file', @t7, 2, NOW(), NULL, NULL),
(NULL, 'Output Directory', 'SAGE_DIRECTORY', 'sage/', 'Set the name of your file output directory', @t7, 3, NOW(), NULL, NULL),
(NULL, 'Start Date', 'SAGE_STARTSDATE','2007-01-01', 'Set the start date of your output file - set to null to use last update, or date format yyyy-mm-dd', @t7, 4, NOW(), NULL, NULL),
(NULL, 'End Date', 'SAGE_ENDSDATE', 'null', 'Set the end date of your output file, or set to null for now - date format yyyy-mm-dd', @t7, 5, NOW(), NULL, NULL),
(NULL, 'Order Status', 'SAGE_STATUS',' 4', 'Set the Complete Status Number of your Order Processing to process all below this level', @t7, 6, NOW(), NULL, NULL),
(NULL, 'Transaction Code', 'SAGE_TX','GO', 'Stock Tranascation Code for Sage', @t7, 7, NOW(), NULL, NULL),
(NULL, 'Sales Code', 'SAGE_TX2','CR', 'Sales Tranascation Code for Sage', @t7, 8, NOW(), NULL, NULL),
(NULL, 'Paypal/Credit Card Nominal Code', 'SAGE_PAYPAL', '1205', 'Set the Sage Nominal code for Paypal/Credit Cards e.t.c', @t7, 9, NOW(), NULL, NULL),
(NULL, 'Bank/Cheque Nominal Code', 'SAGE_CHEQ', '1200', 'Set the Sage Nominal code for Cheques/Bank transfers e.t.c', @t7, 10, NOW(), NULL, NULL);
10 Oct 2007, 23:19
#13
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj,

Thank you for the script have run and certainly got the options menus etc.

Having tried to run the sage export I get the following error

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in .....\Websites\sage.php on line 174

Is this a bug or have I not set something up correctly.

Thanks

MG
10 Oct 2007, 23:49
#14
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj,

I might have sorted this out. The need for a table prefix in the SQL statment in the line above 174.

Please confirm this could be cause.

Regards

MG
11 Oct 2007, 00:14
#15
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj

Sorry another question.

I do not seem to be getting any stock quantity value exported with the stock file?

Thanks

MG
11 Oct 2007, 18:01
#16
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

MikeyG:

Calljj,
I might have sorted this out. The need for a table prefix in the SQL statment in the line above 174.
Please confirm this could be cause.
Regards
MG


Hi,

I've coded
$query = mysql_query("SELECT * FROM products WHERE products_id =$prodid");


You could change to
$query = mysql_query("SELECT * FROM TABLE_PRODUCTS WHERE products_id =$prodid");
11 Oct 2007, 18:15
#17
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

MikeyG:

Calljj
I do not seem to be getting any stock quantity value exported with the stock
MG


Is this the stock in the transactions module, or the stock module?
No problem in the transactions module, its dealt with on line 210.

In the stock module (to download just stock records for when starting up sage and automatically entereing your product IDs and descriptions) then Sage doesn't allow for the import of stock quantity.
12 Oct 2007, 00:19
#18
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj,

Thanks for your reply. It is the stock module and I understand now having had a demo this morning from sage that yes you would not take stock in here.

However I am wonder if you could just explain / expand on the transaction import please:

I am getting an error of field 2: Invalid Bank Account

I clearly don't understand the account set up and account types in sage yet. Is it possible just to explain how the 2 files work to gether in the sage export (sales) module.

I have obviously missed something somwhere in my set up.

Thanks once again

MG
12 Oct 2007, 00:32
#19
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Sage Line 50 Zen export module

Calljj,

I have just tried to import the stock transaction but get a fail on pass 2 due to insufficinet stock. As a business I can accept back orders so how might I get round this one.


Apologies if again I have missed the point here, but a good testing ground I hope from a complete novice trying to use it.

Thanks

MG
12 Oct 2007, 07:38
#20
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Sage Line 50 Zen export module

MikeyG:

Calljj,

I am getting an error of field 2: Invalid Bank Account

MG


Okay, this is where you need to set up your Nominal Codes in Sage.
The standard code in Sage for a bank account is 1200, then 1205 for credit cards.

Once you have set these in Sage (i think they are default numbers anyhow) then you set them to be the same in the configuration screen on the zen module, where i think i have also set them to be 1200 and 1205, but they can be changed to suit your need.