Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't view product attributes pages


renix

Recommended Posts

Posted

I can only view page 1 of product attributes - even though I have 76 different attributes in my database. It shows that there are 8 pages of attributes, but selecting a page 2, 3, 4 etc. or the "next icon" always brings me back to page 1. No contributions related to product attributes have been added. I can't get to my attributes through the admin to make edits/deletions and I'm a little nervous about making changes directly to the DB.

 

This is the code from the products_attributes page that I believe provides the ability to view different pages of attributes. I've compared it with a fresh download of the page and it appears to be the same.

 

Does anyone see anything that I'm missing? Thanks in advance.

 

<?php

$per_page = MAX_ROW_LISTS_OPTIONS;

$options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by " . $option_order_by;

if (!isset($option_page)) {

$option_page = 1;

}

$prev_option_page = $option_page - 1;

$next_option_page = $option_page + 1;

 

$option_query = tep_db_query($options);

 

$option_page_start = ($per_page * $option_page) - $per_page;

$num_rows = tep_db_num_rows($option_query);

 

if ($num_rows <= $per_page) {

$num_pages = 1;

} else if (($num_rows % $per_page) == 0) {

$num_pages = ($num_rows / $per_page);

} else {

$num_pages = ($num_rows / $per_page) + 1;

}

$num_pages = (int) $num_pages;

 

$options = $options . " LIMIT $option_page_start, $per_page";

 

// Previous

if ($prev_option_page) {

echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $prev_option_page) . '"> << </a> | ';

}

 

for ($i = 1; $i <= $num_pages; $i++) {

if ($i != $option_page) {

echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $i) . '">' . $i . '</a> | ';

} else {

echo '<b><font color=red>' . $i . '</font></b> | ';

}

}

Posted

Hello Renix,

 

Did you ever find a solution to this problem. Sorry I can't help as I have the same problem right now and just happened to find your post while searching around.

 

Good luck and let me know if you find a solution.

J.T.

 

 

 

I can only view page 1 of product attributes - even though I have 76 different attributes in my database. It shows that there are 8 pages of attributes, but selecting a page 2, 3, 4 etc. or the "next icon" always brings me back to page 1. No contributions related to product attributes have been added. I can't get to my attributes through the admin to make edits/deletions and I'm a little nervous about making changes directly to the DB.

 

This is the code from the products_attributes page that I believe provides the ability to view different pages of attributes. I've compared it with a fresh download of the page and it appears to be the same.

 

Does anyone see anything that I'm missing? Thanks in advance.

 

<?php

$per_page = MAX_ROW_LISTS_OPTIONS;

$options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by " . $option_order_by;

if (!isset($option_page)) {

$option_page = 1;

}

$prev_option_page = $option_page - 1;

$next_option_page = $option_page + 1;

 

$option_query = tep_db_query($options);

 

$option_page_start = ($per_page * $option_page) - $per_page;

$num_rows = tep_db_num_rows($option_query);

 

if ($num_rows <= $per_page) {

$num_pages = 1;

} else if (($num_rows % $per_page) == 0) {

$num_pages = ($num_rows / $per_page);

} else {

$num_pages = ($num_rows / $per_page) + 1;

}

$num_pages = (int) $num_pages;

 

$options = $options . " LIMIT $option_page_start, $per_page";

 

// Previous

if ($prev_option_page) {

echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $prev_option_page) . '"> << </a> | ';

}

 

for ($i = 1; $i <= $num_pages; $i++) {

if ($i != $option_page) {

echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $i) . '">' . $i . '</a> | ';

} else {

echo '<b><font color=red>' . $i . '</font></b> | ';

}

}

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
Posted

I had this exact same problem and was pulling the last hair out when I thought about the Globals patch. I had installed the attributes contribution and then later had to install the globals patch. I just went back and reinstalled the globals patch and everything seems to be working correct now. Try that and see if it works. Actually the only thing I had to do was add the first change in products_attributes.php file.

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...