Sidebar

 

Virtuemart Extensions by RuposTel.com

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Template modifications from 1.1 to 1.2

How to upgrade templates from version 1.1. of One Page Checkout

This guide is only for customers who need to update from an older version of OPC with simple tax display at the bottom and no support for shipping and/or payment inside basket.

As new features added to allow loading of onepage before AJAX check and to allow shippping inside basket even if minimum amount is not met we modified the template files. We also added a new div for iframe of Google Adwords code and changed tax display to support any type of tax and discount configuration. 

Since version 1.2.123 template files are automatically overwritten, therefore please make backup before updating. Update can be done with joomla installer and there is no need to uninstall first. After updating, it is required to go to the configurator and click save to save newly added setting variables.

One Page template files are located in /components/com_virtuemart/themes/default/templates/onepage. (logged and unlogged).tpl.php The onepage.css file is in the same directory. If you copied this templates files to your own template directory like: /components/com_virtuemart/themes/___your_template__/templates/onepage your files will not get overwritten by installer, but you may notice javascript errors due to missing following modifications:

 

1. Change this:

global $VM_LANG;

To this:

global $VM_LANG;
$VM_LANG->load('admin');
$VM_LANG->load('order');
$VM_LANG->load('common');
$VM_LANG->load('shop');
include(CLASSPATH.'onepage'.DS.'onepage.cfg.php');


2. Change this:

<!-- main onepage div, set to hidden and will reveal after javascript test -->
<div style="display: none;" id="onepage_main_div">

To this:

<!-- start main onepage div, if javascript fails it will remain hidden -->
<div <?php if (empty($no_jscheck) || (!defined("_MIN_POV_REACHED"))) echo 'style="display: none;"'; ?> id="onepage_main_div">

3. Change this:

<?php echo $shipping_method_html; // this prints all your shipping methods from checkout/list_shipping_methods.tpl.php ?>

To this:

<div id="ajaxshipping"><?php echo $shipping_method_html; // this prints all your shipping methods ?></div>

4. Change this:

<b id="totalam"></b>

To this:

<div id="totalam">
<div id="tt_order_subtotal_div"><span id="tt_order_subtotal_txt" class="bottom_totals_txt"></span><span id="tt_order_subtotal" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_order_payment_discount_before_div"><span id="tt_order_payment_discount_before_txt" class="bottom_totals_txt"></span><span class="bottom_totals" id="tt_order_payment_discount_before"></span><br class="op_clear"/></div>
<div id="tt_order_discount_before_div"><span id="tt_order_discount_before_txt" class="bottom_totals_txt"></span><span id="tt_order_discount_before" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_shipping_rate_div"><span id="tt_shipping_rate_txt" class="bottom_totals_txt"></span><span id="tt_shipping_rate" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_shipping_tax_div"><span id="tt_shipping_tax_txt" class="bottom_totals_txt"></span><span id="tt_shipping_tax" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_tax_total_0_div"><span id="tt_tax_total_0_txt" class="bottom_totals_txt"></span><span id="tt_tax_total_0" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_tax_total_1_div"><span id="tt_tax_total_1_txt" class="bottom_totals_txt"></span><span id="tt_tax_total_1" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_tax_total_2_div"><span id="tt_tax_total_2_txt" class="bottom_totals_txt"></span><span id="tt_tax_total_2" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_tax_total_3_div"><span id="tt_tax_total_3_txt" class="bottom_totals_txt"></span><span id="tt_tax_total_3" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_tax_total_4_div"><span id="tt_tax_total_4_txt" class="bottom_totals_txt"></span><span id="tt_tax_total_4" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_order_payment_discount_after_div"><span id="tt_order_payment_discount_after_txt" class="bottom_totals_txt"></span><span id="tt_order_payment_discount_after" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_order_discount_after_div"><span id="tt_order_discount_after_txt" class="bottom_totals_txt"></span><span id="tt_order_discount_after" class="bottom_totals"></span><br class="op_clear"/></div>
<div id="tt_total_div"><span id="tt_total_txt" class="bottom_totals_txt"></span><span id="tt_total" class="bottom_totals"></span><br class="op_clear"/></div>
</div>



5. Add this to the end of the file. This div is used to load iframe of google adwords code:

<div id="tracking_div"></div>

 

6. Add this to onepage.css file

span.bottom_totals_txt {
width: 30%;
text-align: right;
float: left;
}

span.bottom_totals {
/* width: 67%; */
text-align: left;
padding-left: 3%;
float: left;
}

div#totalam {

width: 100%;
clear: both;
float: left;
margin: 0 auto;
}

br.op_clear {
 clear: both;
}

div#tt_order_subtotal_div {
 width: 100%;
 float: left;
 clear: both;
}
div#tt_order_payment_discount_before_div {
 width: 100%;
 display: none;
 
}

div#tt_order_discount_before_div {
 width: 100%;
 display: none;

}

div#tt_shipping_rate_div {
 width: 100%;
 

}
div#tt_shipping_tax_div {
 width: 100%;
 display: none;

}

div#tt_tax_total_0_div {
 display: none;
width: 100%;
}

div#tt_tax_total_1_div {
 display: none;
width: 100%;
}

div#tt_tax_total_2_div {
 display: none;
width: 100%;
}

div#tt_tax_total_3_div {
 display: none;
width: 100%;
}

div#tt_tax_total_4_div {
 width: 100%;
 display: none;
}

div#tt_order_payment_discount_after_div {
 width: 100%;
 display: none;
}

div#tt_order_discount_after_div {
 width: 100%;
 display: none;
}

div#tt_total_div {
 width: 100%;
}

You are here