0

I am a novice at Magento development. I am more experienced in Joomla and wordpress and have realized magento isn't as easy as i though, so i now have to request help!

I need help in achieving the following. I have an idea of how to approach this, but i would really appreciate you guys providing me the best solution/steps in achieving this. I dont want to be wasting too much of my time doing trial and error.

I need to create a module that does the following in the admin panel (adminhtml).

  1. When i login, a sub-menu titled "Order Monitor" will be shown under the sales menu.
  2. when clcik, this menu item will open a page that displays a single button in the middle title "Next Order".
  3. When the button is clicked, it should fetch all pending orders, from specified categories, from a specified store view. (i guess i would need a configuration area for that)
  4. the page would then display 2 sections, bottom/top. The lower section displays a orders table with orders in cue and their info. The top section displays the full order details (items purchased, customer info, etc.) of the next order in the cue.
  5. I will then have a button in the top section to be clicked when the order is packed and complete, which will change that order to a different status.

here what i believe is the hard part... Another feature i would love to integrate, is for the system to be able to bring up the next order in the cue if someone else is loggeed in and viewing/processing a order that is higher in the cue. example: if Packer1 is logged in and viewing/processing an order thats 1st in line. if Packer2 logs in and goes to smae page, the system automatically selects the order 2nd in line.

I tried attempting this by using @Marius magento extension Ultimate Module Creator. which is a lot of help. learning slowly but i need to pick it up to get this done in time. This is a personal project btw!

Any help you can provide will be greatly appreciated. if you can provide some codes, even better.

0

Your question is very large so my answer is intended to get you started towards the individual steps, but you'll likely need to research and ask specific questions along the way.

A few bits of advice, just FYI

  • If you use PHPStorm / IntelliJ then look into the Magicento plugin
  • Be sure to disable relevant (or all) caches
  • Whenever you get something working, even a little bit, commit it--starting out in Magento can be full of "almost there's" followed by "back to the start" over very small errors
  • It's unclear if you intend to add new states/statuses to the Order lifecycle. My experience is that the built-in lifecycle isn't terribly easy to extend, so beware that may be harder than you'd hope

1) When I login, a sub-menu titled "Order Monitor" will be shown under the sales menu.

This is a good first step, search for "Add custom Magento admin menu" to find tutorials. By the time it works you should have a barebones module with little more than a couple XML config files (adminhtml.xml is the key one).

2) When clicked this menu item will open a page that displays a single button in the middle title "Next Order".

Each menu item defined in Step 1 will have an <action> element that you'll use to make the menu into a link and to specify what route to send the user to. That route will need to go to a new Admin controller in your module, Alan Storm has a solid run-down that covers best-practices for adding an admin module.

The button will probably come from a new Block that you create for your module, which will be added to your controller's results either via a layout file (probably overkill) or dynamically/anonymously within the controller's action method.

3) When the button is clicked, it should fetch all pending orders, from specified categories, from a specified store view. (i guess i would need a configuration area for that)

You can find plenty of good tutorials on adding a configuration section for your module; usually they're just defined via XML in system.xml, although if you need to get fancy you might need to go further in defining custom backing models, validators, or UI elements.

When you have your query criteria it's a simple call to get the results using Magento's Collection Models, it will be something like:

$orders_to_fulfill = Mage::getModel('sales/order')
  ->getCollection()
  ->addAttributeToFilter(...)

4) the page would then display 2 sections, bottom/top. The lower section displays a orders table with orders in cue and their info. The top section displays the full order details (items purchased, customer info, etc.) of the next order in the cue.

You'll probably want to use an Admin Grid to display the list; you can search for tutorials on extending Mage_Adminhtml_Block_Widget_Grid to find out how to do that.

As for order details, you'll probably define a custom block which expects an OrderId, calls Mage::getModel('sales/order')->load($orderId) and then displays relevant attributes.

5) I will then have a button in the top section to be clicked when the order is packed and complete, which will change that order to a different status.

It's not clear if you intend for this page to include the Shipping step, which is a default part of the Order lifecycle. You can look into the actions called by the Ship button (and its following UI) to either see how to call those same actions or come up with your own.

  • Thanks... I usually us dreamweaver but im now testing pulsestorm and magicento and lowing with the links you left. taking things a step at a time in the way you present it. – Nxlevel Mar 30 '15 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.