Forums / Customization from the Admin / Simply button to mark as out of stock

Simply button to mark as out of stock

Started by topcat24 on 11 Apr 2011, 3:51 PM · Views: 1,316

Results 1 to 2 of 2
11 Apr 2011, 3:51 PM
#1
topcat24 avatar

topcat24

New Zenner

Join Date:
Jul 2007
Posts:
45
Plugin Contributions:
0

Simply button to mark as out of stock

We had before the update (from 1.3.8 to 1.3.9h) of our site a simple button in admin to mark as products out of stock as we do not use stock levels so to make it easier for staff to update items as in stock we changed the code of admin/includes/modules/category_product_listing.php

at lines 332-333 we replaced it with

<td class="dataTableContent" align="right">
<?php                    
if ($products->fields['products_quantity'] <= 0 ) {
    echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=setquantity&product_quantity=1&pID=' . $products->fields['products_id'] . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', "Put a product back in stock") . '</a>';
} else {
    echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=setquantity&product_quantity=0&pID=' . $products->fields['products_id'] . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', "Mark a product out of stock") . '</a>';
}
?>

                <?php echo $products->fields['products_quantity']; ?>
                </td>
                <td class="dataTableContent" width="50" align="center">
```But now when clicking the button for product quantity it does not change it 

Has there been a security update that makes this not work anymore or is there any errors in the coding

England's 1st Juggling Shop www.oddballs.co.uk

12 Apr 2011, 11:05 AM
#2
topcat24 avatar

topcat24

New Zenner

Join Date:
Jul 2007
Posts:
45
Plugin Contributions:
0

Re: Simply button to mark as out of stock

Fixed it as missed out the customization on categories for the command setquantity

England's 1st Juggling Shop www.oddballs.co.uk