Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/templates/edit_product_form.tpl
{if $msg_pro==""}{else}
<div style="clear:both; padding:10px;"></div>
<span id="msg_small">{$msg_pro}</span>
<div style="clear:both; padding:10px;"></div>{/if}
<form method="post" name="edit_product_form" enctype="multipart/form-data" id="irForm">
{section name=selected_product loop=$selected_product}
<div id="demo" class="yui-navset">
<div style="clear:both;"></div>
    <ul class="yui-nav" style="font-size:11px;">
        <li class="selected"><a href="#tab1"><em>General Info</em></a></li>
        <li><a href="#tab2"><em>Brand &amp; Categories</em></a></li>
        <li><a href="#tab3"><em>Type</em></a></li>
        <li><a href="#tab4"><em>Product Attributes</em></a></li>
        <li><a href="#tab5"><em>Variants &amp; Stock</em></a></li>
        <li><a href="#tab6"><em>Images</em></a></li>

    </ul>            
    <div class="yui-content" style="background-color:#F3F3F3">
      <div><table width="100%" border="0" cellspacing="0" cellpadding="0" id="irForm">
  
  <tr>
    <td width="151">Product Name</td>
    <td><input id="product_name" name="product_name" type="text" value="{$selected_product[selected_product].product_name}"  /><input type="hidden" name="product_id" id="product_id" value="{$selected_product[selected_product].product_id}" /></td>
  </tr>
  <tr>
    <td>Product Code (SKU)</td>
    <td><input id="product_code" name="product_code" type="text" value="{$selected_product[selected_product].product_code}"  ></td>
  </tr>
   <tr>
    <td>Product Status</td>
    <td><input id="product_status" name="product_status" type="radio" value="online" {if $selected_product[selected_product].product_status=="online"} checked="checked"{/if}> Online <input id="product_status" name="product_status" type="radio" value="offline" {if $selected_product[selected_product].product_status=="offline"} checked="checked"{/if}> Offline</td>
  </tr>
    <tr>
    <td>Taxable</td>
    <td><input id="taxable" name="taxable" type="radio" value="yes" {if $selected_product[selected_product].taxable=="yes"} checked="checked"{/if}> Yes <input id="taxable" name="taxable" type="radio" value="no" {if $selected_product[selected_product].taxable=="no"} checked="checked"{/if}> No</td>
  </tr>
  <tr>
    <td height="95">Product Description</td>
    <td><textarea name="product_description" cols="60" rows="5" id="product_description" class="irTextarea" >{$selected_product[selected_product].product_description}</textarea></td>
  </tr>
  <tr>
    <td height="99">Product Features</td>
    <td><textarea name="product_overview" cols="60" rows="5" id="product_overview" class="irTextarea" >{$selected_product[selected_product].product_overview}</textarea></td>
  </tr>
  <tr>
    <td>Product Price $</td>
    <td><div style="padding:5px; background-color:#D6D6D6; border:1px solid #ccc; width:400px;">$<input id="product_price" name="product_price" type="text" value="{$selected_product[selected_product].product_price}"  ><br />
Now $<input id="product_deal_price" name="product_deal_price" type="text" value="{$selected_product[selected_product].product_deal_price}">
    (Use this if you want to create special offer e.g. Was <span style="text-decoration:line-through;">$19.99</span> <strong>Now $15.99</strong>)</div></td>
  </tr>
  
  <tr>
    <td>Featured</td>
    <td>{if $selected_product[selected_product].is_featured=="yes"}<input id="is_featured" name="is_featured" type="radio" value="yes" checked="checked"> Yes <input id="is_featured" name="is_featured" type="radio" value="no"> No{else}<input id="is_featured" name="is_featured" type="radio" value="yes"> Yes <input id="is_featured" name="is_featured" type="radio" value="no" checked="checked"> No{/if}</td>
  </tr>
  <tr>
    <td>Clearence</td>
    <td>{if $selected_product[selected_product].is_clearence=="yes"}<input id="is_clearence" name="is_clearence" type="radio" value="yes" checked="checked"> Yes <input id="is_clearence" name="is_clearence" type="radio" value="no"> No{else}<input id="is_clearence" name="is_clearence" type="radio" value="yes"> Yes <input id="is_clearence" name="is_clearence" type="radio" value="no" checked="checked"> No{/if}</td>
  </tr>
  <tr>
    <td>New Arrival</td>
    <td>{if $selected_product[selected_product].is_new=="yes"}<input id="is_new" name="is_new" type="radio" value="yes" checked="checked"> Yes <input id="is_new" name="is_new" type="radio" value="no"> No{else}<input id="is_new" name="is_new" type="radio" value="yes"> Yes <input id="is_new" name="is_new" type="radio" value="no" checked="checked"> No{/if}</td>
  </tr>
  <tr>
    <td>On Special</td>
    <td>{if $selected_product[selected_product].is_special=="yes"}<input id="is_special" name="is_special" type="radio" value="yes" checked="checked"> Yes <input id="is_special" name="is_special" type="radio" value="no"> No{else}<input id="is_special" name="is_special" type="radio" value="yes"> Yes <input id="is_special" name="is_special" type="radio" value="no" checked="checked">No{/if}</td>
  </tr>
  <tr>
    <td>Tags<br />
