This is a discussion on Trying to create a new status behaviour within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I am trying to create an additional set of status buttons in the admin section. The purpose of these ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I am trying to create an additional set of status buttons in the admin section. The purpose of these buttons is so that the site administrator can set a product to sold (and show a message to the user that this product has been sold) and this will not remove the product completely as the other status buttons do. I did not modify the current status behavior because I wanted to keep that functionality as well. I looked around for a contribution and found one that will signify (by a custom message) when a stock item gets low. This contribution is based on stock quantities. This is not suitable because I will only ever have one of the product and I simply want to toggle between sold or not sold. I created a new field in products ( product_status_sold ). I did not modify the current status field as I wanted to keep it separate as I am completely new to PHP and could not gage the impact on the rest of the app. I created a function, a selection structure to set the message of "This Product is SOLD" based on the value of the new status field in the products file and created the new buttons on the admin form. I tested it. The data base is getting populated and the message is getting displayed correctly. Everything seems to work but the buttons. I can see the buttons, I can even click them. The problem is that I have duplicated the functionality of the other status buttons. So when I click on a status my new buttons also behave as if they have been clicked on as well and visa-versa. I have isolated the problem down to, I think, this group of code. However, I am not sure how I can separate this code out. I have tried a few things. Any ideas? Admin/Categories.php Starts at about line 44 in Categories.php if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if ($HTTP_GET_VARS['pID']) { tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']); |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Google status are not set up in the database | jasper0 | osCMax v2 Customization/Mods | 0 | 01-01-2007 06:58 PM |
| stock status issues | jonnyl | osCMax v2 Installation issues | 2 | 06-11-2006 04:46 PM |
| How to Add New Order Status Values | MikeS | osCMax v1.7 Discussion | 2 | 05-18-2005 12:22 AM |
| Strange behaviour | lhotch | osCMax v1.7 Installation | 1 | 08-10-2004 02:00 PM |
| I want to die !! Strange Behaviour PLZ HELP !! S.O.S. ! | damnedpig | osCMax v1.7 Discussion | 2 | 07-26-2004 04:45 AM |