Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product attributes problem in admin


ssoeb

Recommended Posts

Hi,

 

My store is running very well on oscommerce2.2rc2a.

I have more then 12000 products on my site.

 

Problem

 

 

when i want to add attributes to any products i goes to adminpanel, in left column 'catalog->Products Attributes'.

but when goes on attributes page i alsways found 'Internal Server Error'.

 

When i give limit to attributes query in products_attributes.php to 6000 then it works very well.

 

$products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name LIMIT 6000");

 

When i removes limit it gives 'Internal Server Error'.

 

Need help.

Thanks and Regards

 

Soeb Shaikh

Link to comment
Share on other sites

@@ssoeb

 

That code in a standard installation does not include a limit.

 

<?php

$products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name");

while($products_values = tep_db_fetch_array($products)) {

if ($attributes_values['products_id'] == $products_values['products_id']) {

echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '" SELECTED>' . $products_values['products_name'] . '</option>';

} else {

echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>';

}

}

?>

 

 

Chris

Link to comment
Share on other sites

@@ssoeb

 

Maybe usefull if try to use a GET['fromlimit'] parameter with GET['tolimit']in URL.

 

example:

products_attributes.php?fromlimit=1&tolimit=6000

 

so you can use $limit = "limit " . $_GET['fromlimit'] . ", " . $_GET['tolimit'];

 

$products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name " . $limit . "");

 

Limits:

1, 6000

6001, 6000

12001, 6000

 

I use similar controlls in my special admin pages.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

@@DunWeb

 

Hi Chris,

 

You are right, That code in a standard installation does not include a limit.

But with standard code without any limit it gives 'Internal Server Error'.

It works only with when i gave it limit to 6000.

any further suggestion.

Thanks and Regards

 

Soeb Shaikh

Link to comment
Share on other sites

@@DunWeb

@@Gergely

 

Finally got solution :)

I have checked and found that, there was a Mod-Security rule which causing the issue with the domain.

Now, I have bypassed the rule for the domain.

Now, I am able to view the All Products Attributes

Thanks and Regards

 

Soeb Shaikh

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...