News:

Looking for documentation? Take a look on our wiki

Main Menu

Not working Events on child vmPSPlugin

Started by prombez, January 25, 2012, 09:53:54 AM

Previous topic - Next topic

prombez

Events:
onUpdateOrder
plgVmOnEditOrderLineBE
plgVmOnShowOrderLineFE
and etc not working!

In orders model use
plgVmOnUpdateOrderPayment
and
plgVmOnUpdateOrderShipment

but no info about order_id or product_id
only old status, new status, comment and other

Milbo

Please explain closer what you mean. I do not understand it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

prombez

There are following events in the documentation on the plugin creation:
plgVmOnUpdateOrderShipper
plgVmOnUpdateOrderLineShipper
plgVmOnShowOrderShipperFE
plgVmOnShowOrderLineShipperFE

In the source plugin code:

    /**
     * Save updated order data to the method specific table
     *
     * @param array $_formData Form data
     * @return mixed, True on success, false on failures (the rest of the save-process will be
     * skipped!), or null when this method is not actived.
     * @author Oscar van Eijk

      public function plgVmOnUpdateOrder($psType, $_formData) {
      return null;
      }
     */
    /**
     * Save updated orderline data to the method specific table
     *
     * @param array $_formData Form data
     * @return mixed, True on success, false on failures (the rest of the save-process will be
     * skipped!), or null when this method is not actived.
     * @author Oscar van Eijk

      public function plgVmOnUpdateOrderLine($psType, $_formData) {
      return null;
      }
     */
    /**
     * plgVmOnEditOrderLineBE
     * This method is fired when editing the order line details in the backend.
     * It can be used to add line specific package codes
     *
     * @param integer $_orderId The order ID
     * @param integer $_lineId
     * @return mixed Null for method that aren't active, text (HTML) otherwise
     * @author Oscar van Eijk

      public function plgVmOnEditOrderLineBE($psType, $_orderId, $_lineId) {
      return null;
      }
     */
    /**
     * This method is fired when showing the order details in the frontend, for every orderline.
     * It can be used to display line specific package codes, e.g. with a link to external tracking and
     * tracing systems
     *
     * @param integer $_orderId The order ID
     * @param integer $_lineId
     * @return mixed Null for method that aren't active, text (HTML) otherwise
     * @author Oscar van Eijk

      public function plgVmOnShowOrderLineFE($psType, $_orderId, $_lineId) {
      return null;
      }
     */

In the updateStatusForOneOrder method of the Orders model code the following trigger is fired:
$_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderShipment',array(&$order,$old_order_status));

Moreover judging by the sent data the order itself cannot be identified (either Id or order_number)
The other events are not fired either.

How to use this events?