DHPOS Stock Table - online

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

User avatar
Andrew
Site Administrator
Posts:822
Joined:Sun Dec 28, 2003 3:40 pm
Location:New Zealand

Post by Andrew » Tue Feb 07, 2006 3:05 am

Solution: don't have a blue banner. :D
Image
DHPOS Veteran (from v3.46, July 2002)

peachey13
Forum Regular
Posts:89
Joined:Fri Jan 02, 2004 6:32 pm
Location:Queensland (Australia)

Post by peachey13 » Sat Feb 11, 2006 8:44 pm

if you stick on colo(u)r schemes check out these sites:

Colo(u)r Scheme Genator 2
Click the colo(u)r you want and it will show 3 colo(u)r's that will match.

ColorMatch 5k - The Orginal
Slide the 3 white boxes until the colo(u)r you want is shown in the large box - the matching col(u)rs will be showen in the box belowe

///Colourlovers
Select either Top,New,Search or Ramdom From the palettes from the side menu. When you find one you like click on the box and it will redirect you its selected page. the five macting colo(u)rs will be in a coloum with the # codes under the colo(u)r name.

Color Schemer *This site may require IE as it uses tool tips*
Click Colo(u) Scheme in the top menu bar and then from the sub meun you can select Browse,All,Search.
to find the # colour code hover your mouse over the seleted colo(u)r.

phill2000star
Occasional Poster
Posts:10
Joined:Sun Apr 22, 2007 7:47 am

Post by phill2000star » Fri May 04, 2007 12:04 pm

Hi all,

I am a web designer by trade and deal with a lot of PHP / MySQL sites.

If there is any help I can throw your way let me know, as I am currently working on a record shop nearby. I am already putting DHPOS in there, and was thinking of getting it to communicate with his website.

My main thought is with the "real-time" stock updating due to sales / returns etc. Any ideas on how we can get the two DB's to talk?

IAN
Forum Regular
Posts:111
Joined:Sat Sep 23, 2006 9:26 pm
Location:UK, Birmingham

Post by IAN » Wed May 16, 2007 9:44 am

first off how do you convert the tbl database file for something useful?
IAN

(Everything i say is a lie! so am i telling you the truth?)

phill2000star
Occasional Poster
Posts:10
Joined:Sun Apr 22, 2007 7:47 am

Post by phill2000star » Wed May 16, 2007 1:02 pm

Hi everyone.

As I said I have been doing some work with a friends shop that I have now got his website and till system working together.

The stock admin for the shop and site is all done via a admin section on his website that I have coded. To update the information on his till he simply points his browser to a file called stockfile.php that provides a link to a txt file which he downloads on to his till and imports!

I have included the code below. It's only in PHP and uses a MySQL database but most people will be able to edit it for what they require. I have commented as much as I can, but if you need help let me know.

Code: Select all

<?php
// database connection config
$dbHost = 'x'; // susbtitute the x's for your database details.
$dbUser = 'x';
$dbPass = 'x';
$dbName = 'x';

// now open our connection to our database
$dbConn = mysql_connect ($dbHost, $dbUser, $dbPass) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db($dbName) or die('Cannot select database. ' . mysql_error());

