Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to create a custom name object
04-10-2018, 03:20 AM (This post was last modified: 04-10-2018 03:29 AM by HDeriauFF.)
Post: #1
how to create a custom name object
Hi there

I need to dynamically recreate an array in order to correctly alter a session

here is my issue

What I need:
Code:
[SerialItems] => Array
                        (
                            [ABLE_11/18/20] => SerialItem Object
                                (
                                    [BundleRef] => ABLE_11/18/20
                                    [BundleQty] => 16
                                    [ExpiryDate] => 11/18/2020
                                )

                        )


when recreate my array $LnItm->SerialItems[], I get a stdClass Object instead:

Code:
[SerialItems] => Array
                        (
                            [ABLE_11/18/20] => stdClass Object
                                (
                                    [BundleRef] => ABLE_11/18/20
                                    [BundleQty] => 16
                                    [ExpiryDate] => 11/18/2020
                                )

                        )

What do I need to do to change the stdClass Object to SerialItem ?

Thanks!
Find all posts by this user
Quote this message in a reply
04-11-2018, 04:13 AM
Post: #2
RE: how to create a custom name object
I found my answer by digging in the code, directly using the function instead of building the array manually.

This allows me to achieve a major improvement by populating the "confirm dispatch invoice" page automatically with the next available lot without the need to enter individually each lot number (it's not uncommon for us to get order with 30 or 40 lines, it saves us a lot of time)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)