Fun Question (from my perspective, at least :) )
Fun Question (from my perspective, at least :) )
Hello...
I have what I hope is a fairly easy, but fun question/scenario.
My boss wants to be able to start tracking inventory adjustments, in order to prevent fraud as a result of different employees making changes at various times. As such, I have created a InventoryHistory data object and datasource layer, and I am hoping to just run the static method .Add() each time an inventory adjustment is made. Okay, here are my questions:
1) What is the code for returning the current user? I have seen the nVelocity commands for this, but, am not sure what the code is on the C# side. This way, all I'll (hopefully) have to do, is find each place where inventory is adjusted, and add the line: InventoryHistory.Add();
2) Where are all the places in Able Commerce where inventory is adjusted? Many, of course, are obvious... Like Inventory reports, product editor, etc... I guess I mostly am concerned about where this happens on the customer side, and when. Of course, I could paste this in as soon as an order is finished, but, it would definitely be best to only do this once the inventory is acutally adjusted.
Thank you all for any help you can give me with this!
Scott
PoolGeek.com
I have what I hope is a fairly easy, but fun question/scenario.
My boss wants to be able to start tracking inventory adjustments, in order to prevent fraud as a result of different employees making changes at various times. As such, I have created a InventoryHistory data object and datasource layer, and I am hoping to just run the static method .Add() each time an inventory adjustment is made. Okay, here are my questions:
1) What is the code for returning the current user? I have seen the nVelocity commands for this, but, am not sure what the code is on the C# side. This way, all I'll (hopefully) have to do, is find each place where inventory is adjusted, and add the line: InventoryHistory.Add();
2) Where are all the places in Able Commerce where inventory is adjusted? Many, of course, are obvious... Like Inventory reports, product editor, etc... I guess I mostly am concerned about where this happens on the customer side, and when. Of course, I could paste this in as soon as an order is finished, but, it would definitely be best to only do this once the inventory is acutally adjusted.
Thank you all for any help you can give me with this!
Scott
PoolGeek.com
Re: Fun Question (from my perspective, at least :) )
Use the Token to get this information. Just add the CommerceBuilder.Common namespace into your C# class and then you can get this info as below1) What is the code for returning the current user? I have seen the nVelocity commands for this, but, am not sure what the code is on the C# side. This way, all I'll (hopefully) have to do, is find each place where inventory is adjusted, and add the line: InventoryHistory.Add();
Code: Select all
Token.Instance.User
Have a look at the following post. It may help you2) Where are all the places in Able Commerce where inventory is adjusted? Many, of course, are obvious... Like Inventory reports, product editor, etc... I guess I mostly am concerned about where this happens on the customer side, and when. Of course, I could paste this in as soon as an order is finished, but, it would definitely be best to only do this once the inventory is acutally adjusted.
viewtopic.php?f=42&t=7220
Last edited by mazhar on Mon Oct 20, 2008 10:58 am, edited 1 time in total.
Re: Fun Question (from my perspective, at least :) )
Thanks Mazhar. I appreciate your help. I did read through that post, but, I am still unsure when the actual inventory adjustment takes place. I know that I will not have access to how this occurs, but, if I can just imbed my statement somewhere near where it occurs, I should be fine with that. Of course, if inventory adjustment occurs conditionally (like on whether or not credit card is approved) I suppose I may run into a problem, but, I can always adjust my inventory manually if I must. Any ideas for me? Right now, I'm thinking my best bet may be to imbed the statement on the order finished page.
Any thoughts?
Scott
Any thoughts?
Scott
Re: Fun Question (from my perspective, at least :) )
For example for the shippable items the inventory is adjusted when the order is shipped i mean when the order status changes to Shipped. And in this case if we see from the admin side the last location available is the Admin/Orders/ShipOrder.aspx.cs file's following line
Code: Select all
//SHIP THE CURRENT SHIPMENT
_OrderShipment.Ship();
//RETURN TO SHIPMENTS PAGE
Re: Fun Question (from my perspective, at least :) )
Thanks, Mazhar! That's exactly what I'm looking for. This being the case, I can just past my code immediately following the OrderShipment.Ship();.
Perfect... Now just to find all the others!
Thanks again!
Scott
Perfect... Now just to find all the others!
Thanks again!
Scott
Re: Fun Question (from my perspective, at least :) )
Sorry for the confusion, but, are you absolutely positive that the inventory is adjusted after shipping status is changed? My warehouse guy is telling me that this makes no sense whatsoever. He says that many orders are not shipped out until after a whole weekend, and, in this case, we may have quanities that are dangerously low, and need to be reordered, but not show on the low quantity report because inventory is not adjusted. If this is indeed the case, can you tell me the rationale behind this decision?
I'm just trying to clarify this before he tells me that this is just not going to work for him, and I begin coding something that will.
Thanks again for the help.
Scott
I'm just trying to clarify this before he tells me that this is just not going to work for him, and I begin coding something that will.
Thanks again for the help.
Scott
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: Fun Question (from my perspective, at least :) )
Hello,
It's based on how you have your order statuses setup, you can customize it to meet your business requirements. Change it to on order placed, if that would suit you better.
It's based on how you have your order statuses setup, you can customize it to meet your business requirements. Change it to on order placed, if that would suit you better.
- compunerdy
- Admiral (ADM)
- Posts: 1283
- Joined: Sun Nov 18, 2007 3:55 pm
Re: Fun Question (from my perspective, at least :) )
I had to change mine to when the order is placed. If you do this just be sure to cancel any orders that you dont process so the inventory will get added back in.
Re: Fun Question (from my perspective, at least :) )
This is I'm doing, and it's been working just fine. Make sure you "restock" on appropriate events (order void, cancel, etc.) as well. I've added triggers on Product and Variant "InStock" fields to write transaction records in my own tables for audit purposes - so all input (either store sales or admin changes to stock levels) are recorded as +/- transactions.Change it to on order placed, if that would suit you better.
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Fun Question (from my perspective, at least :) )
Thank you all so much. All the information was very helpful. I think after setting the appropriate actions for the Statuses, I should be all set.
Once again, I appreciate how helpful everyone in these forums has been!
All the best,
Scott
Once again, I appreciate how helpful everyone in these forums has been!
All the best,
Scott