Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: "Number" (product in stock) editable fields on Product List (backend)  (Read 3159 times)
Seiko
Full Member
***
Posts: 115



WWW
« on: August 22, 2009, 09:14:51 AM »

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

* InventoryManagement.zip (9.84 KB - downloaded 260 times.)
Logged

Do you have questions and need some help for your Virtuemart project?
I'm ready to help you. Hire Me on oDesk
djimaestro
Newbie
*
Posts: 10



WWW
« Reply #1 on: February 16, 2010, 06:45:41 AM »

Great job ! Thanks !
Logged
klutzon
Sr. Member
****
Posts: 319


Knuckles the Echidna


WWW
« Reply #2 on: February 21, 2010, 03:51:17 AM »

Neat! Smiley 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...
« Last Edit: February 21, 2010, 04:08:46 AM by klutzon » Logged
razor7
Full Member
***
Posts: 166



« Reply #3 on: March 18, 2010, 13:36:12 PM »

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!


* administrator.tar.gz (30.51 KB - downloaded 194 times.)
Logged
Rhizome
Newbie
*
Posts: 2


« Reply #4 on: April 30, 2011, 16:31:08 PM »

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 Smiley

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.',
Logged
Wotan1985
Newbie
*
Posts: 1


« Reply #5 on: May 05, 2011, 00:03:18 AM »

Hi guys, i have a problem whit virtuemart 1.1.7 and 1.1.8

Get a message saying

Error: Function Not Registered. productStockUpdate is not a valid VirtueMart function.

Maybe can help me whit this.

There is the Image of Problem

http://img844.imageshack.us/i/erroruy.png/


* error.PNG (10.03 KB, 334x206 - viewed 54 times.)
Logged
Pages: [1]   Go Up
Print
Jump to: