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

OllaCart Point of Sale for osCommerce - ocPOS

Recommended Posts

@@LeeFoster

 

http://forums.oscommerce.com/topic/407813-ollacart-point-of-sale-for-oscommerce-ocpos/?p=1737190

 

This error came up before for someone. Not sure how they resolved it.

 

Not sure if it will work for everyone but it appears that it wasn't pulling the database definitions from the db.php file to the functions_tables.php file so I just added them in to it.

Share this post


Link to post
Share on other sites

I am now getting a ? in black diamond instead of £. I have checked for the usual suspects but still not working. Any ideas?

Edited by LeeFoster

Share this post


Link to post
Share on other sites

Your pound currency symbol was entered as a single byte encoding (Latin-1 or CP-1252) into the database, but is being displayed as UTF-8 on the page, and thus is an invalid UTF-8 symbol. Is this a new setup? Was the database imported from an .sql file dump of another working database?


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

The page is being displayed in UTF-8 (which is normal practice), but the data (probably coming out of the database) is Latin-1 or CP-1252. Non-ASCII characters like a pound currency sign in a single-byte encoding are invalid UTF-8.


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

@@LeeFoster

 

Both use the same data, assuming you use the same database in Ollacart as you do in osCommerce.


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

Not sure if anyone still uses this, but I managed to find a few fixes that allows this to work, I'm using the following

Loaded Commerce CE v6.5.3.3, PHP v5.6.32
I've used OSC for a few years but recently changed to the Loaded Commerce version but as it's heavily coded from OSC anyway then the changes below should still apply.

The first issue is in the includes/db.php file

Line 133, change 

define('OSC_ATTRIBUTES_MODE','QTP');

to this

define('OSC_ATTRIBUTES_MODE','OSC');

Line 167 change

$DATABASE = mysql_connect

to

$DATABASE = @mysql_connect

Placing the @ in front of mysql_connect gets rid of the initial DB connect issues/error messages

In /includes/attributes.php change

$opt_sets = split(",",$stock_attribs);

to

$opt_sets = explode(",",$stock_attribs);

For me this has fixed all of the issues/errors I was getting that' been reported, hope this helps.

Share this post


Link to post
Share on other sites

@frankl  I think in this code I need to change something .. the code from functions.php


        // Calculate pre-tax total
        $this->SubTotal = $lineitem_total;

        // Apply discount
        if (isset($this->DiscountMethod)) {
            if ($this->DiscountMethod == 'absolute') { // normal discount
                if ($this->SubTotal != 0) {
                    $percentdiscount = ($this->DiscountValue / $this->SubTotal); // calculate the discount percentage so that we can correctly deduct from tax
                } else {
                    $percentdiscount = ($this->DiscountValue); // calculate the discount percentage so that we can correctly deduct from tax
                }
                $this->SubTotal = $this->SubTotal - $this->DiscountValue;  // take $x off the pre-tax total
                $this->Tax = $this->Tax - ($this->Tax * $percentdiscount);  // take x% off the tax
                $this->CalculatedPercentDiscount = $percentdiscount * 100;
            } else { // percentage discount
                $this->SubTotal = $this->SubTotal - ($this->SubTotal * ($this->DiscountValue * .01)); // take x% off the pre-tax total
                $this->Tax = $this->Tax - ($this->Tax * ($this->DiscountValue * .01));  // take x% off the tax
                $this->CalculatedPercentDiscount = $this->DiscountValue;
            }
        }
        $this->CalculatedPercentDiscount = abs($this->CalculatedPercentDiscount);

        // total = subtotal after pre-tax discounts, prior to fees
        $this->Total = $this->SubTotal;

        // Remove tax if exempt
        if ($this->TaxExempt) {
            $this->Tax = 0;
        }

        // Final order total
        //      $this->Total += $this->Tax;
        // subtotal only -- total + tax calculated at order insert time.
        $this->Total = $this->SubTotal + Tax;

 but I don't know what it's need to change there???

and how I can include the tax to product price?

Thank you
Joe
 

 

Share this post


Link to post
Share on other sites

@frankl  after the host update the php from 5.4 to 5.6.33. We had some issue with  osPOS. When I chose order reporting  or view more from History (drop menu) I get blank page.
Do you have any idea how to fix it?

BR
Omar

Share this post


Link to post
Share on other sites
On 7/22/2015 at 5:59 PM, jcall said:

That appears to be a bug in 2.5. I do not believe that 2.1 has that bug. I just haven't had the time to squash it in 2.5 yet.

 

I had thought that issue only appeared in OSC mode (as documented in README.txt). Apparently not. <sigh>

Hi, Jcall, 

Can still download 2.1 version?  Thanks in advanced. 

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

×