^Pariah^ Posted November 3, 2005 Posted November 3, 2005 I have basically copied db structure and categories.php used to set a products status as "in stock" or "out of stock" to create an additional field And it all appears to work just fine : Current Status is shown as red or green... Alternate Status is an HREF ( ....categories.php?action=setflag&flag=1&pID=0&cPath=9 )... Clicking on Alternate Status refreshes browser..... But the change is not being posted to the DB If i edit the product and change the new field, database is updated and red/green changes accordingly Is going to be something simple and stupid again, but I can't see it Thanx // Add a bit of space between ... echo ' '; // And here comes the slash and burn.... // if show_main_page is set to 1, then it is true... if ($products['products_show_main_page'] == '1') { // So show a green LED ... and make the red one clickable so the flag can be set 0 in the db... echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=0&pID=' . $products['products_show_main_page'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { // Otherwise, it is all face about ... echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=1&pID=' . $products['products_show_main_page'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } // And so the fat lady sings
Recommended Posts
Archived
This topic is now archived and is closed to further replies.