<commit_before><commit_msg>update product_weight<commit_after><modification>
    <name>Product_weight2</name>
	<version>1.1.1</version>
	<link>http://www.luvial.cn</link>
	<author>Vincent</author>
	<code>Product_weight2_ocmod</code>

	<file path="admin/language/english/catalog/product.php">
		<operation>
			<search ><![CDATA[$_['entry_weight']]]></search>
			<add position="before">
				<![CDATA[$_['entry_weight2']               = 'Volume weight';]]>
			</add>
		</operation>
	</file>

	<file path="admin/controller/catalog/product.php">
		<operation>
			<search ><![CDATA[$data['entry_weight']]]></search>
			<add position="before">
				<![CDATA[$data['entry_weight2'] = $this->language->get('entry_weight2');]]>
			</add>
		</operation>
		<operation>
			<search ><![CDATA[if (isset($this->request->post['weight'])) {]]></search>
			<add position="before">
				<![CDATA[if (isset($this->request->post['weight2'])) {
			$data['weight2'] = $this->request->post['weight2'];
		} elseif (!empty($product_info)) {
			$data['weight2'] = $product_info['weight2'];
		} else {
			$data['weight2'] = '';
		}]]>
			</add>
		</operation>		
	</file>

	<file path="admin/view/template/catalog/product_form.tpl">
		<operation>
			<search ><![CDATA[<input type="text" name="weight" value="<?php echo $weight; ?>" placeholder="<?php echo $entry_weight; ?>" id="input-weight" class="form-control" />]]></search>
			<add position="after">
				<![CDATA[</div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-weight2"><?php echo $entry_weight2; ?></label>
                <div class="col-sm-10">
                  <input type="text" name="weight2" value="<?php echo $weight2; ?>" placeholder="<?php echo $entry_weight2; ?>" id="input-weight2" class="form-control" />]]>
			</add>
		</operation>
	</file>
	<file path="admin/model/catalog/product.php">
		<operation>
			<search ><![CDATA[weight = '" . (float)$data['weight'] . "',]]></search>
			<add position="replace">
				<![CDATA[weight = '" . (float)$data['weight'] . "',weight2 = '" . (float)$data['weight2'] . "',]]>
			</add>
		</operation>
	</file>

	<file path="catalog/view/theme/*/template/product/product.tpl">		
		<operation>
			<search><![CDATA[<li class="desc-info-li">Gross weight: <?php echo round($weight, 3); ?>KG.</li>]]></search>
			<add position="after">
				<![CDATA[<li class="desc-info-li">Volume weight: <?php echo round($weight2, 3); ?>KG.</li>]]>
			</add>
		</operation>
	</file>
	<file path="catalog/controller/product/product.php">		
		<operation>
			<search><![CDATA[$product_info['points'];]]></search>
			<add position="after">
				<![CDATA[$data['weight2'] = $product_info['weight2'];]]>
			</add>
		</operation>
	</file>
	<file path="catalog/model/catalog/product.php">		
		<operation>
			<search><![CDATA[$query->row['weight'],]]></search>
			<add position="replace">
				<![CDATA[$query->row['weight'],
				'weight2'           => $query->row['weight2'],]]>
			</add>
		</operation>
	</file>


	<file path="system/library/cart.php">	
		<operation>
			<search><![CDATA[$product_query->row['weight'] ]]></search>
			<add position="replace">
				<![CDATA[($product_query->row['weight2'] > $product_query->row['weight'])?$product_query->row['weight2']:$product_query->row['weight']]]>
			</add>
		</operation>
	</file>
	
</modification>
{'fraction_non_alphanumeric': 0.24459579508439444, 'fraction_numerical': 0.010068107787977496, 'mean_word_length': 4.204930662557781, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 140, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6417290', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1161, 'n_words': 172}