Jump to content
Latest News: (loading..)
jcall

OllaCart Point of Sale for osCommerce - ocPOS

Recommended Posts

Support thread for OllaCart Point of Sale (ocPOS) for osCommerce

Easy to use, no changes needed to osCommerce files, no database editing needed. Uses osCommerce database natively, so there is no need to worry about regular customers/products/order synchronization. It's all in the same database. Updates done in either ocPOS or osCommerce are instantly visible in both ocPOS and osCommerce.

Installer takes care of needed database changes, files are completely separate.

Formerly commercial, now GPL.

The known issues/bugs are documented in README.txt

As-is. No developer support available at this time. I may or may not have time, so please don't get upset if I don't answer promptly (or at all).

Attribute support, including a mode for QT Pro.

 

I am not the original developer. I purchased full rights to this several years ago, and have been developing it off and on since. It is now being opened fuly to the community.

 

Download: http://addons.oscommerce.com/info/9320.

Edited by jcall

Share this post


Link to post
Share on other sites

uploaded v2.5, with support for PHP 5.4. removed functions deprecated post PHP 5.2.

NOTE: This version uses functions deprecated as of PHP 5.5, mostly mysql vs mysqli stuff.

See README.txt and CHANGES.txt for additional detail.

 

Share this post


Link to post
Share on other sites

Hi, are you able to help me fix this. Cheers

 

Warning: Cannot modify header information - headers already sent by (output started at /home/psytradi/public_html/oscom/includes/custom_header.php:9) in /home/psytradi/public_html/oscom/login.php on line 18

Share this post


Link to post
Share on other sites

Hi, are you able to help me fix this. Cheers

 

Warning: Cannot modify header information - headers already sent by (output started at /home/psytradi/public_html/oscom/includes/custom_header.php:9) in /home/psytradi/public_html/oscom/login.php on line 18

<?php

// login.php

 

 

include("includes/db.php");

include("includes/functions.php");

include("includes/session.php");

 

LoadLangFiles($lang);

include("includes/custom_header.php");

 

 

/**

 * User has already logged in, so display relavent links, including

 * a link to the admin center if the user is an administrator.

 */

if($session->logged_in) {

   header('Location: index.php');

} else {

 

?>

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

   <title><?php echo($POSName) . ': ' . TITLE; ?></title>

   <link rel="Stylesheet" href="css/style.css">

</head>

<body onload="document.Login.user.focus()";>

 

<?php /* include("includes/header.php");  */?>

 

<?php

/**

 * User not logged in, display the login form.

 * If user has already tried to login, but errors were

 * found, display the total number of errors.

 * If errors occurred, they will be displayed.

 */

?>

<form action="process.php" method="POST" name=Login>

<center><br><br>

<table align="middle" border="1" cellspacing="0" cellpadding="3" width="500px">

    <tr><td class="tdBlue" align="middle">

    <h1><?php echo LOGIN; ?></h1>

<?php if($form->num_errors > 0) echo('Login Error.  Please try again.'); ?>

    </td></tr>

    <tr height="150px"><td width="50%" align="middle">

        Username:<input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>" onkeydown="if (event.keyCode == 13) document.Login.submit();">

        <br><br>

        Password:<input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>" onkeydown="if (event.keyCode == 13) document.Login.submit();">

        <br><br>

        <?php  echo $form->error("user"); ?>

        <br>

        <?php echo $form->error("pass"); ?>

        <br><br>

<?php

/* <tr><td colspan="2" align="left"><input type="checkbox" name="remember" <?php  if($form->value("remember") != ""){ echo "checked"; } ?>>

<font size="2">Remember me next time     

*/

?>

        <input type="hidden" name="sublogin" value="1">

        <a class="button" title="<?php echo LOGIN; ?>" href="#"  onclick="this.blur(); document.Login.submit();"><span><?php echo LOGIN_BUTTON_TEXT; ?></span></a>

        <font size="2">  <a href="forgotpass.php"><?php echo FORGOT_PASSWORD; ?></a></font>

    </td></tr>

</table>

</form>

 

<?php

}

?>

 

 

<?php include("includes/footer.php"); ?>

</body>

</html>

 

Share this post


Link to post
Share on other sites

I tried clearing cookies with no luck BUT I found the following in another forum....

 

"

try placing this at the top of your page:
<? ob_start(); ?>

then at the bottom of the page place this line of code:

<? ob_flush(); ?>

"

 

I don't have a clue about what that does but it seems to have fixed the problem. :)

Edited by paoraosc

Share this post


Link to post
Share on other sites

No, it has merely hidden the problem. For now.

 

As it says in the error message, the problem is on line 9 of /includes/custom_header.php. Something there is outputting to the browser too early, perhaps an error message. Show us the first 15 lines of that file if you can't find it.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

<?php
// includes/custom_header.php

/* This file is designed for your store logo or whatever else you'd like at the top of the POS page.
   This is your custom POS header file.
*/
?>
<table cellspacing="2" width="100%"><tr>
    <td width="80%" align="left"><a href="index.php"><img src="images/<?php echo APPLICATION_LOGO_IMAGE; ?>" height=62px alt="OllaCart Point of Sale" title="OllaCart Point of Sale" border="0"></a></td>
    <td align="right">
