News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Apply order status to specific product or category

Started by rainman2000, November 15, 2013, 19:48:19 PM

Previous topic - Next topic

rainman2000

Hi All,

We usually don't deduct stock until the item ships. However, we have some specific items that are for time limited flash sales and we need to subtract the quantity as soon as the item becomes confirmed. So, is there a way to apply the order status to a specific product or category without hacking the code?

Thanks!

GJC Web Design

Don't think so - the status is set by each individual payment plugin with the function  plgVmConfirmedOrder() normally

$modelOrder = VmModel::getModel ('orders');
$order['order_status'] = "P";
$order['customer_notified'] = 1;
$order['comments'] = '';
$modelOrder->updateStatusForOneOrder ($order['details']['BT']->virtuemart_order_id, $order, TRUE);


I assume if this is set to C (confirmed) the stock is deducted but haven't checked

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rainman2000

Thanks. Hopefully someone creates a plugin for this soon.