So the general problem I'm having is that I need to dynamically generate global variables. I have javascript and php working together on my site to grab some non-text user input and store the value in a variable. Basically I need a way to get <mvt:assign name="g.myvariable" value="some_js_variable" /> to work.
My first thought was to use localStorage in js to transfer the variable to avoid the whole mvt assign issue but I'm attempting to get this to work with emporium toolkit which sends data to a "receipt" page which is used to populate the fields of an email and, because I'm not 100% sure what toolkit is doing on the backend to get this to happen, I can't access localStorage there. The only way I have successfully gotten the toolkit script to work is with hard-coded text on the receipt page or via global variables so that's where I'm at now.
If there are any suggestions to get this to work without mvt assign or localStorage those are of course welcome as well. It's entirely possible I've overlooked something obvious and simple.
Thanks everyone.
My first thought was to use localStorage in js to transfer the variable to avoid the whole mvt assign issue but I'm attempting to get this to work with emporium toolkit which sends data to a "receipt" page which is used to populate the fields of an email and, because I'm not 100% sure what toolkit is doing on the backend to get this to happen, I can't access localStorage there. The only way I have successfully gotten the toolkit script to work is with hard-coded text on the receipt page or via global variables so that's where I'm at now.
If there are any suggestions to get this to work without mvt assign or localStorage those are of course welcome as well. It's entirely possible I've overlooked something obvious and simple.
Thanks everyone.
Comment