Jumprit's Knowledge

Jumprit's knowledge and references to share.

How To Display Available Quantity in Magento Front End (Product Page) —

To display quantity of products available in product page,

Open /app/design/frontend/default/YOURTHEME/template/catalog/product/view.phtml

Then paste this code anywhere you want the stock quantity to display:

<?php if($_product->isAvailable()):?><pclass="availability in-stock"><?php echo $this->__('Qty Available:')?><span><!--<?php echo $this->__('In stock') ?>--><?=(int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?></span></p><?php else:?><pclass="availability out-of-stock"><?php echo $this->__('Availability:')?><span><?php echo $this->__('Out of stock')?></span></p><?php endif;?>

Australia Post International Shipping OpenCart —

1. First add countries to Geo Zone.

Optional step:
I used vqmod module to add all countries in 1 go.

2. Edit
to accept other countries, simply by creating an if (other countries than AU) statement, and it “seems” to fix the problem, and work flawlessly. We’ve only enabled “AIR” as the other service type available, and not chosen to use express, and calling the “$address[‘iso_code_2’]” variable for country ID type.

Read the rest of this entry »

Put PayPal or any logo on OpenCart Footer —

Go to catalog/view/theme/YOUR-THEME/footer.tplalmost at the bottom page, find <div id="powered">
then add your pictures code.


<div id="powered"><div style="float:left; text-align:left; width:300px;"><!-- PayPal Logo --><table border="0" cellpadding="10" cellspacing="0" align="center"><tr><td align="center"></td></tr>
<tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img  src="https://www.paypal.com/en_GB/i/bnr/horizontal_solution_PP.gif" border="0" alt="Solution Graphics"></a></td></tr></table><!-- PayPal Logo --></div>Powered By <a href="http://www.opencart.com">OpenCart</a><br /> The Lunchbox Store &copy; 2012</div>