helper('catalog/category') ?>
getStoreCategories() ?>
0): ?>
```
## Debug using zend ##
```php
```
## $_GET, $_POST & $_REQUEST Variables ##
```php
getRequest()->getParam('product_id');
// The second parameter to getParam allows you to set a default value which is returned if the GET value isn't set
$productId = Mage::app()->getRequest()->getParam('product_id', 44);
$postData = Mage::app()->getRequest()->getPost();
// You can access individual variables like...
$productId = $postData['product_id']);
?>
```
## Get methods of an object ##
First, use `get_class` to get the name of an object's class.
```php
```
Then, pass that `get_class_methods` to get a list of all the callable methods on an object
```php
```
## Is product purchasable? ##
```php
isSaleable()) { // do stuff } ?>
```
## Load Products by Category ID ##
```php
load(47);
$_productCollection = $_category->getProductCollection();
if($_productCollection->count()) {
foreach( $_productCollection as $_product ):
echo $_product->getProductUrl();
echo $this->getPriceHtml($_product, true);
echo $this->htmlEscape($_product->getName());
endforeach;
}
?>
```
## Update all subscribers into a customer group (e.g. 5) ##
```sql
UPDATE
customer_entity,
newsletter_subscriber
SET
customer_entity.`group_id` = 5
WHERE
customer_entity.`entity_id` = newsletter_subscriber.`customer_id`
AND
newsletter_subscriber.`subscriber_status` = 1;
```
## Get associated products
In /app/design/frontend/default/site/template/catalog/product/view/type/
``` php
helper('catalog/output'); ?>
getAllowProducts() ?>