Hi,

I've created a commerce order view and its a domain specific. Actually I am sending this view in email to users weekly with automatic Cron run. But there is an issue with drupal auto cron run that it fails to display the commerce line item price fields in the view in auto Cron run and it is showing empty as result. If we run the Cron manually, the view displays all the fields properly with commerce line item price fields but not in auto cron run.

I have tried to load the view in admin session while running the cron, but it still fails to load the commerce line item price fields in the view.

Here is the code I've tried,

<?php
/* Implementing hook_cron() */
function test_reports_cron() {
global $user;
$original_user = $user;
drupal_save_session(FALSE);
$user = user_load(1);// admin session
$standardSales = views_embed_view('sales_orders','page');
watchdog('debug', '<pre>'. print_r($standardSales, TRUE) .'</pre>');
$user = $original_user;
drupal_save_session(TRUE);	
}
?>

Could you please any ideas on this.

Please find the attached screenshots

Regards,
Ramu

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ramu_bharu created an issue. See original summary.

ramu_bharu’s picture

Category: Bug report » Support request
MustangGB’s picture

Priority: Major » Normal
MustangGB’s picture

Status: Active » Closed (outdated)

Closing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.