Mail: [email protected]
Phone: +1(424)231-4091
Everything you need to know about NexoPOS.
The product prefill is a feature added from NexoPOS 5.3.3. this allows to create a list of product that will be populated while creating a procurement. This feature might be used to suggest procurement to the end user.
To make it work, you need to use the class "ProcurementService" which now provides new methods: "storePreload" and "preload". The "storePreload" method accepts 4 parameters:
You need to redirect to the procurement page with an extra query argument (preload). When the query argument "preload" has as value the $uniqueId we created, the product will be fetched and added to the table.
Here is what the URL must look like.
yourwebsite.com/dashboard/procurement/create?preload=48927940-f2af-4d0e-83e1-d43b493989ef
Note that you can use the helper "ns()->route( 'ns.procurement-create' )" to get the procurement URL.