I am tryinng to create a text area box where you can enter in the part number and quantity into it and I then want it adding to the cart.
So in the text area field I want it so you would do this.
10-10-10, 12
12-13-14, 4
When I look at the params in the log it comes up as :template1 => "10-10-10, 2\r\n\11-12-13,4"
My thoughts on how to do this was to split up the string so i manged to somehow get the product and quantity based on the \r\n
using split
and then pass it into FastOrderLines.create
to add it to my cart.
I am struggling to split the string up into something workable, any help or advice will be much appreciated.
Thanks