Hello Mike, this is a little bit tricky because OPC counts totals per all cobinations of shipping, payment, coupon and product subtotal which is processed by ajax and then displayed with javascript. It is not a problem to hide the whole section at the totals function within onepage.js, but the problem is to select a payment and shipping which would be accepted by the checkout javascript processor. The shipping section can only be hidden (not deleted) because it contains all data from ajax. If you configure your payment and shipping so it returns a single shipping method (or free shipping) for 0 amout orders, then this could be done.
If you have your own programmer, he can do this, this way:
- open onepage.js in: /components/com_onepage/js/onepage.js
- search for:
- Code: Select all
x = document.getElementById(shipping_id+'_'+payment_id+'_order_total');
var order_total = x.value;
- right after this line, you can call:
- Code: Select all
if (parseFloat(order_total)==0) document.getDocumentById('your_div_wrapper').style.display='none';
else document.getDocumentById('your_div_wrapper').style.display='block';
You need to wrap the middle section with a div with a specif id such as <div id="your_div_wrapper"> content of the middle column</div> The columns are generated in /components/com_virtuemart/themes/default/templates/onepage/YOUR OPC THEM/onepage.unlogged (and logged).tpl.php
It might require also modification of the width of the left or right column with another js/css.
Best Regards,
Stan