Jump to content

Yet another Product Options issue


Guest
 Share

Recommended Posts

I seem to be having an issue that has not been discussed before, at least within the first dozen pages of a forum search.

I'm just getting into using product options, and what I'm running into is that whenever I edit or delete anything on the product options screen, the script freezes for a while, and then the PHP file itself is given to the browser instead of the OUTPUT of the php file. (i.e.- I get a message asking what software I want to open the PHP file in, suggesting the default editor).

When this happens, I cannot access any other CubeCart pages and I have to close my browser and re-open it again. With a bit of testing, I found that the changes are made relatively quickly, and I can close the browser immediately after clicking the 'edit' or 'delete' button and reopen it again and see the changes made.

The problem does not happen when ADDING product options, attributes, or values. Just when editing or deleting.

Until yesterday, I had no mods installed that affected product options, and when I noticed the problem, I uploaded a default options.php file to admin/products/options.php from the latest distribution package. The fresh file produced the same results.

I'm using a Linux server with PHP 4.4.7 and MySQL 4.1. Everything else in my CubeCart system is working fine.

My browser is Firefox on a Fedora Core OS system.

Does anyone have a suggestion for something to try?

EDIT: Looking into the options.php file itself, it seems that when something is edited or deleted, there is a line such as:

header("Location: ".urldecode($_GET['redir']));

that's not involved when ADDing something.

Is it possible that the urldecode function is causing a problem?

Link to comment
Share on other sites

Guest Rikki

I seem to be having an issue that has not been discussed before, at least within the first dozen pages of a forum search.

I'm just getting into using product options, and what I'm running into is that whenever I edit or delete anything on the product options screen, the script freezes for a while, and then the PHP file itself is given to the browser instead of the OUTPUT of the php file. (i.e.- I get a message asking what software I want to open the PHP file in, suggesting the default editor).

When this happens, I cannot access any other CubeCart pages and I have to close my browser and re-open it again. With a bit of testing, I found that the changes are made relatively quickly, and I can close the browser immediately after clicking the 'edit' or 'delete' button and reopen it again and see the changes made.

The problem does not happen when ADDING product options, attributes, or values. Just when editing or deleting.

Until yesterday, I had no mods installed that affected product options, and when I noticed the problem, I uploaded a default options.php file to admin/products/options.php from the latest distribution package. The fresh file produced the same results.

I'm using a Linux server with PHP 4.4.7 and MySQL 4.1. Everything else in my CubeCart system is working fine.

My browser is Firefox on a Fedora Core OS system.

Does anyone have a suggestion for something to try?

EDIT: Looking into the options.php file itself, it seems that when something is edited or deleted, there is a line such as:

header("Location: ".urldecode($_GET['redir']));

that's not involved when ADDing something.

Is it possible that the urldecode function is causing a problem?

Could be down to your browser. I know IE does that sometimes when I am doing things, a restart of the PC usually helps or loading up Fire Fox instead.

Its like a common problem with the latest phpMyadmin that causes Page Cannot Be Displayed errors, I use firefox and it works fine.

R

Link to comment
Share on other sites

Thanks for the suggestion Rikki.

I currently use Firefox on a Linux machine. What's strange is that I don't run into that problem ANYWHERE else, and it's consistent - EVERY time I try to edit or delete an option, the same thing happens, but never when adding options (or attributes, or values)...

Link to comment
Share on other sites

Guest estelle

Alan, do you have a very large number of products using product options in your store?

I seem to remember a problem quite some time ago, not sure if it was ever fixed, where there was a "SELECT * ..." within the options page that was using a massive amount of memory in stores with a large number of products. Perhaps its was never fixed, and it perhaps it is causing the problem you describe.

... Looking at the code, perhaps this line might be the problem:

		$query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_options_bot INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON product = productId ORDER BY name, option_id, value_id ASC";



[uNTESTED] You could try changing it to:


		$query = "SELECT assign_id, name, option_id, value_id, option_price, option_symbol, product FROM ".$glob['dbprefix']."CubeCart_options_bot INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON product = productId ORDER BY name, option_id, value_id ASC";

Link to comment
Share on other sites

I'll check to see if that works.

I only have about 25 products in my store, and only 3 of them are using options at this time, so it doesn't seem like a lot to me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...