"Number" (product in stock) editable fields on Product List (backend)
Seiko:
Hi,
I added "Number" (product in stock) editable fields on Product List page.
Now you can updated number of stock without opening individual product detail page.
I worked on:
Joomla ver 1.5.14
VirtueMart ver 1.1.3
Modified files:
./administrator/components/com_virtuemart/html/product.ajax_tools.php
./administrator/components/com_virtuemart/html/product.product_list.php
djimaestro:
Great job ! Thanks !
klutzon:
Neat! :) To use in v1.1.4 (or for the code to be proper rather), just modify the code in product.ajax_tools on line 162 from
$db =& new ps_DB;
to
$db = new ps_DB;
Small request, could we change the label for it from "Number" to "In Stock"? Call that name like the other fields on the form? I'll look into it...
razor7:
I have created another solution, a little bit more complex but also more elegant.
It uses the same ajax methods and forms that the price ajax updater
just replace VM files with the ones in the zip file
After that, you have to create a new function for admin module with this parameters
Quote
components-virtuemart->administration->list modules->admin->function list
Code:
function name productStockUpdate
class name ps_product_stock
class method update
permissions admin,storeadmin
Best regards!
Rhizome:
in your second zip the folder classes is called clsses
works on 1.1.6!
great work man, u saved me a lot of time :)
if someone dont'want to overwrite thelanguage file here are the 2 lines added i found.
'VM_PRODUCT_STOCK_UPDATED' => 'The product stock has been updated.',
'VM_PRODUCT_STOCK_UPDATING_FAILED' => 'The stock could not be updated.',
Navigation
[0] Message Index
[#] Next page