Extensions, OpenCart

Display a full width logo on Sellegance theme for OpenCart

Updated! If you want to change the default header layout to display a full width logo use the following code to your Custom CSS code

Go to Extensions > Modules > Theme Options > Custom Code tab > CSS code and paste the following snippet:

#logo {width:100%; left:0;}
#logo img { width:100%; max-width:auto; }
@media (min-width: 768px) {
  .leftbox, .middlebox, .rightbox { margin-top:10px; }
  .leftbox, .rightbox { width: 50%; right:0; }
  .leftlogo #welcome { text-align:left; margin: 0 0 10px;}
}

The old vqmod method is no longer working. It’s here just for reference:

Extensions

Google Rich Snippets

Google Rich Snippets
Google Rich Snippets

Google Rich Snippets

Product rich snippets is to provide users with additional information about a specific product, such as the product’s price and reviewer(s) ratings and commentary.

  • Attract potential buyers while they are searching for items to buy on Google.
  • Submit your product listings for free.
  • Control your product information. You can maintain the accuracy and freshness of your product information, so your customers find the relevant, current items they’re looking for.

This is the adaptation of the popular extension “@tik” Google rich snippets 

Installation

To add rich snippets to your site:

1) Download the original extension http://www.opencart.com/index.php?route=extension/extension/info&extension_id=6485

2) Upload only the first file z-google-rich-snippets-1.xml to your server

3) Unzip and upload the file for your theme:

z-google-rich-snippets-2_Fortuna.xml version 1.2+

z-google-rich-snippets-2_Sellegance.xml version 1.4.3+

That’s all you need.

Test

You can check your site with this tool http://www.google.com/webmasters/tools/richsnippets

OpenCart, Releases

Sellegance 1.4.2 (OpenCart)

3rd level menu

New Sellegance 1.4.2 for OpenCart

A new release with important changes:

  • Added Tabbed Products module
  • Added 3rd Level Menu vqmod
  • Added navigation arrows in product image popup
  • Added close button to minicart on mobiles
  • Fixed issue with collapsible sidebar in tablets
  • Fixed issues with Remove Comparison and Remove Wishlist vqmods. They were causing errors in product grids when on Manufacturer products and Search results.
  • Updated HTML version

New features

A totally new module to display Latest, Featured, Bestseller and Special products as tabs.

Tabbed Products

A new vqmod extension to add a 3rd. level to the top menu.

3rd level menu

How to update?

Remember that you need Vqmod installed.
  1. Reupload the files and make sure to save your settings in the Sellegance Theme Options module.
  2. Edit your Image Settings in System > Settings > your store > Image tab. Change Additional Product Image Size to 62×62.
    Additional Product Image Size
  3. If you are using the function to hide the wishlist and comparison links upload the files sellegance_remove_comparison.xml and sellegance_remove_wishlist.xml from the Additional Extensions folder to vqmod/xml on your server.
  4. Clear your vqmod cache.

Let me know your thoughts 🙂

If you have any issues contact me through my profile page on Themeforest.

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.

OpenCart

Replace the “sale” bubble with your own image in Sellegance theme

It’s easy to change the “SALE” text in the bubble in Sellegance theme with your own image.

Paste the following in catalog/view/theme/sellegance/stylesheet/custom.css

.onsale {

  background: transparent url('../images/new_on_sale.png') no-repeat;

  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;

  padding:0;

  /* change height/width according to your image */
  height: 35px;
  width: 35px;

  /* hide the SALE text. */
  text-indent: -9999px;

}

If you only want to add a background image and keep the text remove text-indent: -9999px;

The full path of the example image is catalog/view/theme/sellegance/images/new_on_sale.png. Of course, you need to change the height and width values to match your image dimensions.

OpenCart

Display 4 products per row when using sidebar, Fortuna theme

Fortuna theme has the option to easily hide the sidebar to display 4 products on each row on category page. But it’s easy to display 4 products even if you have a sidebar enabled.

Just paste the following code in custom.css (if you are using a custom stylesheet) or in Custom CSS Code field in Fortuna Theme Options module.

#maincontent.span9 .grid-box {
  max-width: 25%; 
  min-width: 25%; 
  *width: 25%;
}
#maincontent.span9 .alpha4 {
  clear: left;
  margin-left: 0;
}
#maincontent.span9 .alpha3 {
  clear: none;
}
.span9 .grid-box .inner {
  border-left-color: #eee;
}
.grid-box.alpha .inner,
.span9 .alpha4 .inner, 
.span12 .alpha4 .inner {
  border-color:#fff;
}
.grid-box:hover .inner {
  border-color: #bbb;
}
OpenCart

Add a product to cart and redirect to checkout page.

To redirect to checkout open catalog/view/theme/[your-theme]/js/custom.js and catalog/view/theme/[your-theme]/template/product/product.tpl

In both files find the following code:


if (json['success']) {
  $('#notification').html('<div class="alert success">' + json['success'] + '<a class="close" data-dismiss="alert" href="#">&times;</a></div>');
  $('.alert success').fadeIn('slow');
  $('#cart-total').html(json['total']);
  $('html, body').animate({ scrollTop: 0 }, 'slow');
}

And replace with:


if (json['success']) {
  window.location='index.php?route=checkout/checkout';
}

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

Knowledge Base, OpenCart

Add HTML support in attributes text

<?php foreach ($attribute_group['attribute'] as $attribute) { ?>
<tr>
  <th><?php echo $attribute['name']; ?></th>
  <td><?php echo $attribute['text']; ?></td>
</tr>
<?php } ?>
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>
<tr>
  <th><?php echo $attribute['name']; ?></th>
  <td><?php echo html_entity_decode($attribute['text'], ENT_QUOTES, 'UTF-8');></td>
</tr>
<?php } ?>