Here is some generic code which should do the trick. It does not work with subscription items, however it does take the existing attributes into account.
Code:
<form action="&mvte:urls:BASK:auto;" method="post"> <input type="hidden" name="Action" value="ADPM"> <mvt:foreach iterator="group" array="order:groups"> <input type="hidden" name="Products[&mvt:group:product:id;]:code" value="&mvte:group:product:code;"> <input type="hidden" name="Products[&mvt:group:product:id;]:quantity" value="&mvte:group:quantity;"> <mvt:assign name="l.settings:group:option_counter" value="''" /> <mvt:foreach iterator="option" array="group:options"> <mvt:assign name="l.settings:group:option_counter" value="l.settings:group:option_counter + 1" /> <input type="hidden" name="Products[&mvt:group:product:id;]:attributes[&mvte:group:option_counter;]:code" value="&mvte:option:attr_code;"> <mvt:if expr="l.settings:option:option_id"> <input type="hidden" name="Products[&mvt:group:product:id;]:attributes[&mvte:group:option_counter;]:value" value="&mvte:option:opt_code;"> <mvt:elseif expr="NOT ISNULL l.settings:option:data"> <input type="hidden" name="Products[&mvt:group:product:id;]:attributes[&mvte:group:option_counter;]:value" value="&mvte:option:data;"> <mvt:elseif expr="NOT ISNULL l.settings:option:data_long"> <input type="hidden" name="Products[&mvt:group:product:id;]:attributes[&mvte:group:option_counter;]:value" value="&mvte:option:data_long;"> </mvt:if> </mvt:foreach> </mvt:foreach> <input type="submit" value="Re-Order All"> </form>
Comment