Please enter product tags or common prases separated by coma (,). This will gives better search results</td>
    <td><textarea id="tags" name="tags" cols="60"  rows="5" class="irTextarea" >{$selected_product[selected_product].tags}</textarea><br />
     <div id="available_tags_box">{include file="available_tags.tpl"}</div>
    </td>
  </tr>
  </table></div>
  <div><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" class="section_header"><img src="images/icons/images.png" title="Brand" align="absmiddle" /> Product Brand</td>
  </tr>
  <tr>
    <td>Brand</td>
    <td><div id="update_brand_box" style="width:80%; float:left;">{include file="edit_brand_select_box.tpl"}</div></a>
</td>
  </tr>
  <tr>
    <td colspan="2" class="section_header"><img src="images/icons/bricks.png" title="Categories" align="absmiddle" /> Product Category</td>
  </tr>
  <tr>
    <td colspan="2"><div id="update_cat_box" style="width:100%; border:1px solid #ccc; float:left; height:300px; overflow:auto;">{include file="edit_category_select_box.tpl"}</div><div id="inline_add_cat_box" style="display:none;">{include file="inline_add_cat_form.tpl"}</div>
</td>
  </tr></table></div>
  <div><table width="100%" border="0" cellspacing="0" cellpadding="0">

  <!-- <tr>
    <td colspan="2"><input id="stock_variant_group_id" name="stock_variant_group_id" type="hidden" value="{$stock_variant_group_id}" /><input id="variant_level_stock" name="variant_level_stock" type="checkbox" value="yes" {if $selected_product[selected_product].variant_level_stock=="yes"} checked="checked" {/if} /> Do you want to allow stock management at product variant level? <img src="images/icons/help.png" title="Help" align="absmiddle" /></td>
  </tr>
  <tr>
    <td colspan="2"><br />The following variant group is available for variant level stock management</td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">{include file="edit_stock_level_variant.tpl"}</td>
  </tr>
  -->
   <tr>
    <td width="151">Product Type</td>
    <td>
    <select id="product_type" name="product_type">
    	<option value="physical" {if $selected_product[selected_product].product_type=="physical"} selected="selected"{/if} >Physical</option>
        <option value="service" {if $selected_product[selected_product].product_type=="service"} selected="selected"{/if}>Service</option>
        <!-- <option value="downloadable" {if $selected_product[selected_product].product_type=="downloadable"} selected="selected"{/if}>Digital / Downladable</option>-->
    </select></td>
  </tr>
  </table></div>
  <div><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" class="section_header"><img src="images/icons/color_swatch.png" title="Attributes" align="absmiddle" /> Product Attributes</td>
  </tr>
  <tr>
    <td colspan="2"><div id="update_list_attribute_value_box">
{include file='edit_list_attribute_set_values.tpl'}
</div>

<div id="inline_add_attribute_box" style="display:none;">{include file="inline_add_attribute_form.tpl"}</div>
</td>
  </tr>
