Here's something to work with. This will not work on your 1.3.9 shop, but will on your 1.5.5 upgrade.
Create a file in your store's /includes/classes/observers directory named auto.quotation.php, containing:
Code:
<?php
class zcObserverQuotation extends base
{
public function __construct()
{
$this->attach($this, array('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_INIT'));
}
public function update(&$class, $eventID)
{
switch ($eventID) {
case 'NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_INIT':
$order = $class;
if ($order->info['payment_module_code'] == 'quotation') {
$order->doStockDecrement = false;
}
break;
default:
break;
}
}
}
That code "attaches" to the notification that the order is preparing to perform the stock-related decrement. When that notification is "raised", the update function receives control and checks the current order (based on the $class input) to see if the currently-selected payment-method is quotation and, if so, sets the order-class variable to indicate that stock-decrementation should not be performed.
Please note that the code assumes that you've named your payment method quotation for its processing! If you use a different name/payment-module-code, then you'll need to change the highlighted compare string.
Bookmarks