n.rosenfeldt Posted November 10, 2017 Share Posted November 10, 2017 (edited) Hello. Can anyone support me in trying to change the "Reference" in supplier order (Adv. stock management) so the ID will be set automatically? So instead of having to write a reference, the field either picks up the next available ID from the table 'id_supply_order' or put a order reference similar to the one in customer orders. I am hoping that somebody out there can help me with this I am guessing, that this is the part, that has to be changed in AdminSupplyOrdersController: array( 'type' => 'ID', 'label' => $this->l('Reference'), 'name' => 'reference', 'required' => true, 'hint' => $this->l('The reference number for your order.'), ), And in someway needs to be similar to the part from classes/order/Order.php: { $context = Context::getContext(); $reference = $context->cart->id.''; return str_pad($reference, 7, '0', STR_PAD_LEFT); } My order reference has been changed to show numbers instead of letters. That is why it looks like it does. Edited November 10, 2017 by n.rosenfeldt (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now