heavy.xml:
Code: Select all
<modification>
<id><![CDATA[Hover Heavy]]></id>
<version><![CDATA[1.5.2.1]]></version>
<vqmver><![CDATA[1.0.1]]></vqmver>
<author><![CDATA[dan@hydroharbor.com]]></author>
<file name="catalog/view/theme/default/template/checkout/cart.tpl">
<operation>
<search position="after" error="log"><![CDATA[<td class="quantity"><?php echo $column_quantity; ?></td>]]></search>
<add><![CDATA[<td class="heavy"><?php echo $column_heavy; ?></td>
]]></add>
</operation>
<operation>
<search position="after" error="log"><![CDATA[<img src="catalog/view/theme/default/image/remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" /></a></td>]]></search>
<add><![CDATA[<td class="heavy"><div class="tooltip-wrap"><?php echo $product['heavy']; ?><div class="tooltip-content">
<p>This affects the cost of shipping!</p>
</div>
</div></td>
]]></add>
</operation>
<operation>
<search position="before" error="log"><![CDATA[<td class="price"><?php echo $vouchers['amount']; ?></td>]]></search>
<add><![CDATA[<td></td>
]]></add>
</operation>
</file>
<file name="catalog/language/english/checkout/cart.php">
<operation>
<search position="after" error="log"><![CDATA[$_['text_empty'] = 'Your shopping cart is empty!';]]></search>
<add><![CDATA[
$_['text_heavy2'] = '<span style="color:#e65c00;cursor:help;font-weight:bold;">HEAVY</span>';
$_['text_heavy4'] = '<span style="color:#e9c161;cursor:help;font-weight:bold;">HEAVY</span>';
$_['column_heavy'] = '';
]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/cart.php">
<operation>
<search position="after" error="log"><![CDATA[$this->data['column_quantity'] = $this->language->get('column_quantity');]]></search>
<add><![CDATA[$this->data['column_heavy'] = $this->language->get('column_heavy');
]]>
</add>
</operation>
<operation>
<search position="after" error="log"><![CDATA['reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''),]]></search>
<add><![CDATA['heavy' => $heavy,
]]>
</add>
</operation>
<operation>
<search position="before" error="log"><![CDATA[$this->data['products'][] = array(]]></search>
<add><![CDATA[if (($product['total'] < ($product['weight']*6)) && ($product['weight'] > 2)) {
$heavy = $this->language->get('text_heavy2');
} else if (($product['total'] < ($product['weight']*8.2)) && ($product['weight'] > 2)) {
$heavy = $this->language->get('text_heavy4');
} else {
$heavy = false;
}
]]>
</add>
</operation>
</file>
</modification>
added to stylesheet.css:
Code: Select all
.cart-info tbody .heavy {
}
.cart-info thead .heavy {
}
.tooltip-wrap {
position: relative;
}
.tooltip-wrap .tooltip-content {
display: none;
width:140px;
font-size: 10px;
color: #333;
position: absolute;
top: 110%;
background-color: #fff;
padding: 5px;
}
.tooltip-wrap:hover .tooltip-content {
display: block;
}