"order_status" Snippets


Basket #57209

Simply changes any order_Status that is "Pending" to "In Progress"
Created: 1504214967
View "Basket #57209"
<mvt:assign name="l.settings:scrubme" value="'I am a really long and boring sentance.'"/> <mvt:assign name="g.return_value" value="substring( l.settings:scrubme, 0, 10 )" /> &mvt:global:return_value;
 

Updating order array order_status from Pending to In Progress

Simply changes any order_Status that is "Pending" to "In Progress"
Created: 1498090111
View "Updating order array order_status from Pending to In Progress"
<mvt:comment> | | By http://www.scotsscripts.com | </mvt:comment> <mvt:assign name="l.settings:order[1]:id" value="'1'" /> <mvt:assign name="l.settings:order[1]:order_status" value="'In Progress'" /> <mvt:assign name="l.settings:order[2]:id" value="'2'" /> <mvt:assign name="l.settings:order[2]:order_status" value="'In Progress'" /> <mvt:assign name="l.settings:order[3]:id" value="'3'" /> <mvt:assign name="l.settings:order[3]:order_status" value="'Pending'" /> <mvt:assign name="l.settings:order[4]:id" value="'4'" /> <mvt:assign name="l.settings:order[4]:order_status" value="'In Progress'" /> <p><b>Original:</b></p> <mvt:foreach iterator="item" array="order"> id: &mvt:item:id; status: &mvt:item:order_status;<br> </mvt:foreach> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:order)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:order[l.counter]" /> <mvt:if expr="tolower(l.struct:order_status) EQ 'pending'"> <mvt:assign name="l.struct:order_status" value="'In Progress'" /> </mvt:if> <mvt:assign name="l.success" value="miva_array_insert( l.settings:temp_array, l.struct, -1 )" /> </mvt:while> <mvt:assign name="l.settings:order" value="l.settings:temp_array" /> <p><b>Updated:</b></p> <mvt:foreach iterator="item" array="order"> id: &mvt:item:id; status: &mvt:item:order_status;<br> </mvt:foreach>