1. drees
  2. RO CSVI
  3. Friday, 13 September 2024
  4.  Subscribe via email
When I manually activate the export template, the output file "BOEKEN.csv" is complete with the sales price, and I do not receive any error messages.

However, when I activate the export template via a cron job, I get the error message "Undefined array key 'product_price'", and the output file "BOEKEN.txt" is missing the sales price.

If I change "Sales price" to "product price" in the template, I do not receive any error messages. However, the output file "BOEKEN.txt" then shows prices excluding VAT.

How can I execute the export via a cron job to get the same result as when starting it manually?
Accepted Answer Pending Moderation
Hello Drees,
The export code is same for manual and cron job. Are you using two different templates for manual and cron exports?

I get the error message "Undefined array key 'product_price'",

Can you post the whole error here? Would like to see where this error is coming from.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
c:\Webbestanden\BAT\Microcash>C:\xampp\php\php.exe C:\xampp\htdocs\Office\cli\joomla.php rocsvi:export --template_name=CSVMICROCASH --key=1235798


[INFO] Processing started...



[INFO] Template CSVMICROCASH


PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377
PHP Warning: Undefined property: TableProducts::$selectedPrice in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 302
PHP Warning: Undefined array key "product_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 375
PHP Warning: Undefined array key "override" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 376
PHP Warning: Undefined array key "product_override_price" in C:\xampp\htdocs\Office\administrator\components\com_virtuemart\helpers\calculationh.php on line 377

[INFO] The export file c:\Webbestanden\Microcash\In/BOEKEN.txt has been created
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
when is change salesprice in productprice its works but the price is inclusief btw



c:\Webbestanden\BAT\Microcash>C:\xampp\php\php.exe C:\xampp\htdocs\Office\cli\joomla.php rocsvi:export --template_name=CSVMICROCASH --key=1235798


[INFO] Processing started...



[INFO] Template CSVMICROCASH



[INFO] The export file c:\Webbestanden\Microcash\In/BOEKEN.txt has been created
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
The export code is same for manual and cron job. Are you using two different templates for manual and cron exports? No jus one.
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Drees,
I ran export manually and using cron on my test server to check salesprice value and don't see these warning messages and salesprice value is exported as expected. Please post import debug log of both manual and cron export to check. To get the debug log see How to collect debug information? document. Also tell me VirtueMart version you are using.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
VirtueMart 4.2.18 11050

PHP versie 8.1.25
Webserver Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.1.25
Webserver naar PHP interface apache2handler
Joomla! versie Joomla! 4.4.8 Stable [ Pamoja ] 27-August-2024 16:00 GMT
Gebruikersagent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,
Thank you for the debug logs. I found there is a difference in SQL queries getting price with cron and manual export. I am looking into the cause and will update on my findings.

Query with cron export

SELECT c.* FROM qxm18_virtuemart_calcs as c LEFT JOIN qxm18_virtuemart_calc_shoppergroups as cs ON cs.virtuemart_calc_id=c.virtuemart_calc_id WHERE `calc_kind` IN ('Marge','Tax','VatTax','DBTax','DATax' ) AND `published`="1" AND (`virtuemart_vendor_id`="1" OR `shared`="1" ) AND ( ( ISNULL(`publish_up`) or `publish_up`="0000-00-00 00:00:00") OR publish_up <= "2024-09-13 15:34:50" ) AND ( ( ISNULL(`publish_down`) or `publish_down`="0000-00-00 00:00:00") OR publish_down >= "2024-09-13 15:34:50" ) AND ( virtuemart_shoppergroup_id = 1 OR (virtuemart_shoppergroup_id) IS NULL) ORDER BY c.ordering


Query with Manual export

SELECT c.* FROM qxm18_virtuemart_calcs as c LEFT JOIN qxm18_virtuemart_calc_shoppergroups as cs ON cs.virtuemart_calc_id=c.virtuemart_calc_id LEFT JOIN qxm18_virtuemart_calc_countries as cc ON cc.virtuemart_calc_id=c.virtuemart_calc_id WHERE `calc_kind` IN ('Marge','Tax','VatTax','DBTax','DATax' ) AND `published`="1" AND (`virtuemart_vendor_id`="1" OR `shared`="1" ) AND ( ( ISNULL(`publish_up`) or `publish_up`="0000-00-00 00:00:00") OR publish_up <= "2024-09-13 15:32:32" ) AND ( ( ISNULL(`publish_down`) or `publish_down`="0000-00-00 00:00:00") OR publish_down >= "2024-09-13 15:32:32" ) AND ( virtuemart_shoppergroup_id = 2 OR (virtuemart_shoppergroup_id) IS NULL) AND ( virtuemart_country_id = "150" OR (virtuemart_country_id) IS NULL) ORDER BY c.ordering
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Drees,
Please post Joomla administrator login details and (S)FTP details to check. I am not able to reproduce the error in my local system though I know there is something going wrong with the query. Would like to see the setup you have for products so I can replicate in my local system and test the issue. You can post the details on Site Details tab under your reply.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Drees,
Thank you for sending me requested details. I think I found the cause for salesprice value not exported. With your VirtueMart data I found that you use Dutch language tables and have product details saved in nl_NL tables but in VirtueMatrt configuration in Language settings you do not have Dutch(nl_NL) language set. Since the Dutch language is not set there is no product slug and so VirtueMart returns slug empty error and no values for products and thus breaking the export. Please note we use VirtueMart files for generating prices in RO CSVI exports. So the solution is to change the language to Dutch in your language configuration in VirtueMart. See attached screenshot.

Also the warnings you see only with cron export. I was able to see those warnings with both Manual and cron exports and no salesprice in both the exports. Try the solution and let me know if it works for you.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!