Extensions, OpenCart

Display Weight and Size in product details

Display weight and size in product details

Display weight and size in product details

If you want to display the weight and size (lenght/width/height) on the product details page just upload the following file to your vqmod/xml folder:

Product dimensions

This is the code:

<modification>

 <id>Product Dimensions</id>
 <version>1.0.0</version>
 <vqmver>2.1.2</vqmver>
 <author>everthemes.com</author>

 <file name="catalog/controller/product/product.php">

  <operation>
   <search position="after"><![CDATA[
    $this->data['text_model'] = $this->language->get('text_model');
   ]]></search>
   <add><![CDATA[
    $this->data['text_weight'] = $this->language->get('text_weight');
    $this->data['text_size'] = $this->language->get('text_size');
   ]]></add>
  </operation>

  <operation>
   <search position="after"><![CDATA[
    $this->data['model'] = $product_info['model'];
   ]]></search>
   <add><![CDATA[
    $this->data['weight'] = number_format($product_info['weight'],2) . ' kg';
    $this->data['length'] = number_format($product_info['length'],2) .  ' cm';
    $this->data['width'] = number_format($product_info['width'],2) .  ' cm';
    $this->data['height'] = number_format($product_info['height'],2) .  ' cm';
   ]]></add>
  </operation>

 </file>

 <file name="catalog/view/theme/*/template/product/product.tpl">
  <operation>
   <search position="after"><![CDATA[
    <span><?php echo $text_stock; ?></span> <?php echo $stock; ?>
   ]]></search>
   <add><![CDATA[
    <?php if ($weight) { ?>
    <br /><span><?php echo $text_weight; ?></span> <?php echo $weight; ?>
    <?php } ?>
    <?php if ($length || $width || $height) { ?>
    <br /><span><?php echo $text_size; ?></span> <?php echo $length; ?> x <?php echo $width; ?> x <?php echo $height; ?>
    <?php } ?>
   ]]></add>
  </operation>
 </file>

 <file name="catalog/language/english/product/product.php">
  <operation>
   <search position="before"><![CDATA[
    ?>
   ]]></search>
   <add><![CDATA[
    $_['text_weight']               = 'Weight:';
    $_['text_size']               = 'Size (LxWxH):';
   ]]></add>
  </operation>
 </file>

</modification>

Change the units from line 25 to 28.

Extensions, OpenCart

Remove step 3 in checkout [vQmod]

A free vQmod that removes step 3 (delivery details) on the checkout page, adapted to work with Sellegance theme.

<modification>
 <id>Step 3 Checkout (Sellegance, Clearshop OpenCart 1.5.6.x)</id>
 <version>1.3</version>
 <vqmver>1.0.8</vqmver>
 <author>ffct.cc</author>
 
 <file name="catalog/view/theme/*/template/checkout/checkout.tpl">
 <operation>
 <search position="replace"><![CDATA[
 <section id="shipping-address"
 ]]></search>
 <add><![CDATA[
 <section id="shipping-address" style="display: none"
 ]]></add>
 </operation>
 
 <operation>
 <search position="replace"><![CDATA[
 $('#shipping-address .checkout-content').slideDown('slow');
 ]]></search>
 <add><![CDATA[
 $("#shipping-existing select").prop("selectedIndex", $("#payment-existing select").prop("selectedIndex"));
 $('#shipping-address #button-address').click();
 $('#button-shipping-address').click();
 ]]></add>
 </operation>
 </file>

 <file name="catalog/view/theme/*/template/checkout/guest.tpl">
 <operation>
 <search position="replace"><![CDATA[
 <label for="shipping">
 ]]></search>
 <add><![CDATA[
 <label for="shipping" style="display: none">
 ]]></add>
 </operation>
 </file>

 <file name="catalog/view/theme/*/template/checkout/register.tpl">
 <operation>
 <search position="replace"><![CDATA[
 <label for="shipping" class="label-group">
 ]]></search>
 <add><![CDATA[
 <label for="shipping" class="label-group" style="display: none">
 ]]></add>
 </operation>
 </file>
</modification>


Original: http://forum.opencart.com/viewtopic.php?f=131&t=49258