Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OllaCart Point of Sale for osCommerce - ocPOS


Guest

Recommended Posts

@@LeeFoster

 

http://www.oscommerce.com/forums/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.

Link to comment
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?

Link to comment
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.

Link to comment
Share on other sites

  • 6 months later...

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.

Link to comment
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
 

 

Link to comment
Share on other sites

  • 3 months later...

@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

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

  • 3 months later...
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. 

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...