Page MenuHomeIn-Portal Phabricator

order_product_edit.tpl
No OneTemporary

File Metadata

Created
Fri, Sep 26, 12:41 AM

order_product_edit.tpl

<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_product_edit"/>
<inp2:m_SetParam use_grid="0"/>
<inp2:m_if check="p_ShouldListOptions">
<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
<inp2:m_SetParam use_grid="1"/>
</inp2:m_if>
</inp2:m_if>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
if (Grids['poc']) {
if (Grids['poc'].SelectedCount == 0) {
return;
}
set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
}
submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('orditems','OnCancel');
}
) );
<inp2:m_if check="m_Param" name="use_grid">
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
</inp2:m_if>
a_toolbar.Render();
</script>
</td>
<inp2:m_if check="m_Param" name="use_grid">
<inp2:m_RenderElement name="search_main_toolbar" prefix="poc" grid="Radio"/>
</inp2:m_if>
</tr>
</tbody>
</table>
<inp2:m_if check="p_ShouldListOptions">
<input type="hidden" name="p_id" value="<inp2:p_Field name='ProductId'/>">
<inp2:m_if check="p_OptionsHaveError">
<inp2:m_RenderElement design="form_message" pass_params="1">
<inp2:p_OptionsError required="lu_comm_OptionsRequired" not_available="lu_comm_OptionsNotAvailable"/>
</inp2:m_RenderElement>
</inp2:m_if>
<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
<script type="text/javascript">
function edit() {
set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
}
</script>
<inp2:m_DefineElement name="combination_option_element">
<strong><inp2:m_Param name="option_name" />: </strong>
<inp2:m_Param name="option_value" /><inp2:m_if check="m_ParamEquals" param="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_combination_td">
<inp2:ShowCombination render_as="combination_option_element"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc" IdField="CombinationId" grid="Radio"/>
<inp2:m_else/> <!-- Selectable options -->
<inp2:m_DefineElement name="option_select_element">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_cb_element">
<input type="checkbox" <inp2:m_param name="selected"/>
name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>][]"
id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
value="<inp2:m_param name="id"/>" />
<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
</label>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_radio_element">
<input type="radio" <inp2:m_param name="selected"/>
name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"
id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
value="<inp2:m_param name="id"/>" />
<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
</label>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="error">*</span></inp2:m_if>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<inp2:m_if check="FieldEquals" field="OptionType" value="1"> <!-- drop-down -->
<select name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]">
<option value=""></option>
<inp2:ShowOptions render_as="option_select_element" currency="selected" preselect_first="1"/>
</select>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="5"> <!-- editbox -->
<input type="text" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]" value="<inp2:OptionData/>"/>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="4"> <!-- textarea -->
<textarea cols="50" rows="5" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"><inp2:OptionData/></textarea>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="6"> <!-- checkboxeS -->
<inp2:ShowOptions render_as="option_cb_element" currency="selected"/>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="3"> <!-- radio buttons -->
<inp2:ShowOptions render_as="option_radio_element" currency="selected" preselect_first="1"/>
</inp2:m_if>
</td>
</tr>
</inp2:m_DefineElement>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="lu_comm_SelectOptions"/>
<inp2:p_ListOptions no_table="1" per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
</inp2:m_if>
<inp2:m_else/>
Product Doesn't Use Options.
</inp2:m_if>
<inp2:m_include t="incs/footer"/>

Event Timeline