<?php
    if (!strstr($_SERVER["PHP_SELF"], 'login.php') && !strstr($_SERVER["PHP_SELF"], 'forgotpass.php')) {

        if($session->logged_in) {
            echo '<b>' . LOGGED_IN_AS . '  ' . $session->username . '</b><br>';
            echo  '<a href="useredit.php">  ' . USER_PANEL . '</a>  ';
               if($session->isAdmin()) {
                    echo  '<a href="admin/admin.php">  ' . ADMIN_PANEL . '</a>  ';
                }
 

Share this post


Link to post
Share on other sites

Assuming you just posted the contents of includes/custom_header.php the line 

include("includes/custom_header.php");

is too high in the file, it should be lower down:

<?php /* include("includes/header.php");  */
  include("includes/custom_header.php"); ?>


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
<?php 
// includes/custom_header.php

/* This file is designed for your store logo or whatever else you'd like at the top of the POS page.
   This is your custom POS header file.
*/
?>
<table cellspacing="2" width="100%"><tr>
    <td width="80%" align="left"><a href="index.php"><img src="images/<?php echo APPLICATION_LOGO_IMAGE; ?>" height=62px alt="OllaCart Point of Sale" title="OllaCart Point of Sale" border="0"></a></td>
    <td align="right">
<?php
    if (!strstr($_SERVER["PHP_SELF"], 'login.php') && !strstr($_SERVER["PHP_SELF"], 'forgotpass.php')) {

        if($session->logged_in) {
            echo '<b>' . LOGGED_IN_AS . '  ' . $session->username . '</b><br>';
            echo  '<a href="useredit.php">  ' . USER_PANEL . '</a>  ';
               if($session->isAdmin()) {
                    echo  '<a href="admin/admin.php">  ' . ADMIN_PANEL . '</a>  ';
                }
                echo '<a href="process.php">  ' . LOGOUT . '</a>  ';
                } else {
            echo '<a href="login.php">  ' . LOGIN . '</a>  ';
        }
    }
?>
    </td>
</tr></table>


<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
<tr><td style="background-color: #606060;" width="100%" height="1"></td></tr>
</table>

Posted above is the entire file named /includes/custom_header.php

Line 2 is just the name of the file and should remain commented out. The whole purpose of this file was to give the user a way to put his store or operation name in the header, therefore it's displayed on every page in Olla cart. The original propriatory header was not accessable (edit-able) to the end user.

Share this post


Link to post
Share on other sites

@@paoraosc You're right Parora. There is problem here that nobody has figured out yet. I downloaded and installed this and I'm getting similar results to yours.

~Motorcity

Share this post


Link to post
Share on other sites

Starting at

<table cellspacing="2" width="100%"><tr>

you're outputting HTML to the browser. This file is apparently being called too early in osC, before the rest of osC has finished outputting HTTP headers. Thus, the error message. You've got to move the inclusion of this file to somewhere later in osC. Not knowing how all the pieces of this addition interact, I can't tell you any more than that.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

This post gives you the solution to the problem.

 

Regards

Jim

 

Except that I wasn't very clear. The problem is in the edit you made to login.php - that's where you need to apply my advice.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

It appears the problem has to do with logging in or being logged in.

The install writes several new database tables including pos_users. Go there and change the email address to your email address then click on the forgotpass utility, get a new password, and that seems to clear the whole problem.

I could have missed (skipped), some steps in the install process so if anyone else is trying this please report your results here.

Share this post


Link to post
Share on other sites

@@paoraosc before you change anything else, replace the first file you posted (either login.php or another file based on it) with this:

<?php
// login.php

include("includes/db.php");
include("includes/functions.php");
include("includes/session.php");

LoadLangFiles($lang);

/**
 * User has already logged in, so display relavent links, including
 * a link to the admin center if the user is an administrator.
 */
if($session->logged_in) {
   header('Location: index.php');
} else {

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
   <title><?php echo($POSName) . ': ' . TITLE; ?></title>
   <link rel="Stylesheet" href="css/style.css">
</head>
<body onload="document.Login.user.focus()";>

<?php /* include("includes/header.php"); */
include("includes/custom_header.php");?>

<?php
/**
 * User not logged in, display the login form.
 * If user has already tried to login, but errors were
 * found, display the total number of errors.
 * If errors occurred, they will be displayed.
 */
?>
<form action="process.php" method="POST" name=Login>
<center><br><br>
<table align="middle" border="1" cellspacing="0" cellpadding="3" width="500px">
    <tr><td class="tdBlue" align="middle">
    <h1><?php echo LOGIN; ?></h1>
<?php if($form->num_errors > 0) echo('Login Error.  Please try again.'); ?>
    </td></tr>
    <tr height="150px"><td width="50%" align="middle">
        Username:<input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>" onkeydown="if (event.keyCode == 13) document.Login.submit();">
        <br><br>
        Password:<input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>" onkeydown="if (event.keyCode == 13) document.Login.submit();">
        <br><br>
        <?php  echo $form->error("user"); ?>
        <br>
        <?php echo $form->error("pass"); ?>
        <br><br>
<?php
/* <tr><td colspan="2" align="left"><input type="checkbox" name="remember" <?php  if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Remember me next time     
*/
?>
        <input type="hidden" name="sublogin" value="1">
        <a class="button" title="<?php echo LOGIN; ?>" href="#"  onclick="this.blur(); document.Login.submit();"><span><?php echo LOGIN_BUTTON_TEXT; ?></span></a>
        <font size="2">  <a href="forgotpass.php"><?php echo FORGOT_PASSWORD; ?></a></font>
    </td></tr>
</table>
</form>

<?php
}
?>


<?php include("includes/footer.php"); ?>
</body>
</html>

I can't guarantee you have no other problems, but this will clear the one you posted. 

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Hey John, Jim, what you posted does fix the problem however the same "headers already sent...." follow the user around if they don't log in.

index.php header.php custom_header.php and login.php have the same basic problem unless you login.

Considering what this contribution is supposed to do (allow in-store sales from your oscommerce database), it makes little sense to operate without being logged in. 

Share this post


Link to post
Share on other sites

@@motorcity  True, but the code should not throw a PHP error if you forget to log in. A polite reminder message would be nice though.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hey John, Jim, what you posted does fix the problem however the same "headers already sent...." follow the user around if they don't log in.

index.php header.php custom_header.php and login.php have the same basic problem unless you login.

Considering what this contribution is supposed to do (allow in-store sales from your oscommerce database), it makes little sense to operate without being logged in. 

 

Joe, you've got a mixture of page files and include files in that list. The change I gave will eliminate one source of 'headers already sent' errors but it may not be the only place they're coming from.

 

The error arises when a php file has already sent some output and then the page headers are sent.

 

This can happen if you include a file in the wrong place, as we've been discussing. It can also happen if there's an extra space or lines at the end of a file that's included, like this

?>


There may well be other problems like this in the code editing that's been done.

 

In fact there's one in the code that I copied and posted back, because there are blank lines before the head of the html page:

if($session->logged_in) {
   header('Location: index.php');
} else {

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

should be

if($session->logged_in) {
   header('Location: index.php');
} else {

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

Whenever you get this error, it does tell  you in which file the headers were already sent, so you just need to check:

- if it's a file that's supposed to output html, it must have been included too early

- if it's just supposed to be code, it may have spaces, new lines or invisible characters at the end. You can get rid of this problem by omitting the closing ?> altogether

- sometimes people leave debugging "echo"s in their code by mistake, so search a code file for these if you've already checked the above


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@kymation My guess is that Jared (jcall) didn't have all that much time to set this up as a free contribution and then test it much. Keep in mind I didn't post this contrib and I'm not using this code. I am a long time user of a prior version however and I'm hoping to help support this effort where I can.

There's a few things that could be done differently including as you said, "A polite reminder message would be nice".

Also maybe an install instruction at least, or make the default email addy the same as the store email.

@@BrockleyJohn Thanks alot for your help John. I came across some white space as well.

Hopefully I'll have some time to go over some of this and make changes where needed so it's a better product for those who are interested.

~Motorcity

Share this post


Link to post
Share on other sites

@@motorcity: Thank you for the kind words and support. You're a good friend.

 

@everyone_else: 2.1 is the "stable" version. 2.5 is in use in a few shops, but has more warts (and more features). I am neither an accomplished nor professional PHP developer, as you can likely see in the product. It's more than just a few lines here and there, and I've put many many hours of work into it, but 2.5 isn't as polished as I'd like, as you can plainly see by perusing README.txt.

 

There is even an alternate layout (look at in index.html and NEW_LAYOUT_index.php) that I was working on, but didn't finish (theme?).

 

I may or may not be successful finding time to help out, make fixes, etc.  I am nearly certain that I won't have time for enhancements, but time may tell us all otherwise.

 

ocPOS was a huge help for my wife's shop years ago and has made a big difference for others. I hope it is useful for you.

 

 

 

-jared

Share this post


Link to post
Share on other sites

Hey Jared, good to see you.

I did load up the new files and I'd say they look pretty jazzy. (That's good in my book!) Like I said I'll try to help here where I can. Like you, I'm coming up on a huge change in my activities profession-wise and the future is somewhat unknown right now. Best of luck in all you do. Move forward. Relentlessly positive.

~Motorcity

Share this post


Link to post
Share on other sites

I've had a play with this and it seems to work OK, I really didn't like the 90s style design so I've been making it responsive with Bootstrap. That way we can use it in store on a tablet too while we are walking around helping customers. Feel free to have a look.

 

https://github.com/frankludriks/ocPOS25-Responsive

 

Image - http://tonerpak.com.au/ocpos-responsive.png


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

I like the look and flexibility of that new layout. Nice!

Edited by jcall

Share this post


Link to post
Share on other sites

I'm trying to update email template for email sent out from POS order create. I'm having hard time to finding file or location of file that require change. Currently when order processing in ollaCart POS it's send email confirmation to email assigned to customer.

 

Did anyone know how to change email template for email sent out for POS order confirmation?

 

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×