Forums / Customization from the Admin / Disable and enable product in admin not working? (red button or green button)

Disable and enable product in admin not working? (red button or green button)

Locked

Views: 3,057

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
1 Jun 2012, 7:40 PM
#1
spiggles87 avatar

spiggles87

New Zenner

Join Date:
Mar 2011
Posts:
53
Plugin Contributions:
0

Disable and enable product in admin not working? (red button or green button)

Hello,

:blush: I'm not sure if I am being silly or what not but the admin 'product disable/enable' function is not working. I turned a bunch of products off via an entire category turn off, making the green button turn red..along with each product within the category.

Now I only want to enable certain products for the time being, but when I go into the category in admin and click the red button next to the product I want to turn on, it simply refreshes the page and remains red? :frusty:

1 Jun 2012, 9:07 PM
#3
spiggles87 avatar

spiggles87

New Zenner

Join Date:
Mar 2011
Posts:
53
Plugin Contributions:
0

Re: Disable and enable product in admin not working? (red button or green button)

Hello Webchills,

I don't actually have image handler 4 installed, but I have check the code in the thread provided and it appears to be fine. FTP is telling me that this file has not been edited or had an override since I installed.

I should perhaps take a flick through mods that are installed to see if there is any conflict.

Many thanks for your help Webchills

1 Jun 2012, 9:09 PM
#4
spiggles87 avatar

spiggles87

New Zenner

Join Date:
Mar 2011
Posts:
53
Plugin Contributions:
0

Re: Disable and enable product in admin not working? (red button or green button)

Maybe this might narrow it down - The categories can be turned off fully via the product status button, but the products within each category can not.

1 Jun 2012, 9:12 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Disable and enable product in admin not working? (red button or green button)

spiggles87:

I should perhaps take a flick through mods that are installed to see if there is any conflict.
That's probably your smartest starting point.

ref: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Jun 2012, 4:17 AM
#6
mirza avatar

mirza

New Zenner

Join Date:
Jul 2010
Location:
Oakville
Posts:
7
Plugin Contributions:
0

Re: Disable and enable product in admin not working? (red button or green button)

Spiggles87, I am having the same issue categories are disabling but not products, did you find any solution? I tried to find out as per dr.byte recommandation but there are so many files and unfortunatly I found this issue when migration from 1.3.9a to 1.5 done in production and I didn't test it in dev before putting it in Production. Any help in this regard will be appreciated. I have two environments in one I have image handler 4 and other without but problem is same in both environments.

12 Jun 2012, 6:54 AM
#7
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,808
Plugin Contributions:
22

Re: Disable and enable product in admin not working? (red button or green button)

This happened to me recently and the fix was really easy: just find your admin/includes/modules/category_product_listing.php and run a compare with the one from a clean install. You can use WinMerge or Beyond Compare. Be careful so you don't kill any functionality you might have added. :smile:

My site - Pro ZC Help
My portfolio | My plugins

16 Jun 2012, 3:01 PM
#8
mirza avatar

mirza

New Zenner

Join Date:
Jul 2010
Location:
Oakville
Posts:
7
Plugin Contributions:
0

Re: Disable and enable product in admin not working? (red button or green button)

balihr, you rock man, it fixed my issue:clap:

26 Apr 2013, 9:39 PM
#9
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Disable and enable product in admin not working? (red button or green button)

I know this is an old thread but I thought I'd post this in case someone one would find it useful.

categories.php read:

case 'setflag':

      if ( isset($_GET['flag']) && ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
        if (isset($_GET['pID'])) {
          zen_set_product_status($_GET['pID'], $_GET['flag']);
        }
      }

I changed it to:

case 'setflag':

      if ( isset($_POST['flag']) && ($_POST['flag'] == '0') || ($_POST['flag'] == '1') ) {
        if (isset($_GET['pID'])) {
          zen_set_product_status($_GET['pID'], $_POST['flag']);
        }
      }