</table></div>
    <div><table width="100%" border="0" cellspacing="0" cellpadding="0">
   
   <tr>
    <td colspan="2"><div style="clear:both; padding:10px;"></div>
    Product Variants <span class="text_btn">[&larr;] <a href="manage_variants.php" onclick="return confirm('Are you sure that you want to leave this page and go to manage variants page? You could later add more variants by editing this product next time.');">Manage Variants</a></span>
    <div style="clear:both; padding:10px;"></div></td>
  </tr>

   <tr>
    <td class="section_header" colspan="2"><img src="images/icons/database_add.png" title="Quantity" align="absmiddle" /> Variants and Stock Options</td>
  </tr>
  
  <tr>
    <td width="151">Stock Options</td>
    <td>
    
    <select id="stock_options" name="stock_options" onchange="showStockBoxes(this.value)">
    <option value="no_stock_level" {if $selected_product[selected_product].stock_options=="no_stock_level"}selected="selected"{/if}>Do not use stock levels</option>
    <option value="product_based_stock_level" {if $selected_product[selected_product].stock_options=="product_based_stock_level"}selected="selected"{/if}>Use Product-based stock levels</option>
    <option value="variant_based_stock_level" {if $selected_product[selected_product].stock_options=="variant_based_stock_level"}selected="selected"{/if}>Use Variant-based stock levels</option>
    </select>
    </td>
  </tr>
  <tr id="availability_box" style="display:none;">
    <td width="151">Availability</td>
    <td>
    <select id="availability" name="availability">
    <option value="in_stock" {if $selected_product[selected_product].availability=="in_stock"}selected="selected"{/if}>In Stock</option>
    <option value="not_in_stock" {if $selected_product[selected_product].availability=="not_in_stock"}selected="selected"{/if}>Not In Stock</option>
    </select>
    </td>
  </tr>
  <tr id="current_stock_level_box" style="display:none;">
    <td width="151">Current Stock Level</td>
    <td><input id="product_qty" name="product_qty" type="text"  size="10" value="{$selected_product[selected_product].product_qty}" /></td>
  </tr>
   <tr>
    <td colspan="2">
</td>
  </tr>
  
  <tr id="variant_list_stock_heading" style="display:none;">
    <td class="section_header" colspan="2"><img src="images/icons/wrench.png" title="Variants" align="absmiddle" /> Select Variant to Stock</td>
  </tr>
  <!-- 
  <tr>
    <td colspan="2"><input id="variant_level_stock" name="variant_level_stock" type="checkbox" value="yes" /> Allow stock management at variant level?
</td>
  </tr>
  
  -->
  
  
  <tr id="variant_list_stock_box" {if $selected_product[selected_product].stock_variant_group_id!=-1} style="display:;" {else}style="display:none;"{/if}>
    <td width="151">Select variant to stock</td>
    <td>
    {include file="edit_list_variants_for_stock.tpl"}
    </td>
  </tr>
  
  <tr>
    <td class="section_header" colspan="2"><img src="images/icons/tag_blue.png" title="Variants" align="absmiddle" /> Select Product Variants</td>
  </tr>
  <tr>
    <td colspan="2"><div id="product_variant_box">{include file="edit_add_product_list_variants.tpl"}</div></td>
  </tr>
  
  </table></div>
  <div><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" class="section_header"><img src="images/icons/photos.png" title="Images" align="absmiddle" /> Product Images</td>
  </tr>
  <tr>
    <td colspan="2"><div id="product_images_box">
{include file='list_all_product_images.tpl'}
</div></td>
  </tr>
    <tr>
    <td colspan="2" class="section_header"><img src="images/icons/photos.png" title="Images" align="absmiddle" /> Upload more images</td>
  </tr>
  <tr>
    <td colspan="2"><div id="update_list_image_upload">
{include file='list_image_upload.tpl'}
</div></td>
  </tr>
  
</table></div>   
</div>
</div> 

{literal}
<script>
(function() {
    var tabView = new YAHOO.widget.TabView('demo');

    YAHOO.log("The Form has finished loading; as you interact with it, you'll see log messages appearing here.", "info", "form");

})();


</script>
{/literal} 
  
<input name="btn_edit" id="btn_edit" type="submit" value="Save" class="irBtnSave" />

</form>
{/section}
Return current item: Simple PHP Shopping cart - asaancart