I’m attempting to integrate with an external gift registry, and need to get at the product name so I can pass to the script which call the registry. I want this from on a product page, and have created a template file and added to the XML for catalog to get it to appear, but can’t get any of the get() functions to work. I have this in right sidebar
As a test (just to see if I can get the value) I have the following in my template file:
<?php $_product = $this->getProduct() ?>
<h3><?php echo $this->htmlEscape($_product->getName()) ?></h3>
However I get the following on the page:
Fatal error: Call to a member function getName() on a non-object in /path/to/templatefile
A further test (just echoing getProduct() ) seems to show that the value is Null (which explains the above error).
Why does it not get the product from this call? Is there a problem with having it in the Right sidebar?