Kennedy5020 Posted August 14, 2013 Share Posted August 14, 2013 (edited) Hi, I have to create new product details form in admin side. Admin contact form need to add new ,edit ,delete and list . I have created list page but i stuggle with add new and edit. Any one help. controller code class ProductattributesControllerCore extends AdminController { /** * Constructor */ public function __construct() { parent::__construct(); } /** * initContent */ public function initContent() { parent::initContent(); $this->context->smarty->assign('title',array('Catalog','Product Customization')); $mail_alert_fields_display = (array( 'design_type' => array('title' => $this->l('Type'), 'width' => 15, 'align' => 'center'), 'design_attribute_type' => array('title' => $this->l('Attribute Type'), 'width' => 15, 'align' => 'center'), 'price' => array('title' => $this->l('Price'), 'width' => 15, 'align' => 'center'), 'name' => array('title' => $this->l('Name'), 'align' => 'center'), 'status' => array('title' => $this->l('Status'), 'align' => 'center') )); $this->context->smarty->assign('fields_display',$mail_alert_fields_display); $sql = 'SELECT * FROM `'._DB_PREFIX_.'product_customization_attributes`'; $items = Db::getInstance()->executeS($sql); $this->context->smarty->assign('items',$items); //echo "<pre>"; print_r($items);exit; $this->setTemplate('product_attributes_input.tpl'); } } how to write function for add ,edit ? prestashop version 1.5.4.1. only for admin section Edited August 14, 2013 by karthick (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts