simon5968 Posted January 15, 2024 Posted January 15, 2024 (edited) Hi, below is the error I'm getting can someone help me plase? @Ivan Holbi console/app.log Date: 2024-01-15 09:15:01 IP: - Level: info Category: application Description: $_GET = [] $_POST = [] $_FILES = [] $_COOKIE = [] $_SERVER = [ 'MAILTO' => '' '_' => '/usr/local/bin/lsphp' 'LANG' => 'en_US.UTF-8' 'OLDPWD' => '/home/user_name' 'XDG_SESSION_ID' => '191687' 'USER' => 'user_name' 'PWD' => '/home/user_name/public_html' 'HOME' => '/home/user_name' 'SHELL' => '/bin/bash' 'SHLVL' => '1' 'LOGNAME' => 'user_name' 'DBUS_SESSION_BUS_ADDRESS' => 'unix:path=/run/user/1037/bus' 'XDG_RUNTIME_DIR' => '/run/user/1037' 'PATH' => '/usr/bin:/bin' 'PHP_SELF' => '' 'SCRIPT_NAME' => '' 'SCRIPT_FILENAME' => 'yii.php' 'PATH_TRANSLATED' => 'yii.php' 'DOCUMENT_ROOT' => '' 'REQUEST_TIME_FLOAT' => 1705310101.4622 'REQUEST_TIME' => 1705310101 'argv' => [ 0 => 'yii.php' 1 => 'events/auto-calc-price-by-supplier' 2 => '& ' ] 'argc' => 3 ] console/app.log Date: 2024-01-15 09:15:01 IP: - Level: error Category: yii\console\UnknownCommandException Description: yii\base\InvalidRouteException: Unable to resolve the request: events/auto-calc-price-by-supplier in /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Controller.php:149 Stack trace: #0 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('auto-calc-price...', Array) #1 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('auto-calc-price...', Array) #2 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('events/auto-cal...', Array) #3 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('events/auto-cal...', Array) #4 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request)) #5 /home/user_name/public_html/yii.php(27): yii\base\Application->run() #6 {main} Next yii\console\UnknownCommandException: Unknown command "events/auto-calc-price-by-supplier". in /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php:183 Stack trace: #0 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('events/auto-cal...', Array) #1 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request)) #2 /home/user_name/public_html/yii.php(27): yii\base\Application->run() #3 {main} console/app.log Date: 2024-01-15 09:15:01 IP: - Level: info Category: application Description: php: 7.4.33 db_server: localhost db_version: MySQL 5.5.5-10.6.16-MariaDB-cll-lve osCommerce version: osCommerce 4.13.60075 osCommerce revision: 60075 DEFAULT_LANGUAGE: en DEFAULT_CURRENCY: GBP $_GET = [] $_POST = [] $_FILES = [] $_COOKIE = [] $_SERVER = [ 'MAILTO' => '' '_' => '/usr/local/bin/lsphp' 'LANG' => 'en_US.UTF-8' 'OLDPWD' => '/home/user_name' 'XDG_SESSION_ID' => '191687' 'USER' => 'user_name' 'PWD' => '/home/user_name/public_html' 'HOME' => '/home/user_name' 'SHELL' => '/bin/bash' 'SHLVL' => '1' 'LOGNAME' => 'user_name' 'DBUS_SESSION_BUS_ADDRESS' => 'unix:path=/run/user/1037/bus' 'XDG_RUNTIME_DIR' => '/run/user/1037' 'PATH' => '/usr/bin:/bin' 'PHP_SELF' => '' 'SCRIPT_NAME' => '' 'SCRIPT_FILENAME' => 'yii.php' 'PATH_TRANSLATED' => 'yii.php' 'DOCUMENT_ROOT' => '' 'REQUEST_TIME_FLOAT' => 1705310101.4622 'REQUEST_TIME' => 1705310101 'argv' => [ 0 => 'yii.php' 1 => 'events/auto-calc-price-by-supplier' 2 => '& ' ] 'argc' => 3 ] console/app.log Date: 2024-01-15 09:15:01 IP: - Level: error Category: yii\console\UnknownCommandException Description: yii\base\InvalidRouteException: Unable to resolve the request: events/auto-calc-price-by-supplier in /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Controller.php:149 Stack trace: #0 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('auto-calc-price...', Array) #1 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('auto-calc-price...', Array) #2 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('events/auto-cal...', Array) #3 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('events/auto-cal...', Array) #4 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request)) #5 /home/user_name/public_html/yii.php(27): yii\base\Application->run() #6 {main} Next yii\console\UnknownCommandException: Unknown command "events/auto-calc-price-by-supplier". in /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php:183 Stack trace: #0 /home/user_name/public_html/lib/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('events/auto-cal...', Array) #1 /home/user_name/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request)) #2 /home/user_name/public_html/yii.php(27): yii\base\Application->run() #3 {main} Edited January 15, 2024 by simon5968 Quote
simon5968 Posted January 15, 2024 Author Posted January 15, 2024 when i use start button to the left to run it I get this: Quote Calculate products prices #!/usr/bin/env php Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/user_name/public_html/includes/application_top_console.php on line 15 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/user_name/public_html/includes/application_top_console.php on line 16 Warning: session_cache_limiter(): Cannot change cache limiter when headers already sent in /home/user_name/public_html/includes/application_top_console.php on line 17 Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /home/user_name/public_html/includes/functions/sessions.php on line 90 Warning: session_name(): Cannot change session name when headers already sent in /home/user_name/public_html/includes/functions/sessions.php on line 160 Warning: session_save_path(): Cannot change save path when headers already sent in /home/user_name/public_html/includes/functions/sessions.php on line 176 Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in /home/user_name/public_html/includes/application_top_console.php on line 167 Unknown command: events/auto-calc-price-by-supplier @Ivan Holbi Quote
pandrei Posted January 15, 2024 Posted January 15, 2024 1 hour ago, simon5968 said: below is the error I'm getting can someone help me plase? Please edit this job, then turn on the Expert mode and change a command in arguments: Quote
simon5968 Posted January 15, 2024 Author Posted January 15, 2024 OK I.ve done that and thank you for spotting that. now my possable problem is, I have LISTING 6341 active 9322 in total will this do all of them Batch by Batch (of 1000) without needing to be run again or will it do one Batch of 1000 each time it runs knowing which products it has done? Quote
simon5968 Posted January 15, 2024 Author Posted January 15, 2024 now I'm getting a message as follows on all the first 1000 : Quote console/supplier.log Date: 2024-01-15 12:10:03IP: -Level: infoCategory: suppliers/auto-update-priceDescription: Autoupdate price for product #451: #Canceled - supplier price is empty but this is not correct please see attached: all of my products I spent one full day making sure each had a Quote
simon5968 Posted January 15, 2024 Author Posted January 15, 2024 @Ivan Holbi @pandrei I not sure what's happing with this as the screenshots show all my products have a cost / net price / supplier price and RRP price the only thing they do not have at time of uploading is the retail price set as this is workedout on Price based on cost (supplier) on Supplier rule ((PRICE-DISCOUNT+0.75)+MARGIN)+SURCHARGE, so as i can see all my uplaods are corect. given I have 9000+ products with 25000 images and all product have the correct images. Quote
pandrei Posted January 19, 2024 Posted January 19, 2024 On 1/15/2024 at 2:08 PM, simon5968 said: now my possable problem is, I have LISTING 6341 active 9322 in total will this do all of them Batch by Batch (of 1000) without needing to be run again or will it do one Batch of 1000 each time it runs knowing which products it has done? Once the price of a product is calculated, it is considered calculated. A new calculation will start if you import suppliers for this product again. On 1/15/2024 at 3:11 PM, simon5968 said: I not sure what's happing with this as the screenshots show all my products have a cost / net price / supplier price and RRP price the only thing they do not have at time of uploading is the retail price set as this is workedout on Price based on cost (supplier) on Supplier rule ((PRICE-DISCOUNT+0.75)+MARGIN)+SURCHARGE, so as i can see all my uplaods are corect. given I have 9000+ products with 25000 images and all product have the correct images. I see what you want. What happens if you open and save product #451? When you open it after saving, does the price change after auto calculation? Also, in the last screenshot I see that you have the same problem that I answered you about earlier in this thread: Quote
simon5968 Posted January 19, 2024 Author Posted January 19, 2024 3 hours ago, pandrei said: I see what you want. What happens if you open and save product #451? When you open it after saving, does the price change after auto calculation? yes. So the question is why is the cron job saying "supplier price is empty" what table column is it looking at? 3 hours ago, pandrei said: Also, in the last screenshot I see that you have the same problem that I answered you about earlier in this thread: I know I did not mean to upload it. Quote
simon5968 Posted January 23, 2024 Author Posted January 23, 2024 On 1/19/2024 at 4:02 PM, simon5968 said: So the question is why is the cron job saying "supplier price is empty" what table column is it looking at? @Ivan Holbi @pandrei i need this to work please? Quote
pandrei Posted January 23, 2024 Posted January 23, 2024 1 hour ago, simon5968 said: i need this to work please? Could you send me an access to your admin panel? Quote
pandrei Posted January 23, 2024 Posted January 23, 2024 Thank you for the access. There were two problems: 1. Empty path to php. So, the CronScheduler did not work. I set 'php' - it works for your case: 2. Suppliers, Categories and Brands should have default rule (for any currencies). I fixed it for supplier: Now it works: Quote
simon5968 Posted January 23, 2024 Author Posted January 23, 2024 Is there a way I can have the corn to run at say 2:30am each day and for the corn-job to auto loop all the products instead of having to have the corn job set to run every x minutes? Quote
pandrei Posted January 24, 2024 Posted January 24, 2024 12 hours ago, simon5968 said: Is there a way I can have the corn to run at say 2:30am each day and for the corn-job to auto loop all the products instead of having to have the corn job set to run every x minutes? Yes it is possible. You can change the timing of a cron job by editing the cron job. But to change the package size you will have to edit the php files. What's the problem with starting every x minutes? If the job determines that all prices are set and there is nothing to do, then it takes microseconds. Quote
simon5968 Posted January 24, 2024 Author Posted January 24, 2024 I will be codeing a script to go to my suppliers site and get a list of there productes and there stock level and cost each day around 2:30am as the supplier updates there details at 2:15am each day. so the cron running every 5 minutes is just a wast until 2:30am when it only needs to be run between a set time each day. Quote
pandrei Posted January 25, 2024 Posted January 25, 2024 15 hours ago, simon5968 said: I will be codeing a script to go to my suppliers site and get a list of there productes and there stock level and cost each day around 2:30am as the supplier updates there details at 2:15am each day. so the cron running every 5 minutes is just a wast until 2:30am when it only needs to be run between a set time each day. I see. As I said, you can change the timing of a cron job by editing the cron job. To set the batch size, you should edit lib/console/controllers/EventsController.php:288 public function actionAutoCalcProductPriceBySupplier() { \common\helpers\PriceFormula::batchProductAutoCalcPriceBySupplier(/* batch size */10000, /* time limit in millisec*/ 10000 ); } Quote
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.
Note: Your post will require moderator approval before it will be visible.