<?php  $this->load->view('site/templates/commonheader'); $this->load->view('site/templates/shop_header');
 $AttrVal=$edit_attr_details->result_array();  

?> <?php  //echo $edit_attr_check[1]['attr_options']; die;?>
<link rel="stylesheet" href="css/jquery.tagbox.css" />
<script type="text/javascript" src="js/jquery.tagbox.js"></script>
<script type="text/javascript" src="js/site/add_shop_listitems.js"></script>
<script type="text/javascript">
	jQuery(function() {
		jQuery("#jquery-tagbox-tags").tagBox();
		jQuery("#jquery-tagbox-materials").tagBox();
	});
</script>
<div class="add_shop">
<div class="main">
<form name="common_list" action="site/product/add_shop_product" method="post">
                <div class="shop_details">
                    <span class="shop_title"><?php if($this->lang->line('shop_listitem') != '') { echo stripslashes($this->lang->line('shop_listitem')); } else echo 'List an Item'; ?></span>                
                    <div class="list_div">
                        <div class="list_inner_fields">
                            <label id="about_fields"><?php if($this->lang->line('shop_aboutitem') != '') { echo stripslashes($this->lang->line('shop_aboutitem')); } else echo 'About this Item'; ?></label>
                         <div class="list_inner_right list_small_width" style="margin-right: 10px;">
                                <p><?php if($this->lang->line('shop_whomade') != '') { echo stripslashes($this->lang->line('shop_whomade')); } else echo 'Who made it'; ?>? </p>
                                <select name="about_item" id="about_item">
                                    <option value=""><?php if($this->lang->line('shop_selectmaker') != '') { echo stripslashes($this->lang->line('shop_selectmaker')); } else echo 'Select a maker'; ?>...</option>
                                    <option value="1" <?php if($edit_item_detail->row()->made_by == 1){ echo 'selected="selected"'; } ?> ><?php if($this->lang->line('shop_idid') != '') { echo stripslashes($this->lang->line('shop_idid')); } else echo 'I did'; ?></option>
                                    <option value="2"  <?php if($edit_item_detail->row()->made_by == 2){ echo 'selected="selected"'; } ?> ><?php if($this->lang->line('shop_membershop') != '') { echo stripslashes($this->lang->line('shop_membershop')); } else echo 'A member of my shop'; ?></option>
                                    <option value="3"  <?php if($edit_item_detail->row()->made_by == 3){ echo 'selected="selected"'; } ?> ><?php if($this->lang->line('shop_company') != '') { echo stripslashes($this->lang->line('shop_company')); } else echo 'Another company or person'; ?></option>
                                </select>
                            </div>
                            
                            <div class="list_inner_right list_small_width" id="What_is"  style="display:block">
                           <p><?php if($this->lang->line('shop_whatisit') != '') { echo stripslashes($this->lang->line('shop_whatisit')); } else echo 'What is it'; ?>?</p>                
                              <select name="what_item" id="what_item">
                                  <option value=""><?php if($this->lang->line('shop_selectuse') != '') { echo stripslashes($this->lang->line('shop_selectuse')); } else echo 'Select a use'; ?>...</option>
                                 <option value="1"  <?php if($edit_item_detail->row()->product_condition == 1){ echo 'selected="selected"'; } ?> ><?php if($this->lang->line('shop_finishedproduct') != '') { echo stripslashes($this->lang->line('shop_finishedproduct')); } else echo 'A finished product'; ?></option>
                                 <option value="2"  <?php if($edit_item_detail->row()->product_condition == 2){ echo 'selected="selected"'; } ?> ><?php if($this->lang->line('shop_supplytool') != '') { echo stripslashes($this->lang->line('shop_supplytool')); } else echo 'A supply or tool to make things'; ?></option>
                             </select>
                          </div>
                            
                            <div class="list_inner_right list_small_width" id="When_is" style="display:block">
                             <p id="when_option_p"><?php if($this->lang->line('shop_whenmade') != '') { echo stripslashes($this->lang->line('shop_whenmade')); } else echo 'when did u made it'; ?>?</p>                
                              <select name="when_made" id="when_made">
                                  <option><?php if($this->lang->line('shop_madewhen') != '') { echo stripslashes($this->lang->line('shop_madewhen')); } else echo 'made when'; ?>..</option>
                                  <option selected="selected"><?php echo $edit_item_detail->row()->maked_on; ?></option>
                                  <optgroup  label="Not yet made">
                                                       <option value="made_to_order" ><?php if($this->lang->line('shop_madeorder') != '') { echo stripslashes($this->lang->line('shop_madeorder')); } else echo 'Made to order'; ?></option>
                                  </optgroup>
                                  <optgroup  label="Recently">
                                                        <option value="2010,2014">2010  - 2014</option>
                                                        <option value="2000,2009">2000  - 2009</option>
                                                        <option value="1995,1999">1995  - 1999</option>
                                   </optgroup>
                                  <optgroup  label="Vintage">
                                                        <option value="0,1994"><?php if($this->lang->line('shop_sometimebefore') != '') { echo stripslashes($this->lang->line('shop_sometimebefore')); } else echo 'Sometime before'; ?> 1995</option>
                                                        <option value="1990,1994">1990  - 1994</option>
                                                        <option value="1980,1989">1980s</option>
                                                        <option value="1970,1979">1970s</option>
                                                        <option value="1960,1969">1960s</option>
                                                        <option value="1950,1959">1950s</option>
                                                        <option value="1940,1949">1940s</option>
                                                        <option value="1930,1939">1930s</option>
                                                        <option value="1920,1929">1920s</option>
                                                        <option value="1910,1919">1910s</option>
                                                        <option value="1900,1909">1900 - 1909</option>
                                                        <option value="1800,1899">1800s</option>
                                                        <option value="1700,1799">1700s</option>
                                                        <option value="0,1699"><?php if($this->lang->line('shop_before') != '') { echo stripslashes($this->lang->line('shop_before')); } else echo 'Before'; ?> 1700</option>
                                   </optgroup>
                             </select>
                         </div>
                        </div> <?php $CatId=explode(',',$edit_item_detail->row()->category_id);?>
                        <div class="list_inner_fields">
                            <label id="category_fields"><?php if($this->lang->line('shop_categories') != '') { echo stripslashes($this->lang->line('shop_categories')); } else echo 'Categories'; ?></label>
                            <div class="list_inner_right list_small_width">
                                <p><?php if($this->lang->line('shop_whatisit') != '') { echo stripslashes($this->lang->line('shop_whatisit')); } else echo 'What is it'; ?>?</p>
                                <select name="main_cat_id" id="main_cat_id">
                                    <option value=""><?php if($this->lang->line('shop_selectcategory') != '') { echo stripslashes($this->lang->line('shop_selectcategory')); } else echo 'Select a category'; ?></option>
                           
                                    <?php foreach($mainCategories->result() as $MaincatValues) {?>
                              <?php // if( $CatId[0] == $MaincatValues->id){  echo '<option selected="selected" value="'.$MaincatValues->id.'">'.$MaincatValues->cat_name.'</option>'; }?>
                     <option <?php if($MaincatValues->id == $CatId[0]) {  echo 'selected="selected" value='.$CatId[0]; } else { echo 'value='.$MaincatValues->id; }?>><?php echo $MaincatValues->cat_name;?></option> <?php }?>
                                </select>
                                
                                
                            </div> 
                            <div class="list_inner_right list_small_width" style="display:none" id="level1_sub_cat_loading">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? </p> </br>
                            <div id="loader1" class="list_inner_right"><img src="images/ajax_loading.gif" alt="loading subcategory" /></div>
                             </div>
                            
                            
                            
                            <?php if(sizeof($SubCatId1) != 0 ) {?>
                            <div class="list_inner_right list_small_width" id="level1_sub_cat_result" style="display:block">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? <span class="optional"><?php if($this->lang->line('shop_optional') != '') { echo stripslashes($this->lang->line('shop_optional')); } else echo 'optional'; ?></span></p>
                                <select id="level1_sub_cat" name="level1_sub_cat">
                                    <option value=""><?php if($this->lang->line('shop_selectcategory') != '') { echo stripslashes($this->lang->line('shop_selectcategory')); } else echo 'Select a category'; ?></option>
             <?php foreach($SubCatId1 as $subCat1) { ?>
             <option <?php if($subCat1->id == $CatId[1]) {  echo 'selected="selected" value='.$CatId[1]; } else { echo 'value='.$subCat1->id; }?>><?php echo $subCat1->cat_name;?>
             </option> <?php }?>
                                </select>
                            </div>
                            <?php } else {?>
                            <div class="list_inner_right list_small_width" style="display:none" id="level1_sub_cat_result">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? <span class="optional"><?php if($this->lang->line('shop_optional') != '') { echo stripslashes($this->lang->line('shop_optional')); } else echo 'optional'; ?></span></p>
                                <select id="level1_sub_cat" name="level1_sub_cat">
                                    <option value=""><?php if($this->lang->line('shop_selectcategory') != '') { echo stripslashes($this->lang->line('shop_selectcategory')); } else echo 'Select a category'; ?></option>
                                   
                                </select>
                            </div>
                            <?php }?>
                            
                            
                            <div class="list_inner_right list_small_width" style="display:none" id="level2_sub_cat_loading">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? </p> </br>
                            <div id="loader2" class="list_inner_right"><img src="images/ajax_loading.gif" alt="loading subcategory" /></div>
                             </div>
                             
                             
                             <?php if(sizeof($SubCatId2) != 0) {?>
                            <div class="list_inner_right list_small_width" id="level2_sub_cat_result" style="display:block">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? <span class="optional"><?php if($this->lang->line('shop_optional') != '') { echo stripslashes($this->lang->line('shop_optional')); } else echo 'optional'; ?></span></p>
                                <select id="level2_sub_cat" name="level2_sub_cat">
                                    <option value=""><?php if($this->lang->line('shop_selectcategory') != '') { echo stripslashes($this->lang->line('shop_selectcategory')); } else echo 'Select a category'; ?></option>
             <?php foreach($SubCatId2 as $subCat2) { ?>
             <option <?php if($subCat2->id == $CatId[2]) {  echo 'selected="selected" value='.$CatId[2]; } else { echo 'value='.$subCat2->id; }?>><?php echo $subCat2->cat_name;?>
             </option> <?php }?>
                                </select>
                            </div>
                            <?php } else {?>
                             <div class="list_inner_right list_small_width" style="display:none" id="level2_sub_cat_result">
                                <p><?php if($this->lang->line('shop_whattype') != '') { echo stripslashes($this->lang->line('shop_whattype')); } else echo 'What type'; ?>? <span class="optional"><?php if($this->lang->line('shop_optional') != '') { echo stripslashes($this->lang->line('shop_optional')); } else echo 'optional'; ?></span></p>
                                <select id="level2_sub_cat" name="level2_sub_cat">
                                    <option value=""><?php if($this->lang->line('shop_selectcategory') != '') { echo stripslashes($this->lang->line('shop_selectcategory')); } else echo 'Select a category'; ?></option>
                                   
                                </select>
                            </div>
							<?php }?>
                            </div>
                            
                             
                           <div class="list_inner_fields_1">
                            <div class="msg_alert" id="msg_alert1">
                                <span class="msg_alert_new"><?php if($this->lang->line('shop_new') != '') { echo stripslashes($this->lang->line('shop_new')); } else echo 'NEW'; ?></span>
                                <p><?php if($this->lang->line('shop_downloadable') != '') { echo stripslashes($this->lang->line('shop_downloadable')); } else echo 'You can now add downloadable files to your listing! Files will be available once payment is confirmed'; ?>. </p>
                                <a href="javascript:void(0)" class="close_icon" onclick="return hid_msg('msg_alert1')"></a>
                            </div>
                            <label class="item_type_label"><?php if($this->lang->line('shop_itemtype') != '') { echo stripslashes($this->lang->line('shop_itemtype')); } else echo 'Item type'; ?></label>
                            <div class="item_type" >
                                <input type="radio" value="physical" name="item_name" id="physical_item"  style="float:none;" onclick="return dis_val('variation_wrapper')" 
                                <?php if($edit_digital_check[0]['digital_item'] == '' ) { echo 'checked="checked"'; }?>/>
                                <label for="physical_item"  style="float:none;"><?php if($this->lang->line('shop_physical') != '') { echo stripslashes($this->lang->line('shop_physical')); } else echo 'Physical item'; ?></label>
                                <input type="radio" value="digital"  name="item_name" id="digital_item"  style="float:none;" onclick="return dis_val('file_wrapper')"
                                <?php if($edit_digital_check[0]['digital_item'] != '' ) { echo 'checked="checked"'; }?>/>
                                <label for="digital_item"  style="float:none;"><?php if($this->lang->line('shop_digitalfile') != '') { echo stripslashes($this->lang->line('shop_digitalfile')); } else echo 'Digital file'; ?></label>
                            </div>
                        </div>
                           
                        </div>
                    <!--  Variation Starts here  -->                 
                </div>
				
				<?php if($edit_attr_check[0]['attr_name'] != '' ) {?>
                <div class="shop_details">                
                <!-----VARIATION EXISTS START------>      
                <div class="list_div" id="variation_wrapper">
                	<div class="list_inner_fields" style="border-bottom:none;">
                    	<label><?php if($this->lang->line('shop_variations') != '') { echo stripslashes($this->lang->line('shop_variations')); } else echo 'Variations'; ?></label><span><?php if($this->lang->line('shop_availableoptions') != '') { echo stripslashes($this->lang->line('shop_availableoptions')); } else echo 'Add Variations to your listing to highlight available options for buyers'; ?>. </span>
                    </div> 
                    <!--  Variation One Starts here LEVEL 1 VARIATION --> 
                    <?php  if($edit_attr_check[0]['attr_name'] != '') {?>                    
                    <div class="list_inner_fields">
                    	<label>&nbsp;</label> 
                        <div class="list_inner_right list_small_width" >
                        <select id="property_level" class="vari_option" style="display:none;">
                            	<option value=""><?php if($this->lang->line('shop_availableproperty') != '') { echo stripslashes($this->lang->line('shop_availableproperty')); } else echo 'Select available property'; ?>...</option>
                             	<?php foreach($variations_result as $variations) {?>   
                                <option value="<?php echo $variations->attr_seourl; ?>"><?php echo $variations->attr_name; ?></option> 
								<?php }?>             
                            </select> 
                            <p id="have_scalling" style="display:none;"></p>
                        </div>
                        <div class="list_inner_right list_small_width" id="variations_level_div">
                            <label id="selected_variation"><?php echo $edit_attr_check[0]['attr_name'];?></label>
                            <input type="hidden" value="<?php echo $edit_attr_check[0]['attr_name'];?>" name="exist_property_level"/>
                           
                        </div>
                        <div id="variation_one">
                        	<div style="float:right;">
                            	<a href="javascript:void(0)" onclick="return clear_data();" id="close_var_one" style="display:block;" class="close_icon"></a>
                            </div>
                            <div class="list_inner_right list_small_width" id="attr_loader" style="display:none">
                            	<img src="images/ajax_loading.gif" alt="loading variations" />
                            </div>
                            <div class="list_inner_right list_small_width" id="options_level" name="options_level">
                            
                            
                            
                  <?php     $optionsVal1=explode(',',$edit_attr_check[0]['attr_options']);
				   
				    if($edit_attr_check[0]['attr_options'] != ''){ ?>
				 
				       <select id="attr_options" onchange="return alpha_check(this);" <?php if($edit_attr_check[0]['attr_scale'] == '' && $edit_attr_check[0]['scaling_option'] == 'Yes') { echo 'disabled="disabled"'; } ?>>
				       <option value=""><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
		              <?php  foreach($optionsVal1 as $variations) {?>
		        	                           <option <?php if($edit_attr_check[0]['attr_scale']==$variations){ echo 'selected="selected"';} ?> ><?php echo $variations; ?></option>
											   <?php } ?>
                                
                                       </optgroup>
                            <!--<optgroup label="Could not find a property">
                                <option >Add a new option</option>
                            </optgroup>--> </select>
							
						<?php	if($edit_attr_check[0]['scaling_option'] == 'Yes' && $edit_attr_check[0]['attr_scale'] != '')
							{
								//echo '<div style="display:block;" id="add_textbox_button"><br><br><span class="opition-offer" >Enter the options you offer. </span>';
								?>
                                <div style='display:block;' id='add_textbox_button'><br><br>
                                <span class='opition-offer' ><?php if($this->lang->line('shop_enteroptions')!='') { echo stripslashes($this->lang->line('shop_enteroptions'));} else { echo 'Enter the options you offer'; }?>. </span>			
			<input id="option_value" type="text"  style="float:left; width:120px; height:10px;  font-size:12px; color:#333; padding:5px 6px;"/>
            <input type="button" class="add_button" value="<?php if($this->lang->line('user_add')!="") { echo stripslashes($this->lang->line('user_add')); } else { echo "Add"; } ?>" onclick="return add_options_with_scal();"/>
            </div>
								<script>$("#have_scalling").html("Yes");</script>
							<?php }
							else
							{		
							?>
								<script>$("#have_scalling").html("No");</script>
                            <?php   
							}
				  
				   } else {
					   ?> 
                       <div id='add_textbox_button'><br><br>
                       <span class='opition-offer' ><?php if($this->lang->line('shop_enteroptions')!='') { echo stripslashes($this->lang->line('shop_enteroptions'));} else { echo 'Enter the options you offer'; } ?>. </span>
		   <input id="option_value" type="text"  style="float:left; width:120px; height:10px;  font-size:12px; color:#333; padding:5px 6px;"/><input type="button" class="add_button" value="<?php if($this->lang->line('user_add')!="") { echo stripslashes($this->lang->line('user_add')); } else { echo "Add"; } ?>" onclick="return add_options_without_scale();"/></div>
           <?php         
				  }
           ?>    
                            
                            </div>
                            <div class="list_inner_right list_small_width" id="attr_options_val" name="attr_options_val" 
	<?php if($edit_attr_check[0]['scaling_option'] == "Yes" && $edit_attr_check[0]['attr_scale'] == '') { echo 'style="display:block"';} else { echo 'style="display:none"';}?>>
                                <select onchange="return alpha_check(this);" id="checked_alpha_value" class="alpha_value_one">
                                    <option value=""><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
                                    <option>XXS</option>
                                    <option>XS</option>
                                    <option>S</option>
                                    <option>M</option>
                                    <option>L</option>
                                    <option>XL</option>
                                    <option>XXL</option>
                                    <option>3XL</option>
                                    <option>4XL</option>
                                    <option>5XL</option>                               
                                    <!--<optgroup label="Couldn't find a property">
                                        <option >Add a new option</option>
                                    </optgroup>-->
                                </select>
                            </div>
                            <div class="list_inner_fields" style="border-bottom:none;">
                                <label>&nbsp;</label> 
                                <div class="list_inner_right" id="options_table">
                                <center><img src="images/ajax-loader/ajax-loader(14).gif" alt="Adding variations" style="display:none;" id="variation_add_loading1" /></center><br />
                                	<table width="100%" class="inner_table"  align="center" cellpadding="0" cellspacing="0" id="options_list">              
                                        <tbody>
                                            <tr style="background:#E9F6FC; margin: 0px; padding: 10px; width: 97%;">
                                               <td width="20%" ><strong><?php if($this->lang->line('shop_options') != '') { echo stripslashes($this->lang->line('shop_options')); } else echo 'Options'; ?></strong></td>
                                               <td width="20%">
                                                    <span class="non-pricing-mode">
                                                    <?php        
					   								//if($Value1['attr_name'] == $edit_attr_check[0]['attr_name']) { $Checkprice=''; }?>
                                                    <?php if($edit_attr_check[0]['pricing'] != ''){ $Price='Remove Pricing'; $SHow="block"; } else {$Price='Add Pricing'; $SHow="none"; }?>
                                                        <a href="javascript:void(0)" class="enable-variations-pricing" id="price_opt" onclick="price_opt_click();"><?php echo $Price;?></a>
                                                    </span>
                                                    <span class="pricing-mode retail">
                                                        <a href="#variations-section" class="disable-variations-pricing remove button-remove"></a>
                                                           <!--<span class="price-header-label retail">
                                                                  Price
                                                            <small>USD</small>
                                                        </span>-->
                                                    </span>
                                                </td>
                                               <td  width="20%" ><strong><?php if($this->lang->line('shop_instock') != '') { echo stripslashes($this->lang->line('shop_instock')); } else echo 'In Stock'; ?></strong></td>
                                               <td  width="10%" ></td>
                                            </tr>
                        <?php $idval=time(); foreach($AttrVal as $Value1) {  
						$idval++;
						      
					if($Value1['attr_name'] == $edit_attr_check[0]['attr_name']) {	
					if($Value1['stock_status'] == 1){ $st=1;} else{$st=0;}
					echo  '<tr>
                           <td width="20%">'.$Value1['attr_value'].'&nbsp;<input type="hidden" value="'.$Value1['attr_value'].'" name="variation_value[]"/>';  ?>
                 <?php if($Value1['attr_name'] != '' && $Value1['attr_scale'] == '') { echo '<span></span>'; } else { echo '<span class=scale_change>'.$AttrVal[0]['attr_scale'].'</span>';
						 echo '<input type="hidden" class="scale_change_txt" value="'.$Value1['attr_scale'].'" name="variation_scale1"/>'; }?><?php echo '</td>
                            <td width="20%"><span class="price_box"  style="display:'.$SHow.'">$&nbsp;<input type="text" name="pricing[]" value="'.$Value1['pricing'].'" style="width:70px;" class="priceingbox"></span>&nbsp;</td>
                            <td width="20%"><input type="checkbox"  id="'.$idval.'" class="stock"  onchange="return stock_check(this);"';
							if($Value1['stock_status'] == 1){ echo ' checked="checked"';} echo '><input type="hidden" name="listing_variation[]" id="stock_opt_'.$idval.'" value="'.$st.'"></td>
                             <td width="10%"><a href="javascript:void(0)"  class="close_icon"></a></td>
                        </tr>';  } }?>
                                            
                                        </tbody>
                                	</table>
                                </div>   
                            </div> 
                        </div>
                      
                    </div>
                    <!--  Variation One Ends here  -->
                    <?php } if($edit_attr_check[1]['attr_name'] != '') {?>                     
                 	<!--  Variation Two Starts here  LEVEL 2 VARIATION -->
                    <div class="list_inner_fields">
                    	<label>&nbsp;</label> 
                        <div class="list_inner_right list_small_width">
                        <select id="property_level1" class="vari_option" style="display:none;">
                            	<option value=""><?php if($this->lang->line('shop_availableproperty') != '') { echo stripslashes($this->lang->line('shop_availableproperty')); } else echo 'Select available property'; ?>...</option>
                             	<?php foreach($variations_result as $variations) {?>   
                                <option value="<?php echo $variations->attr_seourl; ?>"><?php echo $variations->attr_name; ?></option> 
								<?php }?>             
                        </select>
                        <p id="have_scalling1" style="display:none;"></p>
                        </div>
                        <div class="list_inner_right list_small_width" id="variations_level_div1">
                           <label id="selected_variation1"><?php echo $edit_attr_check[1]['attr_name'];?></label>
                            <input type="hidden" value="<?php echo $edit_attr_check[1]['attr_name'];?>" name="exist_property_level1"/>                            
                          
                        </div>
                        <div id="variation_two">
                             <div style="float:right;">
                              	<a href="javascript:void(0)" onclick="return clear_data1();" id="close_var_two" style="display:block;" class="close_icon"></a>
                             </div>
                             <div class="list_inner_right list_small_width" id="attr_loader1" style="display:none">
                              	<img src="images/ajax_loading.gif" alt="loading variations" />
                             </div>
                             <div class="list_inner_right list_small_width" id="options_level1" name="options_level1">
                             
                             
                          <?php 
						  $optionsVal2=explode(',',$edit_attr_check[1]['attr_options']); 
						  
						   if($edit_attr_check[1]['attr_options'] != ''){ ?>
				  
				        <select id="attr_options1" onchange="return alpha_check1(this);" <?php if($edit_attr_check[1]['attr_scale'] == '' && $edit_attr_check[1]['scaling_option'] == 'Yes') { echo 'disabled="disabled"'; } ?> >
				        <option value=""><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
		                <?php foreach($optionsVal2 as $variations) { ?>
		        	                   
								<option <?php if($AttrVal[sizeof($AttrVal)-1]['attr_scale'] == $variations) { echo 'selected="selected"'; } ?>  ><?php echo $variations; ?></option>  
						<?php } ?>
                                
                          </optgroup>
                            <!--<optgroup label="Could not find a property">
                                <option >Add a new option</option>
                            </optgroup>--> </select>
							
						<?php if($edit_attr_check[1]['scaling_option'] == 'Yes' && $edit_attr_check[1]['attr_scale'] != '')
							{
								?>
                                <div style='display:block;' id='add_textbox_button1'><br><br>
                                <span class='opition-offer'><?php if($this->lang->line('shop_enteroptions')!='') { echo stripslashes($this->lang->line('shop_enteroptions'));} else { echo 'Enter the options you offer'; }?>. </span>
			<input id="option_value" type="text" style="float: left; height: 10px; font-size: 12px; color: rgb(51, 51, 51); padding: 8px 6px; width: 86px; margin: 4px 0px 0px;"><input class="add_button" type="button" onclick="return add_options_with_scal();" value="<?php if($this->lang->line('user_add')!="") { echo stripslashes($this->lang->line('user_add')); } else { echo "Add"; } ?>"></div>
								<script>$("#have_scalling1").html("Yes");</script>
							<?php }
							else
							{		?>
								<script>$("#have_scalling1").html("No");</script>  
							<?php }
				  
				   } else {
					  ?>
                      <div id='add_textbox_button1'><br><br><span class='opition-offer'><?php if($this->lang->line('shop_enteroptions')!='') { echo stripslashes($this->lang->line('shop_enteroptions'));} else { echo 'Enter the options you offer'; }?>. </span>";
		   <input id="option_value1" type="text"  style="float:left; width:120px; height:10px;  font-size:12px; color:#333; padding:5px 6px;"/>
           <input type="button" class="add_button" value="<?php if($this->lang->line('user_add')!="") { echo stripslashes($this->lang->line('user_add')); } else { echo "Add"; }?>" onclick="return add_options_without_scale1();"/>
           </div>
           </form>';
                          
				 <?php }  ?>
                             
                             
                             
                             </div>
                             <div class="list_inner_right list_small_width" id="attr_options_val1" name="attr_options_val1" 
							 <?php if($edit_attr_check[1]['scaling_option'] == "Yes" && $edit_attr_check[1]['attr_scale'] == '') { $sty='style="display:block"';} else { $sty='style="display:none"';} echo $sty; ?> >
                                    <select onchange="return alpha_check1(this);" id="checked_alpha_value1" class="alpha_value_two" <?php  echo $sty; ?>>
                                        <option value=""><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
                                        <option>XXS</option>
                                        <option>XS</option>
                                        <option>S</option>
                                        <option>M</option>
                                        <option>L</option>
                                        <option>XL</option>
                                        <option>XXL</option>
                                        <option>3XL</option>
                                        <option>4XL</option>
                                        <option>5XL</option>                               
                                        <!--<optgroup label="Couldn't find a property">
                                            <option >Add a new option</option>
                                        </optgroup>-->
                                    </select>
                              </div>
                             <div class="list_inner_fields" style="border-bottom:none;">
                                    <label>&nbsp;</label> 
                                    <div class="list_inner_right" id="options_table1">
                                    <center><img src="images/ajax-loader/ajax-loader(14).gif" alt="Adding variations" style="display:none;" id="variation_add_loading2" /></center><br />
                                        <table width="100%" class="inner_table"  align="center" cellpadding="0" cellspacing="0" id="options_list1">              
                                            <tbody>
                                            <tr style="background: none repeat scroll 0% 0% rgb(233, 246, 252); margin: 0px; padding: 10px; width: 96%;">
                                                   <td width="20%" ><strong><?php if($this->lang->line('shop_options') != '') { echo stripslashes($this->lang->line('shop_options')); } else echo 'Options'; ?></strong></td>
                                                   <td width="20%">
                                                        <span class="non-pricing-mode">&nbsp;
                                                        <!--<a href="javascript:void(0)" class="enable-variations-pricing" id="price_opt1" onclick="price_opt_click1();">Add Pricing</a>-->
                                                        </span>
                                                        <span class="pricing-mode retail">
                                                            <a href="#variations-section" class="disable-variations-pricing remove button-remove"></a>
                                                               <!--<span class="price-header-label retail">
                                                                      Price
                                                                <small>USD</small>
                                                            </span>-->
                                                        </span>
                                                    </td>
                                                   <td  width="20%" ><strong><?php if($this->lang->line('shop_instock') != '') { echo stripslashes($this->lang->line('shop_instock')); } else echo 'In Stock'; ?></strong></td>
                                                   <td  width="10%" ></td>
                                                </tr>
                                               
                                              <?php 
											  
											  $idval2=time(); foreach($AttrVal as $Value2) {
												  $idval2++;
      if($Value2['attr_name'] == $edit_attr_check[1]['attr_name']) {
		  if($Value2['stock_status'] == 1){ $st=1; $ch='checked="checked"';} else{$st=0; $ch='';}												  
											   echo ' <tr>
                            <td width="20%">'.$Value2['attr_value'].'&nbsp;<input type="hidden" value="'.$Value2['attr_value'].'" name="variation_value1[]"/>'; ?>
							<?php if($Value2['attr_name'] != '' && $Value2['attr_scale'] == '') { echo '<span></span>'; } else { echo '<span class=scale_change1>'.$Value2['attr_scale'].'</span><input type="hidden" class="scale_change_txt1" value="'.$Value2['attr_scale'].'" name="variation_scale2"/>'; }?> <?php echo '</td>
                            <td width="20%"><span class="price_box1" style="display:none">$&nbsp;<input type="text" name="pricing1[]" style="width:70px;" class="priceingbox1"></span>&nbsp;</td>
                            <td width="20%"><input type="checkbox" id="'.$idval2.'" class="stock" value="1" onchange="return stock_check(this);" '.$ch.'><input type="hidden" name="listing_variation1[]" id="stock_opt_'.$idval2.'" value="'.$st.'"></td>
                             <td width="10%"><a href="javascript:void(0)"  class="close_icon1"></a></td>
                        </tr>'; } }?>
                                                
                                               
                                            </tbody>
                                        </table>
                                    </div>   
                                </div>	                        
                        </div>
                    </div>                    
                    <?php  }
					else{
						?>
						<div class="list_inner_fields">
                    	<label>&nbsp;</label> 
                         <p id="have_scalling1" style="display:none;"></p>
                        <select id="property_level1" class="vari_option">
                                <option value=""><?php if($this->lang->line('shop_availableproperty') != '') { echo stripslashes($this->lang->line('shop_availableproperty')); } else echo 'Select available property'; ?>...</option>
                                <?php foreach($variations_result as $variations) {?>   
                                <option value="<?php echo $variations->attr_seourl; ?>"><?php echo $variations->attr_name; ?></option> 
                                <?php }?>
                                <!--<optgroup label="Couldn't find a property">
                                    <option >Add a new option</option>
                                </optgroup>-->
                            </select>
                        <div class="list_inner_right list_small_width" id="variations_level_div1">
                            
                           
                        </div>
                        <div id="variation_two">
                             <div style="float:right;">
                              	<a href="javascript:void(0)" onclick="return clear_data1();" id="close_var_two" style="display:none;" class="close_icon"></a>
                             </div>
                             <div class="list_inner_right list_small_width" id="attr_loader1" style="display:none">
                              	<img src="images/ajax_loading.gif" alt="loading variations" />
                             </div>
                             <div class="list_inner_right list_small_width" id="options_level1" name="options_level1" style="display:none"></div>
                             <div class="list_inner_right list_small_width" id="attr_options_val1" name="attr_options_val1" style="display:none">
                                    <select onchange="return alpha_check1(this);" id="checked_alpha_value1" class="alpha_value_two">
                                        <option value=""><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
                                        <option>XXS</option>
                                        <option>XS</option>
                                        <option>S</option>
                                        <option>M</option>
                                        <option>L</option>
                                        <option>XL</option>
                                        <option>XXL</option>
                                        <option>3XL</option>
                                        <option>4XL</option>
                                        <option>5XL</option>                               
                                        <!--<optgroup label="Couldn't find a property">
                                            <option >Add a new option</option>
                                        </optgroup>-->
                                    </select>
                              </div>
                             <div class="list_inner_fields" style="border-bottom:none;">
                                    <label>&nbsp;</label> 
                                    <div class="list_inner_right" id="options_table1" style="display:none">
                                        <table width="100%" class="inner_table"  align="center" cellpadding="0" cellspacing="0" id="options_list1">              
                                            <tbody>
                                                <tr>
                                                   <td width="20%" ><strong><?php if($this->lang->line('shop_options') != '') { echo stripslashes($this->lang->line('shop_options')); } else echo 'Options'; ?></strong></td>
                                                   <td width="20%">
                                                        <span class="non-pricing-mode">&nbsp;
                                                        <!--<a href="javascript:void(0)" class="enable-variations-pricing" id="price_opt1" onclick="price_opt_click1();">Add Pricing</a>-->
                                                        </span>
                                                        <span class="pricing-mode retail">
                                                            <a href="#variations-section" class="disable-variations-pricing remove button-remove"></a>
                                                               <!--<span class="price-header-label retail">
                                                                      Price
                                                                <small>USD</small>
                                                            </span>-->
                                                        </span>
                                                    </td>
                                                   <td  width="20%" ><strong><?php if($this->lang->line('shop_instock') != '') { echo stripslashes($this->lang->line('shop_instock')); } else echo 'In Stock'; ?></strong></td>
                                                   <td  width="10%" ></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>   
                                </div>	                        
                        </div>
                    </div>
				<?php	}
					
					?>
                    <!--  Variation Two Ends here  --> 
                </div>   
                <!-----VARIATION EXISTS END------>
             	</div>
                <?php } else  {?>
                <div class="shop_details">	  
                <div class="list_div" id="variation_wrapper" <?php if($edit_digital_check[0]['digital_item'] != '' ) { echo 'style="display:none"'; }?>>
                	<div class="list_inner_fields" style="border-bottom:none;">
                    	<label><?php if($this->lang->line('shop_variations') != '') { echo stripslashes($this->lang->line('shop_variations')); } else echo 'Variations'; ?></label><span><?php if($this->lang->line('shop_availableoptions') != '') { echo stripslashes($this->lang->line('shop_availableoptions')); } else echo 'Add Variations to your listing to highlight available options for buyers'; ?>. </span>
                    </div>
                    <!--  Variation One Starts here  --> 
                    <div class="list_inner_fields">
                    	<label>&nbsp;</label> <p id="have_scalling" style="display:none;"></p>
                         <select id="property_level" class="vari_option" name="property_level">
                            	<option value=""><?php if($this->lang->line('shop_availableproperty') != '') { echo stripslashes($this->lang->line('shop_availableproperty')); } else echo 'Select available property'; ?>...</option>
                             	<?php foreach($variations_result as $variations) {?>   <option value="<?php echo $variations->attr_seourl; ?>"><?php echo $variations->attr_name; ?></option> <?php }?>               
                                <!--<optgroup label="Couldn't find a property">
                                    <option >Add a new option</option>
                                </optgroup>-->
                            </select>
                        <div class="list_inner_right list_small_width" id="variations_level_div">
                           
                            
                        </div>
                        <div id="variation_one">
                        	<div style="float:right;">
                            	<a href="javascript:void(0)" onclick="return clear_data();" id="close_var_one" style="display:none;" class="close_icon"></a>
                            </div>
                            <div class="list_inner_right list_small_width" id="attr_loader" style="display:none"><img src="images/ajax_loading.gif" alt="loading variations" /></div>
                            <div class="list_inner_right list_small_width" id="options_level" name="options_level" style="display:none"></div>
                            <div class="list_inner_right list_small_width" id="attr_options_val" name="attr_options_val" style="display:none">
                                <select onchange="return alpha_check(this);" id="checked_alpha_value" class="alpha_value_one">
                                    <option><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
                                    <option>XXS</option>
                                    <option>XS</option>
                                    <option>S</option>
                                    <option>M</option>
                                    <option>L</option>
                                    <option>XL</option>
                                    <option>XXL</option>
                                    <option>3XL</option>
                                    <option>4XL</option>
                                    <option>5XL</option>                               
                                    <!--<optgroup label="Couldn't find a property">
                                        <option >Add a new option</option>
                                    </optgroup>-->
                                </select>
                            </div>
                            <div class="list_inner_fields" style="border-bottom:none;">
                                <label>&nbsp;</label> 
                                <div class="list_inner_right" id="options_table" style="display:none">
                                	<table width="100%" class="inner_table"  align="center" cellpadding="0" cellspacing="0" id="options_list">              
                                        <tbody>
                                            <tr>
                                               <td width="20%" ><strong><?php if($this->lang->line('shop_options') != '') { echo stripslashes($this->lang->line('shop_options')); } else echo 'Options'; ?></strong></td>
                                               <td width="20%">
                                                    <span class="non-pricing-mode">
                                                        <a href="javascript:void(0)" class="enable-variations-pricing" id="price_opt" onclick="price_opt_click();"><?php if($this->lang->line('shop_addpricing') != '') { echo stripslashes($this->lang->line('shop_addpricing')); } else echo 'Add Pricing'; ?></a>
                                                    </span>
                                                    <span class="pricing-mode retail">
                                                        <a href="#variations-section" class="disable-variations-pricing remove button-remove"></a>
                                                           <!--<span class="price-header-label retail">
                                                                  Price
                                                            <small>USD</small>
                                                        </span>-->
                                                    </span>
                                                </td>
                                               <td  width="20%" ><strong><?php if($this->lang->line('shop_instock') != '') { echo stripslashes($this->lang->line('shop_instock')); } else echo 'In Stock'; ?></strong></td>
                                               <td  width="10%" ></td>
                                            </tr>
                                        </tbody>
                                	</table>
                                </div>   
                            </div> 
                        </div>
                      
                    </div>
                    <!--  Variation One Ends here  --> 
                    <!--  Variation Two Starts here  --> 
                    <div class="list_inner_fields">
                    	<label>&nbsp;</label> <p id="have_scalling1" style="display:none;"></p>
                        <select id="property_level1" class="vari_option">
                                <option value=""><?php if($this->lang->line('shop_availableproperty') != '') { echo stripslashes($this->lang->line('shop_availableproperty')); } else echo 'Select available property'; ?>...</option>
                                <?php foreach($variations_result as $variations) {?>   
                                <option value="<?php echo $variations->attr_seourl; ?>"><?php echo $variations->attr_name; ?></option> 
                                <?php }?>
                                <!--<optgroup label="Couldn't find a property">
                                    <option >Add a new option</option>
                                </optgroup>-->
                            </select>
                        <div class="list_inner_right list_small_width" id="variations_level_div1">
                            
                            
                        </div>
                        <div id="variation_two">
                             <div style="float:right;">
                              	<a href="javascript:void(0)" onclick="return clear_data1();" id="close_var_two" style="display:none;" class="close_icon"></a>
                             </div>
                             <div class="list_inner_right list_small_width" id="attr_loader1" style="display:none">
                              	<img src="images/ajax_loading.gif" alt="loading variations" />
                             </div>
                             <div class="list_inner_right list_small_width" id="options_level1" name="options_level1" style="display:none"></div>
                             <div class="list_inner_right list_small_width" id="attr_options_val1" name="attr_options_val1" style="display:none">
                                    <select onchange="return alpha_check1(this);" id="checked_alpha_value1" class="alpha_value_two">
                                        <option><?php if($this->lang->line('shop_selavailableoptions') != '') { echo stripslashes($this->lang->line('shop_selavailableoptions')); } else echo 'Select available options'; ?>...</option>
                                        <option>XXS</option>
                                        <option>XS</option>
                                        <option>S</option>
                                        <option>M</option>
                                        <option>L</option>
                                        <option>XL</option>
                                        <option>XXL</option>
                                        <option>3XL</option>
                                        <option>4XL</option>
                                        <option>5XL</option>                               
                                        <!--<optgroup label="Couldn't find a property">
                                            <option >Add a new option</option>
                                        </optgroup>-->
                                    </select>
                              </div>
                             <div class="list_inner_fields" style="border-bottom:none;">
                                    <label>&nbsp;</label> 
                                    <div class="list_inner_right" id="options_table1" style="display:none">
                                        <table width="100%" class="inner_table"  align="center" cellpadding="0" cellspacing="0" id="options_list1">              
                                            <tbody>
                                                <tr>
                                                   <td width="20%" ><strong><?php if($this->lang->line('shop_options') != '') { echo stripslashes($this->lang->line('shop_options')); } else echo 'Options'; ?></strong></td>
                                                   <td width="20%">
                                                        <span class="non-pricing-mode">&nbsp;
                                                        <!--<a href="javascript:void(0)" class="enable-variations-pricing" id="price_opt1" onclick="price_opt_click1();">Add Pricing</a>-->
                                                        </span>
                                                        <span class="pricing-mode retail">
                                                            <a href="#variations-section" class="disable-variations-pricing remove button-remove"></a>
                                                               <!--<span class="price-header-label retail">
                                                                      Price
                                                                <small>USD</small>
                                                            </span>-->
                                                        </span>
                                                    </td>
                                                   <td  width="20%" ><strong><?php if($this->lang->line('shop_instock') != '') { echo stripslashes($this->lang->line('shop_instock')); } else echo 'In Stock'; ?></strong></td>
                                                   <td  width="10%" ></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>   
                                </div>	                        
                        </div>
                    </div>
                    <!--  Variation Two Ends here  --> 
                </div>
                </div>
                <?php }  ?>
                <!--  Variation Ends here  --> 
      <div class="shop_details">	          
                <!--  Title, Photo and Description Starts here  -->
                <div class="list_div">
                	<div class="list_inner_fields">
                    	<label id="title"><?php if($this->lang->line('shop_itemtitle') != '') { echo stripslashes($this->lang->line('shop_itemtitle')); } else echo 'Item Title'; ?></label>
                        <div class="list_inner_right">
                        	<p> <?php if($this->lang->line('shop_descriptivetitles') != '') { echo stripslashes($this->lang->line('shop_descriptivetitles')); } else echo 'Descriptive titles are best. Try to describe your item the way a buyer would'; ?>. </p>
                            <input type="text" name="product_name" value="<?php echo $edit_item_detail->row()->product_name; ?>" style="width:527px; font-size:12px; color:#333; padding:6px;" id="maxtextval" maxlength="140" onKeyUp="change('maxtextval','goo_item_title')"/> <br>
                            <span class="list_div_note"><?php if($this->lang->line('shop_maximum') != '') { echo stripslashes($this->lang->line('shop_maximum')); } else echo 'Maximum 140 characters'; ?>:</span>
                            <span class="list_div_note" id="maxtext_notify" >140</span>
                            <span class="list_div_note"> &nbsp; <?php if($this->lang->line('shop_remaining') != '') { echo stripslashes($this->lang->line('shop_remaining')); } else echo 'remaining'; ?> </span>  
                        </div>
                        
                    </div>
                   <?php if($edit_digital_check[0]['digital_item'] == '' ) { ?> 
                   
                   <div class="list_inner_fields" id="file_wrapper" style="display:none;">
                    	<label><?php if($this->lang->line('shop_files') != '') { echo stripslashes($this->lang->line('shop_files')); } else echo 'Files'; ?></label>
                        <div class="list_inner_right">                        	
                           <!-- <input type="button" class="addfile_button" value="Add file" />-->
                            <label for="file_upload" style="width:45px;" class="addfile_button"><?php if($this->lang->line('shop_addfile') != '') { echo stripslashes($this->lang->line('shop_addfile')); } else echo 'Add file'; ?></label>
                            <img src="images/loading.gif" id="loadedFile" style="display:none"> </img>
                            <input type="file" id="file_upload" name="file_upload" style="display:none;">
                            <table width="100%" class="inner_table" border="0"  align="center" cellpadding="0" cellspacing="0" id="DigiFiles" >     
                                <tr style="display:none;">
                                	<td width="70%"> 
                                    	&nbsp;
                                        <p id="Digi_Files_1"></p>
                                        <input type="hidden" value="" class="DigiFiles" name="DigiFiles[]">
                                     </td>
                                    <td width="30%">
                                        <a class="close_icon left" href="javascript:void(0)" style="margin:7px 0 0 5px" id=""></a>
                                    </td>
                                </tr>
                            </table>
                             <span class="list_div_note list_rightalign"> <?php if($this->lang->line('shop_addupto') != '') { echo stripslashes($this->lang->line('shop_addupto')); } else echo 'Add up to'; ?> <span id="filecount">5</span> <?php if($this->lang->line('shop_fileslisting') != '') { echo stripslashes($this->lang->line('shop_fileslisting')); } else echo 'files to this listing'; ?> </span>
                             <p>  <?php if($this->lang->line('shop_guarantee') != '') { echo stripslashes($this->lang->line('shop_guarantee')); } else echo 'By adding files to this listing, you guarantee that you have rights to the content'; ?>. <?php echo $this->config->item('email_title'); ?> <?php if($this->lang->line('shop_removecontent') != '') { echo stripslashes($this->lang->line('shop_removecontent')); } else echo 'may remove content per our'; ?><a href="javascript:void(0);" class="google-preview_link"> <?php if($this->lang->line('shop_copyright') != '') { echo stripslashes($this->lang->line('shop_copyright')); } else echo 'Copyright and IP Policy'; ?></a>, <?php if($this->lang->line('shop_purchasedfiles') != '') { echo stripslashes($this->lang->line('shop_purchasedfiles')); } else echo 'at which point buyers may not be able to access purchased files. See our'; ?> <a href="pages/terms-conditions" class="google-preview_link" target="_blank"><?php if($this->lang->line('shop_terms') != '') { echo stripslashes($this->lang->line('shop_terms')); } else echo 'Terms'; ?></a> <?php if($this->lang->line('shop_moreinformation') != '') { echo stripslashes($this->lang->line('shop_moreinformation')); } else echo 'for more information'; ?>.<br />
<a href="appearance/<?php echo $seller_info[0]['seourl']; ?>/shop-title" class="google-preview_link" target="_blank"><?php if($this->lang->line('shop_digitalitems') != '') { echo stripslashes($this->lang->line('shop_digitalitems')); } else echo 'Add a note for buyers who purchase digital items'; ?></a></p>                        
                        	
                       </div>
                    </div>
                   <?php } else {?>
                   
                    <div class="list_inner_fields" id="file_wrapper">
                    	<label><?php if($this->lang->line('shop_files') != '') { echo stripslashes($this->lang->line('shop_files')); } else echo 'Files'; ?></label>
                        <div class="list_inner_right">                        	
                           <!-- <input type="button" class="addfile_button" value="Add file" />-->
                            <label for="file_upload" style="width:45px;" class="addfile_button"><?php if($this->lang->line('shop_addfile') != '') { echo stripslashes($this->lang->line('shop_addfile')); } else echo 'Add file'; ?></label>
                            <img src="images/loading.gif" id="loadedFile" style="display:none"> </img>
                            <input type="file" id="file_upload" name="file_upload" style="display:none;">
                            <table width="100%" class="inner_table" border="0"  align="center" cellpadding="0" cellspacing="0" id="DigiFiles" >     
                                <tr style="display:none;">
                                	<td width="70%"> 
                                    	&nbsp;
                                        <p id="Digi_Files_1"></p>
                                        <input type="hidden" value="" class="DigiFiles" name="DigiFiles[]">
                                     </td>
                                    <td width="30%">
                                        <a class="close_icon left" href="javascript:void(0)" style="margin:7px 0 0 5px" id=""></a>
                                    </td>
                                </tr>
                                
                                <?php $diGi=explode(',',$edit_digital_check[0]['digital_item']); for($i=0; $i < sizeof($diGi)-1; $i++) {?>
                                 <tr>
                                	<td width="70%"> 
                                    	&nbsp;<a href="digital_files/<?php echo $diGi[$i]; ?>" target="_blank"><?php echo $diGi[$i]; ?></a>
                                        <input type="hidden" value="<?php echo $diGi[$i]; ?>" class="DigiFiles" name="DigiFiles[]">
                                     </td>
                                    <td width="30%">
                                        <a class="close_icon" href="javascript:void(0)" style="margin:7px 0 0 5px" id=""></a>
                                    </td>
                                </tr>
                                <?php }?>
                                
                            </table>
                             <span class="list_div_note list_rightalign"> <?php if($this->lang->line('shop_addupto') != '') { echo stripslashes($this->lang->line('shop_addupto')); } else echo 'Add up to'; ?> <span id="filecount">5</span> <?php if($this->lang->line('shop_fileslisting') != '') { echo stripslashes($this->lang->line('shop_fileslisting')); } else echo 'files to this listing'; ?> </span>
                             <p>  <?php if($this->lang->line('shop_guarantee') != '') { echo stripslashes($this->lang->line('shop_guarantee')); } else echo 'By adding files to this listing, you guarantee that you have rights to the content'; ?>. <?php echo $this->config->item('email_title'); ?> <?php if($this->lang->line('shop_removecontent') != '') { echo stripslashes($this->lang->line('shop_removecontent')); } else echo 'may remove content per our'; ?><a href="javascript:void(0);" class="google-preview_link"> <?php if($this->lang->line('shop_copyright') != '') { echo stripslashes($this->lang->line('shop_copyright')); } else echo 'Copyright and IP Policy'; ?></a>, <?php if($this->lang->line('shop_purchasedfiles') != '') { echo stripslashes($this->lang->line('shop_purchasedfiles')); } else echo 'at which point buyers may not be able to access purchased files. See our'; ?> <a href="pages/terms-conditions" class="google-preview_link" target="_blank"><?php if($this->lang->line('shop_terms') != '') { echo stripslashes($this->lang->line('shop_terms')); } else echo 'Terms'; ?></a> <?php if($this->lang->line('shop_moreinformation') != '') { echo stripslashes($this->lang->line('shop_moreinformation')); } else echo 'for more information'; ?>.<br />
<a href="appearance/<?php echo $seller_info[0]['seourl']; ?>/shop-title" class="google-preview_link" target="_blank"><?php if($this->lang->line('shop_digitalitems') != '') { echo stripslashes($this->lang->line('shop_digitalitems')); } else echo 'Add a note for buyers who purchase digital items'; ?></a></p>                       
                        	
                       </div>
                    </div>
                    <?php }?>
                     <div class="list_inner_fields error" id="showImgErr" style="display:none; text-align:center;"></div>
                    <div class="list_inner_fields">
                    	<label id="photoErr"><?php if($this->lang->line('shop_photos') != '') { echo stripslashes($this->lang->line('shop_photos')); } else echo 'Photos'; ?></label>
                        <div class="list_inner_right">
                        	<ul class="photo_list">
                            <?php $images=explode(',',$edit_item_detail->row()->image);
					
							?>
                            	<li>
                                	<div>
                                    	<div class="photo_contain">
                                       
                                        	<input type="file" class="image-upload" id="image_upload"  name="image_upload" />
                                            <input type="hidden" name="existImage0" value="<?php echo $images[0];?>" />
                                            
                                      
                                        </div>
                                      <img src="images/product/<?php echo $images[0];?>" id="loadedImg" width="90px" height="71px" style="display:block"> </img>
                                        <div class="photo_add">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                
                               <?php if($images[1] != '') {?>
                               <li class="" id="img_empty1">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata1">
                                       
                                        	<input type="file" class="image-upload" id="image_upload1" value="<?php echo $images[1];?>" name="image_upload1" style="display:block">
                                            <input type="hidden" name="existImage1" value="<?php echo $images[1];?>" />
                                      
                                        </div>
                                      <img src="images/product/<?php echo $images[1];?>" id="loadedImg1" width="90px" height="71px" style="display:block"> </img>
                                        <div class="photo_add" id="imgAddData1">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                 <?php } else {?>
                                 
                                 
                                 <li class="" id="img_empty1">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata1" style="display:block">
                                       
                                        	<input type="file" class="image-upload" id="image_upload1" name="image_upload1" style="display:block">
                                      
                                        </div>
                                      <img src="" id="loadedImg1" width="90px" height="71px" style="display:none"> </img>
                                        <div class="photo_add" style="display:block" id="imgAddData1">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                 <?php }?>
                                 <?php if($images[2] != '' || count($images) == 2) {?>
                                <li class="" id="img_empty2">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata2">
                                        
                                        	<input type="file" class="image-upload" id="image_upload2"  name="image_upload2" value="<?php echo $images[2];?>">
                                            <input type="hidden" name="existImage2" value="<?php echo $images[2];?>" />
                                      
                                        </div>
                                        <?php if(count($images) == 2) {?>
                                        <img src="" id="loadedImg2" width="90px" height="71px" style="display:none" > </img>
                                        <?php } else { ?>
                                       
                                      <img src="images/product/<?php echo $images[2];?>" id="loadedImg2" width="90px" height="71px" > </img>
                                      <?php } ?>
                                        <div class="photo_add" id="imgAddData2">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                
                                 <?php } else {?>
                                 
                                 
                                 <li class="image_empty" id="img_empty2">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata2" style="display:none">
                                       
                                        	<input type="file" class="image-upload" id="image_upload2" name="image_upload2" >
                                      
                                        </div>
                                      <img src="" id="loadedImg2" width="90px" height="71px" style="display:none"> </img>
                                        <div class="photo_add" style="display:none" id="imgAddData2">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                <?php }?>
                                <?php if($images[3] != '' || count($images) == 3) {?>
                                <li class="" id="img_empty3">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata3">
                                        
                                        	<input type="file" class="image-upload" id="image_upload3" value="<?php echo $images[3];?>" name="image_upload3">
                                            <input type="hidden" name="existImage3" value="<?php echo $images[3];?>" />
                                     
                                        </div>
                                        <?php if(count($images) == 3) {?>
                                        <img src="" id="loadedImg3" width="90px" height="71px" style="display:none" > </img>
                                        <?php } else { ?>
                                      <img src="images/product/<?php echo $images[3];?>" id="loadedImg3" width="90px" height="71px"> </img>
                                     <?php }?>
                                        <div class="photo_add" id="imgAddData3">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                <?php } else {?>
                                <li class="image_empty" id="img_empty3">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata3" style="display:none">
                                        
                                        	<input type="file" class="image-upload" id="image_upload3" name="image_upload3">
                                     
                                        </div>
                                      <img src="" id="loadedImg3" width="90px" height="71px" style="display:none"> </img>
                                        <div class="photo_add" style="display:none" id="imgAddData3">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                <?php }?>
                                <?php if($images[4] != '' || count($images) == 4) {?>
                                <li class="" id="img_empty4">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata4">
                                       
                                        	<input type="file" class="image-upload" id="image_upload4" value="<?php echo $images[4];?>"name="image_upload4">
                                             <input type="hidden" name="existImage4" value="<?php echo $images[4];?>" />
                                        </div>
                                        <?php if(count($images) == 4) {?>
                                        <img src="" id="loadedImg4" width="90px" height="71px" style="display:none" > </img>
                                        <?php } else { ?>
                                      <img src="images/product/<?php echo $images[4];?>" id="loadedImg4" width="90px" height="71px"> </img>
                                      <?php }?>
                                        <div class="photo_add" id="imgAddData4">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                <?php } else {?>
                                
                                <li class="image_empty" id="img_empty4">
                                    <div>
                                    	<div class="photo_contain" id="imgFormdata4" style="display:none">
                                       
                                        	<input type="file" class="image-upload" id="image_upload4" name="image_upload4">
                                     
                                        </div>
                                      <img src="" id="loadedImg4" width="90px" height="71px" style="display:none"> </img>
                                        <div class="photo_add" style="display:none" id="imgAddData4">
                                        	<span class="add_butn"></span>
                                            <span><?php if($this->lang->line('shop_addphotos') != '') { echo stripslashes($this->lang->line('shop_addphotos')); } else echo 'ADD PHOTOS'; ?></span>
                                        </div>
                                    </div>
                                </li>
                                
                                <?php }?>
                            </ul>
                            <p><?php if($this->lang->line('shop_note') != '') { echo stripslashes($this->lang->line('shop_note')); } else echo 'Note: Standard Image size is 550 x 350 pixel'; ?>.  </p>
                        </div>
                    </div>
                    <div class="list_inner_fields">
                    	<label id="Description"><?php if($this->lang->line('shop_description') != '') { echo stripslashes($this->lang->line('shop_description')); } else echo 'Description'; ?></label>
                        <div class="list_inner_right">
                        	<p> <?php if($this->lang->line('shop_explainspecial') != '') { echo stripslashes($this->lang->line('shop_explainspecial')); } else echo "Try to answer the questions buyers will have. Tell the item's story and explain why it's special"; ?>.  </p>
                            <textarea  style="width:527px; height:75px; font-size:12px; color:#333; padding:6px;" name="description" id="desc" onKeyUp="change('desc','goo_item_desc')"><?php echo $edit_item_detail->row()->description; ?></textarea>
                        </div>
                    </div>
                    <p style="float:right; width:83%"> <?php if($this->lang->line('shop_searchresults') != '') { echo stripslashes($this->lang->line('shop_searchresults')); } else echo 'Preview how your listing will appear in Google search results'; ?>.
                    <a href="javascript:void(0)" id="preview_GSR" onclick="return Goog_SR('preview_GSR');"><?php if($this->lang->line('shop_hidepreview') != '') { echo stripslashes($this->lang->line('shop_hidepreview')); } else echo 'Hide preview'; ?></a></p>
                    <div class="list_inner_fields preview_div" id="preview">
                        <div class="list_inner_right">
                        	<p class="goo_title">
                            <span id="goo_item_title"><?php #if($this->lang->line('shop_itemtitle') != '') { echo stripslashes($this->lang->line('shop_itemtitle')); } else echo 'Item Title'; ?><?php echo $edit_item_detail->row()->product_name; ?></span>
                            <?php if($this->lang->line('shop_by') != '') { echo stripslashes($this->lang->line('shop_by')); } else echo 'by'; ?> <?php  echo stripslashes($selectSeller_details[0]['seller_businessname']); ?> <?php if($this->lang->line('shop_on') != '') { echo stripslashes($this->lang->line('shop_on')); } else echo 'on'; ?> <?php echo $this->config->item('email_title'); ?>
                            </p>
                    		<p class="goo_desc" id="goo_item_desc"><?php #if($this->lang->line('shop_descriptionappear') != '') { echo stripslashes($this->lang->line('shop_descriptionappear')); } else echo 'Your description will appear here'; ?><?php echo substr($edit_item_detail->row()->description,0,150); ?>...</p>
                        </div>
                    </div>
                </div>        
                <!--  Title, Photo and Description Ends here  -->
                
                <!--  Tagging Starts here  -->        
                <div class="list_div">
                	<div class="list_inner_fields">
                    	<label><?php if($this->lang->line('shop_tags') != '') { echo stripslashes($this->lang->line('shop_tags')); } else echo 'Tags'; ?></label>
                        <div class="list_inner_right">
                        	<p style="color:#09B2F1"><?php if($this->lang->line('shop_getideas') != '') { echo stripslashes($this->lang->line('shop_getideas')); } else echo 'Get ideas'; ?>.</p>
                            <div class="row">
                              <span class="tagBox-list" id="tagBox-list-tags"></span>
                              <input type="text" value="<?php echo $edit_item_detail->row()->tag; ?>" name="jquery-tagbox-tags" id="jquery-tagbox-tags" class="jQTagBox" style="display: none;">
                            </div>
                          
                            <!--<input type="text"  style="float:left; width:180px; font-size:12px; color:#333; padding:5px 6px;" id="tags" name="tags" maxlength="13"/>
                            <input type="button" class="add_button" value="Add" />
                            <label id="tagslabel"></label>-->
                            <p><?php if($this->lang->line('shop_addtag') != '') { echo stripslashes($this->lang->line('shop_addtag')); } else echo 'Add 13 tags'; ?>.</p>
                        </div>
                    </div>
                    <div class="list_inner_fields">
                    	<label><?php if($this->lang->line('shop_materials') != '') { echo stripslashes($this->lang->line('shop_materials')); } else echo 'Materials'; ?></label>
                        <div class="list_inner_right">
                        	<div class="row">
                              <span class="tagBox-list" id="tagBox-list-materials"></span>
                              <input type="text" name="jquery-tagbox-materials"  value="<?php echo $edit_item_detail->row()->materials; ?>" id="jquery-tagbox-materials" class="jQTagBox" style="display: none;">
                            </div>  
                           <!-- <input type="text"  style="float:left; width:180px; font-size:12px; color:#333; padding:5px 6px;"/>
                            <input type="button" class="add_button" value="Add" />-->
                            <p> <?php if($this->lang->line('shop_addmaterials') != '') { echo stripslashes($this->lang->line('shop_addmaterials')); } else echo 'Add up to 13 materials used in your item'; ?>. </p>
                        </div>
                    </div>
                </div>
                <!--  Tagging Ends here  -->
                
                <!--  Priceing And Quantity Starts here  -->
                <div class="list_div">
                	<div class="list_inner_fields">
                    	<label id="PriceLab"><?php if($this->lang->line('giftcard_price') != '') { echo stripslashes($this->lang->line('giftcard_price')); } else echo 'Price'; ?></label>
                        <?php if($edit_item_detail->row()->price == 0.00) { ?>
                        <div class="list_inner_right" id="price_div_disp" style="display:none;">
                        	<p style="width:auto; margin:2px 4px 0 0px">$</p>
                 <input type="text"  style="float:left; width:100px; font-size:12px; color:#333; padding:5px 6px;" value="<?php echo $edit_item_detail->row()->price; ?>" id="price" name="price"/>
                            <p style="width:auto; margin:0 0 0 4px"><?php if($this->lang->line('user_usd') != '') { echo stripslashes($this->lang->line('user_usd')); } else echo 'USD'; ?></p>
                        </div>
                        <div  class="list_inner_right" id="price_div_hid" style="display:block;">
                        	<span class="price-input-variations-notice">
                                <?php if($this->lang->line('shop_pricevariation') != '') { echo stripslashes($this->lang->line('shop_pricevariation')); } else echo 'Price has been set by variation'; ?>.<br>
                                <?php if($this->lang->line('shop_generalprice') != '') { echo stripslashes($this->lang->line('shop_generalprice')); } else echo 'To set a general price'; ?> <a href="javascript:void(0)" id="remove_attr_pricing"><?php if($this->lang->line('shop_pricingvariation') != '') { echo stripslashes($this->lang->line('shop_pricingvariation')); } else echo 'turn off pricing by variation'; ?></a>
                            </span>
                        </div>
                        <input type="hidden" name="price_status"  id="price_status" value="0" />
                        <?php } else {?>
                        <div class="list_inner_right" id="price_div_disp" style="display:block;">
                        	<p style="width:auto; margin:2px 4px 0 0px">$</p>
                 <input type="text"  style="float:left; width:100px; font-size:12px; color:#333; padding:5px 6px;" value="<?php echo $edit_item_detail->row()->price; ?>" id="price" name="price"/>
                            <p style="width:auto; margin:0 0 0 4px"><?php if($this->lang->line('user_usd') != '') { echo stripslashes($this->lang->line('user_usd')); } else echo 'USD'; ?></p>
                        </div>
                        <div  class="list_inner_right" id="price_div_hid" style="display:none;">
                        	<span class="price-input-variations-notice">
                                <?php if($this->lang->line('shop_pricevariation') != '') { echo stripslashes($this->lang->line('shop_pricevariation')); } else echo 'Price has been set by variation'; ?>.<br>
                                <?php if($this->lang->line('shop_generalprice') != '') { echo stripslashes($this->lang->line('shop_generalprice')); } else echo 'To set a general price'; ?> <a href="javascript:void(0)" id="remove_attr_pricing"><?php if($this->lang->line('shop_pricingvariation') != '') { echo stripslashes($this->lang->line('shop_pricingvariation')); } else echo 'turn off pricing by variation'; ?></a>
                            </span>
                        </div>
                        <input type="hidden" name="price_status"  id="price_status" value="1" />
                        <?php }?>
                        
                    </div>
                    <div class="list_inner_fields">
                    	<label id="QuantityLab"><?php if($this->lang->line('shop_quantity') != '') { echo stripslashes($this->lang->line('shop_quantity')); } else echo 'Quantity'; ?></label>
                        <div class="list_inner_right">
                     <input type="text"  style="float:left; width:80px; font-size:12px; color:#333; padding:5px 6px; margin:0 0 0 11px"  value="<?php echo $edit_item_detail->row()->quantity; ?>" id="quantity" name="quantity"/>
                        </div>
                    </div>
                </div>
                <!--  Priceing And Quantity Ends here  -->
                
                 <!---- gift cards start here ------->
                <!--
                 <div class="list_div">
                     <div class="list_inner_fields">
                                <label>Accept gift cards?</label>
                                <input class="find-all" name="giftcard" type="checkbox" <?php if($edit_item_detail->row()->gift_card == 'true'){ echo 'checked="checked"';} ?> >
                                <p style="float:right; width:83%">In order to accept <?php echo $this->config->item('email_title'); ?> Gift Cards as a payment method, the shop must be enrolled in <?php echo $this->config->item('email_title'); ?>’s Direct Checkout feature.</p>
                      </div>
                 </div>-->
               <!---- gift cards ends here -------> 
                
                <!--  Shipping Starts here  -->
                <div class="list_div" id="shipping_wrapper"  <?php if($edit_digital_check[0]['digital_item'] != '' ) { echo 'style="display:none"';}?>>
                	<div class="list_inner_fields">
                    	<label id="shippingLab"><?php if($this->lang->line('shopsec_shipping') != '') { echo stripslashes($this->lang->line('shopsec_shipping')); } else echo 'Shipping'; ?></label>
                        <div class="list_inner_right list_small_width">
                        	<p><?php if($this->lang->line('shop_processingtime') != '') { echo stripslashes($this->lang->line('shop_processingtime')); } else echo 'Processing time'; ?></p>
                            
                            <select onchange="return processing_time_shipping(this.value);" name="ship_duration">
                            	    <option> <?php echo $edit_item_detail->row()->ship_duration; ?></option>
                                    <optgroup label="----------------------------"></optgroup>  
                                    <option class="range-1-1">1 <?php if($this->lang->line('shop_businessday') != '') { echo stripslashes($this->lang->line('shop_businessday')); } else echo 'business day'; ?></option>
                                    <option class="range-1-2">1-2 <?php if($this->lang->line('shop_businessdays') != '') { echo stripslashes($this->lang->line('shop_businessdays')); } else echo 'business days'; ?></option>
                                    <option class="range-1-3">1-3 <?php if($this->lang->line('shop_businessdays') != '') { echo stripslashes($this->lang->line('shop_businessdays')); } else echo 'business days'; ?></option>
                                    <option class="range-3-5">3-5 <?php if($this->lang->line('shop_businessdays') != '') { echo stripslashes($this->lang->line('shop_businessdays')); } else echo 'business days'; ?></option>
                                    <option class="range-5-10">1-2 <?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></option>
                                    <option class="range-10-15">2-3 <?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></option>
                                    <option class="range-15-20">3-4 <?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></option>
                                    <option class="range-20-30">4-6 <?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></option>
                                    <option class="range-30-40">6-8 <?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></option>
                                    <option value="custom" ><?php if($this->lang->line('shop_customrange') != '') { echo stripslashes($this->lang->line('shop_customrange')); } else echo 'Custom range'; ?></option>
                            </select>                            
                            <p style="color:#09B2F1"><?php if($this->lang->line('shop_whatisthis') != '') { echo stripslashes($this->lang->line('shop_whatisthis')); } else echo 'What is this'; ?>?</p>
                        </div>
                        <div style="margin-top:27px; display:none;" id="custom_shipping_time">
                        
                    <div style="float: left; width: 70%; margin: 10px 0px 0px 150px;">
                                <input checked="checked" id="business-days" name="processing_time_units" type="radio" value="business days">
                                <label for="business-days" style="float:none;"><?php if($this->lang->line('shop_businessdays') != '') { echo stripslashes($this->lang->line('shop_businessdays')); } else echo 'business days'; ?></label>
                                <input  id="weeks" name="processing_time_units" type="radio" value="weeks">
                                <label for="weeks"  style="float:none;"><?php if($this->lang->line('shop_weeks') != '') { echo stripslashes($this->lang->line('shop_weeks')); } else echo 'weeks'; ?></label>
                           </div>
                        <div style="float: left; margin: 10px 0px 0px 140px;">
                        
                                <select name="processing_min">
                                    <option><?php if($this->lang->line('user_from') != '') { echo stripslashes($this->lang->line('user_from')); } else echo 'From'; ?>...</option>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>
                                    <option>9</option>
                                    <option>10</option>
                            	</select>
                           
                                <select name="processing_max">
                                    <option><?php if($this->lang->line('shop_to') != '') { echo stripslashes($this->lang->line('shop_to')); } else echo 'To'; ?>...</option>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>
                                    <option>9</option>
                                    <option>10</option>
                            	</select>
                                
                                </div>
                        
                       </div>
                  </div>
                  <div class="list_inner_fields">
                  <label>&nbsp;</label>
                        <div class="list_inner_right">
                                <p><?php if($this->lang->line('shop_shipsfrom') != '') { echo stripslashes($this->lang->line('shop_shipsfrom')); } else echo 'Ships from'; ?></p>
                       			<select name="shipping_from" id="shipping_from" onchange="toggleDisabilityfrom(this);">
                                    <option value=""><?php if($this->lang->line('shop_sellocation') != '') { echo stripslashes($this->lang->line('shop_sellocation')); } else echo 'Select a location'; ?></option>
                                    <?php foreach($countryList as $countryVal) {?> 
                                    
                                    <option value="<?php echo $countryVal->id.'|'.$countryVal->name; ?>" <?php if($edit_item_detail->row()->ship_from == $countryVal->name) { echo 'selected="selected"';} ?>><?php echo $countryVal->name; ?></option> 
									<?php }?>
                                </select>
                        	<table width="100%" class="inner_table" border="0"  align="center" cellpadding="0" cellspacing="0" id="tbNames">
                           
                            	<tr style="background: none repeat scroll 0% 0% rgb(233, 246, 252); margin: 0px; padding: 10px; width: 97%;">
                                	<td width="40%"><strong><?php if($this->lang->line('shop_shipsto') != '') { echo stripslashes($this->lang->line('shop_shipsto')); } else echo 'Ships to'; ?></strong></td>
                                    <td width="20%" style="padding: 0px 0px 0px 40px;"><strong><?php if($this->lang->line('shop_cost') != '') { echo stripslashes($this->lang->line('shop_cost')); } else echo 'Cost'; ?></strong></td>
                                    <td width="20%" style="padding: 0px 0px 0px 40px;"><strong><?php if($this->lang->line('shop_anotheritem') != '') { echo stripslashes($this->lang->line('shop_anotheritem')); } else echo 'With another item'; ?> ?</strong></td>
                                </tr>
                               
                               <?php //$shipRows=explode(',',$edit_item_detail->row()->ship_details); 
							    $i=0; foreach($shiptoDetail as $shipdetail){  $i++;
							   ?>
                               
                              <tr>
                                <?php //$ship_Values=explode(':',$shipRows[$i]);?>
                                	<td width="32%"><p id="shipping_to_1_lab"><?php echo $shipdetail->ship_name;?></p>
                                    <input type="hidden" name="shipping_to[]" value="<?php echo $shipdetail->ship_id.'|'.$shipdetail->ship_name;?>" id="shiping_to_default" />
                                     <input type="hidden" name="ship_to_id[]" value="<?php echo $shipdetail->ship_id; ?>"  id="shipping_to_3_id" />
                                    <!--<select id="shipping_to_1" style="display:none;" class="shipping_to">
                                    	<option value="" id="shiping_to_default">Country Name</option>
                                    	<?php foreach($countryList as $country) {?>   
                                        <option value="<?php echo $country->name; ?>"><?php echo $country->name; ?></option> 
										<?php }?>
                                	</select>    --->                           
                                    </td>
                              		<td width="21%" style="padding: 0px 0px 0px 40px;">
                                        <p style="width:auto; margin:2px 4px 0 0px;">$</p>
                                        <input type="text" value="<?php echo $shipdetail->ship_cost;?>" name="shipping_cost[]" class="shipping_txt_box" />
                                    </td>
                                    <td width="20%" style="padding: 0px 0px 0px 40px;">
                                        <p style="width:auto; margin:2px 4px 0 0px;">$</p>
                                        <input type="text" value="<?php echo $shipdetail->ship_other_cost;?>" name="shipping_with_another[]" class="shipping_txt_box" />
                                        <?php if($i > 1) {
										echo '<a class="close_icon left" style="margin:7px 0 0 5px" href="javascript:void(0)" id="'.($i+1).'"></a>';
										}?>
                                    </td>
                                </tr>
                                <?php }?> 
                            </table>
                            <p id="selected_country" style="display:none;"></p>
                            <input type="button" value="<?php if($this->lang->line('shop_location') != '') { echo stripslashes($this->lang->line('shop_location')); } else echo 'Add location'; ?>" class="search_btn" style="width:100px" id="btnAdd"/>
                            <img src="images/ajax-loader/ajax-loader(1).gif" alt="Loading" style="display:none;width:20px;height:20px;background:none;border:none;" class="search_btn" id="stimg" />
                        </div>
                        </div>
         		</div>
     </div>
                <!--  Shipping Ends here  -->
	<input type="hidden" value="<?php echo $edit_item_detail->row()->seourl;?>" name="edit_product_id" id="edit_product_id" />
    <input type="hidden" value="<?php echo $edit_item_detail->row()->id;?>" name="edit_id" id="edit_id" />
    <input type="hidden" value="<?php echo $this->uri->segment(1);?>" name="AdminEditProduct" id="AdminEditProduct" />
    
    
    <div class="shop_details">
        <input type="submit" value="Preview Listing" class="save_btn" id="save_b"  />   
        <div style="display:none;background: #fcf3ed !important;" class="list_div" id="errMsg">         
            <p style="color: #a80308 !important;"><?php if($this->lang->line('shop_followingproblems') != '') { echo stripslashes($this->lang->line('shop_followingproblems')); } else echo 'Wait! You need to fix the following problems with your item'; ?>: </p>         
            <span id="err_blocks" style="color:#003399 !important;"></span>     
        </div>
    </div>  
</form> 
</div>
</div> 
<?php $this->load->view('site/templates/footer');?>