Showing results for 
Search instead for 
Did you mean: 

How to display the custom options on product page

How to display the custom options on product page



I am trying to add the custom options on product page using extension.


I have the following code:





class Namespace_Giftwrapping_Block_Product extends Mage_Core_Block_Template
	//some codes here





<script type="text/javascript">
	$j(document).ready(function() {
			helpers : {
                title : {
                  type : 'inside'

<div id="gift-wrapper" style="display:none;">

$productSku = "Gift";
$product = Mage::getModel('catalog/product');
$productId = $product->getIdBySku( $productSku );

if($product->getData('has_options')) {
<?php if ($container1_html = $this->getChildChildHtml('container1', '', true, true)): ?>
					<div class="container1-wrapper"><?php echo $container1_html; ?></div>
				<?php endif; ?>


I tried this code outside the extension, like view.phtml on the theme folder, and its working fine, however I need it to put this inside the extension for following the rules in editing magento. I think I have missing something, or I need to extend some class. Any thoughts regarding this?


P.S I am just started learning to create a module in Magento. This is very much appreciated for your help.