peterp Posted August 14 Share Posted August 14 Hi All, I may not have setup a product correctly to achieve my requirement. The requirement is that this product comes in with different options of size and color and some sizes are priced differently than others. So I set up the product with a unit price of $11.30 including 10% GST and for 3 special sizes I set the price to be $12.60 including 10% GST and ticked the absolute box for these 3 special sizes. Unfortunately the unit price on the order doesn't reflect the correct price for the 3 special sizes but is OK for the the other sizes. So have I missed something within the setup of these special sizes and I shouldn't or should be setting up. All items in the inventory have a standard tax of 10% and this will include any special prices will have a 10% tax as well. Hope somebody can point me in the right direct to resolve this issue. I have attached a couple of screen shots that maybe helpful as to how I have setup the product. Thanks for your help very much appreciated. Best Regards, Peterp product price options.pdf champco order unit prices.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 14 Share Posted August 14 Could you please read these issues in the Github and determine if anything might apply? Bad tax calculation with absolute option price and tax inc https://github.com/cubecart/v6/issues/3301 Applied to CC652 (not yet released) Product Options - Bugs with mixture of absolute / non absolute option value https://github.com/cubecart/v6/issues/2566 Applied to CC640-b1 Quote Link to comment Share on other sites More sharing options...
peterp Posted August 14 Author Share Posted August 14 HI Brian, I will give them a try tomorrow but it looks like the first one might fix my problem. Thanks again for you fast response. Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
peterp Posted August 19 Author Share Posted August 19 Hi Brian, I have tried the first fix and this fixed the problem of the tax calculation however when I tried the second fix I noticed that the line numbers were different, however I still applied the fixes. Now what seems to be happening is that when I go to the second secure checkout button press I get a blank screen, I'm not sure whether this changes have caused this or something else has happened. If you could suggest something to get the site to display the order as it was would be great. I have attached the error log if this is any help Hope you can help Best Regards, Peterp errorlog order display.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 19 Share Posted August 19 The 'errorlog order display" file shows only that a code snippet caused PHP to complain about a "token" that probably was not provided, which somehow triggered a need to log in to admin. Please remind us the exact version of PHP and CubeCart this installation is running (regardless that your "tag line" says CC614). Quote Link to comment Share on other sites More sharing options...
peterp Posted August 21 Author Share Posted August 21 Hi Brian, Thanks for your help I have attached a screen shot of the 'Store Overview' which shows version numbers for both the PHP and cubecart. We are using a localhost at this stage as the site is under development and not ready for live implementation. Hope this helps Best Regards, Peterp cubecart and php version.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 21 Share Posted August 21 You said, "When I tried the second fix I noticed that the line numbers were different, however I still applied the fixes." Note that the second mentioned issue in the Github (#2566) had already been applied in CC640. Your screen grab above shows you are running CC651 - so that edit was not applicable. If those "fixes" you made are still in this installation, at the wrong line numbers, you will need to remove them. Quote Link to comment Share on other sites More sharing options...
peterp Posted August 21 Author Share Posted August 21 Hi Brian, I reversed all of the modifications that were done and compared it to an unchanged cc651 just to satisfy me that all the changes were successful (and they were) unfortunately when I then tested the site and got to the final checkout selection all I got was a black screen again. I have attached a screen shot of the error log hoping this may help. Hope this helps, Best Regards, Peterp error log after reverse changes.pdf Hi Brian, I just went into the admin and tried to print the order and just got the blank screen again maybe this has something to do with this as well Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 21 Share Posted August 21 Something is throwing an "exception", and maybe CC651 is not getting it logged into the database. Please make this edit in /classes/debug.class.php: Near line 500, find: public function exceptionHandler($e) { $message = "[<strong>Exception</strong>] \t".$e->getFile().":".$e->getLine()." - ".$e->getMessage(); $this->_errors[] = $message; $this->_writeErrorLog($message, 'Exception'); } Change to: public function exceptionHandler($e) { $message = "[<strong>Exception</strong>] \t".$e->getFile().":".$e->getLine()." - ".$e->getMessage(); trigger_error($message,E_USER_ERROR); // $this->_errors[] = $message; // $this->_writeErrorLog($message, 'Exception'); } Near line 480, find: $this->_errors[] = $error; Change to: $error = (stristr($error_string, "[<strong>Exception</strong>]")) ?: $error; $this->_errors[] = $error; When you get the blank screen, maybe now there will be the reason for it in the System Error Log. Also, one of the errors in the above post suggests that you do not have a complete /classes/PHPMailer/ folder. Also, please consider using PHP 8.1 when running CC651. Quote Link to comment Share on other sites More sharing options...
peterp Posted August 21 Author Share Posted August 21 Hi Brian, I have done these changes and run the order entry again. I have attached the error log Hope this helps Best Regards, Peterp error log champco.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 21 Share Posted August 21 No, nothing new here. Again, one of the errors in the above post suggests that you do not have a complete /classes/PHPMailer/ folder. Quote Link to comment Share on other sites More sharing options...
peterp Posted August 22 Author Share Posted August 22 Hi Brian, I have checked and the PHPMailer folder is not there so is it just a matter of copying the folder from a clean version of cubecart ver 651 or from a backup of this site or do I have to start from the beginning again. I would have thought the update would have copied this across. Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 22 Share Posted August 22 (edited) Yet, it is just a matter of copying the folder from the CC651 package. Edited August 22 by bsmither Quote Link to comment Share on other sites More sharing options...
peterp Posted August 25 Author Share Posted August 25 Hi Brian, Sorry about the delayed response, I've been sick for the last few days with the flu. This worked and seems to be ok so thanks for your help. However I took your advice and have upgraded to php 8.1 but now what has happened is I get a blank screen at admin and the store front. I looked into the cubecart_system_error_log but I cannot see anything that makes sense to me that could be wrong, I have attached a screen shot. Hope you can help Best Regards, Peterp blank screen.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 25 Share Posted August 25 I am not finding handleError() in CubeCart's code. As for the screenshot, please make the columns wider so that we can see the entire contents. The contents in the 'backtrace' column may need to be shown in a viewer of some sort, as the contents may be lengthy. If you have any plugins, you may need to inhibit those until you can determine if any have a problem with PHP 8.1. Instructions on how to do that are in the file /includes/global.inc.php. Quote Link to comment Share on other sites More sharing options...
peterp Posted August 26 Author Share Posted August 26 Hi Brian, I have looked in the /includes/global.inc.php for the instructions on how to inhibit the plugins but unfortunately I cannot see any instructions. Should I change the site back to using php 7.4 and check the plugins for their compatibility with php 8.1 Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
peterp Posted August 26 Author Share Posted August 26 Hi Brian, I have tried to make the screen shots have larger columns any how I think it is possibly a shipping module that is having the problem what do you think. I have to send 2 messages as screen shots go over total size. Best Regards, Peterp Hi Brian, Message 2 blank screen 2.pdf Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 26 Share Posted August 26 If you have the file /includes/global.inc.php-dist, it should have this statement, and others, as an example to use in the actual file /includes/global.inc.php: $glob['safe_mode'] = false; // Set to true to disable hooks and code snippets, 'hooks' to disable code hooks and 'snippets' to disable code snippets I would suggest not providing screen shots, but rather, in phpMyAdmin, click the Copy link of a row, and then paste what was copied into the forum's code edit window (use the <> toolbar button). Do that for several rows. Quote Link to comment Share on other sites More sharing options...
peterp Posted August 26 Author Share Posted August 26 High Brian, I'm not sure that is what you want but I have highlight 3 lines File: [controller.index.inc.php] Line: [28] "SET @@time_zone = 'Australia/Melbourne'" - Unknown or incorrect time zone: 'Australia/Melbourne' [<strong>Notice</strong>] C:xampphtdocschampcoclothingtestnewcacheskin7da4d98ec83af1522d93ff5e6afe4e8390b02f2f_0.file.box.newsletter.php.php:25 - Undefined index: DISABLE_BOX_NEWSLETTER https://localhost/champcotesting/images/source/bisley_workwear_by_pip_logo.jpg handleError() (7da4d98ec83af1522d93ff5e6afe4e8390b02f2f_0.file.box.newsletter.php.php:25) content_64df13b502e0f9_71031783() (smarty_template_resource_base.php:123) getRenderedTemplateCode() (smarty_template_compiled.php:114) render() (smarty_internal_template.php:217) render() (smarty_internal_templatebase.php:238) _execute() (smarty_internal_templatebase.php:116) fetch() (gui.class.php:1167) _displayMailingList() (gui.class.php:367) [<strong>Notice</strong>] C:xampphtdocschampcoclothingtestnewcacheskinaf3fd85bdd9a602009daa35e9100595db374d12c_0.file.login.php.php:90 - Undefined index: USERNAME https://localhost/champcoclothingtestnew/admin_ZlX9zy.php handleError() (af3fd85bdd9a602009daa35e9100595db374d12c_0.file.login.php.php:90) content_64e07010219076_17054137() (smarty_template_resource_base.php:123) getRenderedTemplateCode() (smarty_template_compiled.php:114) render() (smarty_internal_template.php:217) render() (smarty_internal_templatebase.php:238) _execute() (smarty_internal_templatebase.php:116) fetch() (gui.class.php:342) display() (admin_ZlX9zy.php:44) [<strong>Notice</strong>] C:xampphtdocschampcoclothingtestnewcacheskinaf3fd85bdd9a602009daa35e9100595db374d12c_0.file.login.php.php:90 - Trying to get property 'value' of non-object https://localhost/champcoclothingtestnew/admin_ZlX9zy.php handleError() (af3fd85bdd9a602009daa35e9100595db374d12c_0.file.login.php.php:90) content_64e07010219076_17054137() (smarty_template_resource_base.php:123) getRenderedTemplateCode() (smarty_template_compiled.php:114) render() (smarty_internal_template.php:217) render() (smarty_internal_templatebase.php:238) _execute() (smarty_internal_templatebase.php:116) fetch() (gui.class.php:342) display() (admin_ZlX9zy.php:44) hope this helps I have also put in a lines $glob['hooks'] = true; $glob['snippets'] = true; into global.inc.php.dist is this correct Totally confused now Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 26 Share Posted August 26 In the file /includes/global.inc.php: This file may be set as 'read-only'. If so, you will need to clear that setting so that it can be edited. Find the last line: ?> Above that, add this: $glob['safe_mode'] = true; // Set to true to disable hooks and code snippets This error: "Undefined index: DISABLE_BOX_NEWSLETTER" also shows the URL being requested -- an image file: https://localhost/champcotesting/images/source/bisley_workwear_by_pip_logo.jpg Does this image file actually exist? And if not, look in the .htaccess file to determine if there is a rule that is supposed to show the index page if any request results in a 404 Not Found. 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.