Hello,

I'm using Drupal 5 and Views 5.x-1.6 for displaying products on some e-commence (Ubercart) site...
View theme files has been generated using Views' Theme Wizard (so I have rather standard views-list-products.tpl.php theme file and phptemplate_views_view_list_products function in template.php).

The point is that my view completely ignores "Use Pager" (checked) and "Nodes per page" (set to 10) settings.
All the time it flushes all of my products without a pager. When I try to debug it (using var_dump in phptemplate_views_view_list_products function in template.php) I got:

["use_pager"]=>
bool(false)
["nodes_per_page"]=>
string(1) "10"

So "use_pager" setting is ignored :/
In the same time I can see it set to TRUE in export of my view:

  $view = new stdClass();
  $view->name = 'products';
  $view->description = '';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '3';
  $view->page_footer = '';
  $view->page_footer_format = '3';
  $view->page_empty = '<p>Brak wynik&oacute;w dla wybranych kryteri&oacute;w wyszukiwania...</p>';
  $view->page_empty_format = '1';
  $view->page_type = 'list';
  $view->url = 'taxonomy/term';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'uc_products',
      'field' => 'ordering',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'taxid',
      'argdefault' => '2',
      'title' => '%1',
      'options' => '3',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node_data_field_image_cache',
      'field' => 'field_image_cache_fid',
      'label' => '',
      'handler' => 'content_views_field_handler_first',
      'options' => 'product_list_linked',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'nolink',
    ),
    array (
      'tablename' => 'node',
      'field' => 'body',
      'label' => '',
      'handler' => 'views_handler_field_body',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'sell_price',
      'label' => '',
    ),
    array (
      'tablename' => 'node',
      'field' => 'view',
      'label' => 'szczegóły',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'buyitnowbutton',
      'label' => 'do koszyka',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'uc_products',
      'field' => 'is_product',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'search_index',
      'field' => 'word',
      'operator' => '=',
      'options' => '',
      'value' => '',
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '3',
      'value' => array (
),
    ),
    array (
      'tablename' => 'uc_product_stock',
      'field' => 'is_active',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'uc_product_stock',
      'field' => 'stock',
      'operator' => '>=',
      'options' => '',
      'value' => '1',
    ),
  );
  $view->exposed_filter = array (
    array (
      'tablename' => 'search_index',
      'field' => 'word',
      'label' => 'Słowa kluczowe',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '0',
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'label' => 'Kategoria',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '1',
    ),
  );
  $view->requires = array(uc_products, node, node_data_field_image_cache, search_index, term_node_1, uc_product_stock);
  $views[$view->name] = $view;

I've spent lot of time looking for solution but I still don't know why it happens.

Please help...

Comments

esmerel’s picture

Status: Active » Closed (fixed)

This issue is a nearly year old; it's likely either figured out or no longer relevant.