// 
$varPriceFile = "PRICEFILE.TXT";
$varFile = fopen($varPriceFile, 'w') or die("can't open file");
$sql = "SELECT * FROM tbl_stock;";
$result = mysql_query($sql) or die(mysql_error();
$num=mysql_numrows($result);

//loop through each record in the database, extracting what information we require and write a new line for the stock.txt file.

for ($i=0;$i<$num;$i++)
	{
	$varStockNumber = mysql_result($result,$i,"xxx"); // xxx = the field that contains the stock numbers in your dbase
	$varDescription = mysql_result($result,$i,"xxx"); // xxx = the field that contains the description in your dbase
	$varCost = mysql_result($result,$i,"xxx"); // xxx = the field that contains the cost in your dbase
	$varCurrentStock = mysql_result($result,$i,"xxx"); // xxx = the field that contains the qty of stock in your dbase
	$varTaxChart = mysql_result($result,$i,"xxx"); // xxx = the field that contains the tax chart number in your dbase
	/* add more here for the fields you want to include from your database.
	$varX = mysql_result($result,$i,"xxx");
	$varX = mysql_result($result,$i,"xxx");
	$varX = mysql_result($result,$i,"xxx");
	$varX = mysql_result($result,$i,"xxx");
	$varX = mysql_result($result,$i,"xxx");
	$varX = mysql_result($result,$i,"xxx");
	*/
	
/* ============================================================================================================
 PLEASE NOTE!!! The following line writes each of the items in your stockfile to the txt file to upload on DHPOS.
 
 You need to choose what information you want to include. I personally dont fill in all the fields, but look at
 the STOCKT~1.XLS file in the DHPOS folder and see what fields you actually require. Please remeber that they have
 to be seperated by the , between each value!!

 ============================================================================================================ */
	$varLine = $varStockNumber.",".$varDescription.",".$varCost.",,".$varTaxChart.",,".$varCurrentStock.",,,,,,,,\n";
	fwrite($varFile, $varLine);
	}
fclose($varFile);
echo "<a href=\"PRICEFILE.TXT\">download</a>";
?>

Well that is pretty much it.

I am currently working on getting the till / website to update each other in real time, however not sure how I can achieve this. I think DHPOS would have to send some command to an external program that can interface with the database for the online shop. This is were I am stuck! Anyone have any ideas?

mattwb65
Posts:2
Joined:Fri Aug 22, 2008 4:38 pm
Contact:

Re: DHPOS Stock Table - online

Post by mattwb65 » Fri Aug 22, 2008 6:22 pm

The Link you provided doesnt work for me Andrew.
Thanks,
Matthew

User avatar
Andrew
Site Administrator
Posts:822
Joined:Sun Dec 28, 2003 3:40 pm
Location:New Zealand

Re: DHPOS Stock Table - online

Post by Andrew » Fri Aug 22, 2008 7:45 pm

mattwb65 wrote:The Link you provided doesnt work for me Andrew.
Matthew, yep - because that was posted over two years ago...
Image
DHPOS Veteran (from v3.46, July 2002)

mattwb65
Posts:2
Joined:Fri Aug 22, 2008 4:38 pm
Contact:

Re: DHPOS Stock Table - online

Post by mattwb65 » Fri Aug 22, 2008 8:04 pm

Oops Sorry I wasnt paying A bit of attention to the date. Are you still working on it though?
Thanks,
Matthew

User avatar
Andrew
Site Administrator
Posts:822
Joined:Sun Dec 28, 2003 3:40 pm
Location:New Zealand

Re: DHPOS Stock Table - online

Post by Andrew » Fri Aug 22, 2008 8:57 pm

mattwb65 wrote:Oops Sorry I wasnt paying A bit of attention to the date. Are you still working on it though?
I'm afraid not - I don't even have the source code (which was dreadful anyway) anymore.
Image
DHPOS Veteran (from v3.46, July 2002)

User avatar
peewee3ie
Forum Regular
Posts:225
Joined:Tue Jan 27, 2004 7:46 am
Location:Ireland
Contact:

Re: DHPOS Stock Table - online

Post by peewee3ie » Sat Aug 23, 2008 4:56 am

Hi Andrew,

I was just going to ask if you had the code for the web page that you done. :( because I was going to try bring some life in to this that it would run on any type of web server i.e. winodws or linux servers

I hope you meen your owe code and NOT Dales stock table :lol:
Tony McGuire
Ireland Support

User avatar
Andrew
Site Administrator
Posts:822
Joined:Sun Dec 28, 2003 3:40 pm
Location:New Zealand

Re: DHPOS Stock Table - online

Post by Andrew » Sat Aug 23, 2008 7:55 am

Heh, well it wouldn't be difficult for someone to rewrite. From memory, the application I wrote was classic ASP - but PHP would work just as well (and would be my current preference), all I did was write an application to transfer the stock table details (using Dale's file format information / QB code samples) into an Access database (SQL or MySQL could work of course, it was just easiest at the time) and write the ASP web pages to access that data. With a bit of time and effort, anyone could re-work this, and who knows - it may be possible to interface directly with the data files instead of having an application in the middle to transfer from DHPOS' files into a database for the website.
Image
DHPOS Veteran (from v3.46, July 2002)

Post Reply

Who is online

Users browsing this forum: No registered users and 215 guests