public function editproductattributeAction() { //assigning default product attriutes like shoes selections //composite color attriubutes and custome attributes. $param['product_id'] = $this->request->getParam('id'); if ($param['product_id'] == '') { $param['product_id'] = 0; } $measurement = array(); $i = 0; while ($i < 50) { $measurement[] = $i; $i++; } $allowedProduct = DatabaseObject_Helper_ProductListing::confirmproductforuploader($this->db, 'products', $this->signedInUserSessionInfoHolder->generalInfo->userID, $param['product_id']); Zend_Debug::dump($allowedProduct); if (count($allowedProduct) == 1 && $allowedProduct[0]['purchase_type'] == 'Customizable') { $fp = new FormProcessor_ProductAttribute($this->db, $this->signedInUserSessionInfoHolder->generalInfo, $allowedProduct[0]); foreach ($this->productConfig['custom_attribute_detail_table'] as $k => $v) { echo $v; $fp->{$v} = DatabaseObject_Helper_ManageAttribute::retrieveAvailableAttributeForUser($this->db, $v, $this->signedInUserSessionInfoHolder->generalInfo->userID); //Zend_Debug::dump($fp); } if ($this->request->isPost()) { echo 'here at post<br />'; if ($fp->process($this->request)) { } } if ($allowedProduct[0]['inventory_attribute_table'] == 'shoes') { } $fp->existingFabricSet = DatabaseObject_Helper_ManageAttribute::retrieveAttributeForProduct($this->db, 'fabric_set', $param['product_id']); //Zend_Debug::dump($fp->existingFabricSet); $fp->existingAttributeSet = DatabaseObject_Helper_ManageAttribute::retrieveAttributeForProduct($this->db, 'custom_attribute', $param['product_id']); $fp->systemColorAndShoesAttributes = DatabaseObject_Helper_ManageAttribute::retrieveProductColorAndShoeAttribute($this->db, $allowedProduct[0]['inventory_attribute_table'], $param['product_id']); Zend_Debug::dump($fp->systemColorAndShoesAttributes); $this->view->product = $allowedProduct; $this->view->attributePartial = '_' . $allowedProduct[0]['inventory_attribute_table'] . 'Attribute.tpl'; $this->view->measurement = $measurement; //$this->view->systemColors=$this->productConfig['attribute_categories_details']['color']; $this->view->fp = $fp; $this->view->productID = $param['product_id']; //$this->view->inventory_attribute_table = $allowedProduct[0]['inventory_attribute_table']; } else { $this->messenger->addMessage("We are sorry, but this product's attribute can not be edited because it is a 'BUY NOW' product"); $this->_redirect('index/error'); } }