LeeFoster Posted April 29, 2017 Share Posted April 29, 2017 I have no idea @@Dan Cole. I think it may be related to the PHP Version or the fact that I'm running this through xampp as local host. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 30, 2017 Share Posted April 30, 2017 @@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. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted May 1, 2017 Share Posted May 1, 2017 (edited) I am now getting a ? in black diamond instead of £. I have checked for the usual suspects but still not working. Any ideas? Edited May 1, 2017 by LeeFoster Quote Link to comment Share on other sites More sharing options...
♥frankl Posted May 2, 2017 Share Posted May 2, 2017 @@LeeFoster Which file? Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
LeeFoster Posted May 2, 2017 Share Posted May 2, 2017 On any page where there is a value. It appears to be the encoding but the pages, database and the meta are all setup the same. Quote Link to comment Share on other sites More sharing options...
♥frankl Posted May 2, 2017 Share Posted May 2, 2017 What encoding do you see on the pages when you view source? Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
MrPhil Posted May 2, 2017 Share Posted May 2, 2017 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? Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted May 2, 2017 Share Posted May 2, 2017 Viewing the source says utf-8 Quote Link to comment Share on other sites More sharing options...
MrPhil Posted May 2, 2017 Share Posted May 2, 2017 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. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted May 2, 2017 Share Posted May 2, 2017 But this isn't happening on the main site and they both use the same data don't they? I'll have a look tonight though Quote Link to comment Share on other sites More sharing options...
♥frankl Posted May 2, 2017 Share Posted May 2, 2017 @@LeeFoster Both use the same data, assuming you use the same database in Ollacart as you do in osCommerce. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
LeeFoster Posted May 4, 2017 Share Posted May 4, 2017 I thought as much. I've hard coded the currency symbol in for now and will revisit this at a later date. Quote Link to comment Share on other sites More sharing options...
Ribeena Posted December 2, 2017 Share Posted December 2, 2017 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. Quote Link to comment Share on other sites More sharing options...
joe122joe Posted December 5, 2017 Share Posted December 5, 2017 Hello @frankl! How to add the discount after tax? Thank you Joe Quote Link to comment Share on other sites More sharing options...
joe122joe Posted December 5, 2017 Share Posted December 5, 2017 @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 Quote Link to comment Share on other sites More sharing options...
Omar_one Posted March 7, 2018 Share Posted March 7, 2018 @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 Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
♥frankl Posted March 11, 2018 Share Posted March 11, 2018 @Omar_one I'm not sure. We run Ollacart on PHP 7.0 with no problems. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
yep2018 Posted July 10, 2018 Share Posted July 10, 2018 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. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted October 6, 2020 Share Posted October 6, 2020 Anyone using this with Phoenix? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.