protected function setDataProductEditReview()
    {
        $product_id = $this->getData('review.product_id');

        $products = array();

        if (!empty($product_id)) {

            $product = $this->product->get($product_id);

            $options = array(
                'entity' => 'product',
                'entity_id' => $product_id,
                'template_item' => 'backend|content/product/suggestion'
            );

            $this->setItemThumb($product, $this->image, $options);
            $this->setItemPriceFormatted($product, $this->price);
            $this->setItemRendered($product, array('item' => $product), $options);
            $products = array($product);
        }

        $widget = array(
            'multiple' => false,
            'products' => $products,
            'name' => 'review[product_id]',
            'error' => $this->error('product_id')
        );

        $this->setData('product_picker', $this->getWidgetProductPicker($widget));
    }
protected function setDataProductEditReview()
    {
        $product_id = $this->getData('review.product_id');

        $products = array();

        if (!empty($product_id)) {

            $product = $this->product->get($product_id);

            $options = array(
                'entity' => 'product',
                'entity_id' => $product_id,
                'template_item' => 'backend|content/product/suggestion'
            );

            $this->setItemThumb($product, $this->image, $options);
            $this->setItemPriceFormatted($product, $this->price);
            $this->setItemRendered($product, array('item' => $product), $options);
            $products = array($product);
        }

        $widget = array(
            'multiple' => false,
            'products' => $products,
            'name' => 'review[product_id]',
            'error' => $this->error('product_id')
        );

        $this->setData('product_picker', $this->getWidgetProductPicker($widget));
    }
protected function setDataProductEditReview ( ) { $ product_id = $ this -> getData ( 'review.product_id' ) ; $ products = array ( ) ; if ( ! empty ( $ product_id ) ) { $ product = $ this -> product -> get ( $ product_id ) ; $ options = array ( 'entity' => 'product' , 'entity_id' => $ product_id , 'template_item' => 'backend|content/product/suggestion' ) ; $ this -> setItemThumb ( $ product , $ this -> image , $ options ) ; $ this -> setItemPriceFormatted ( $ product , $ this -> price ) ; $ this -> setItemRendered ( $ product , array ( 'item' => $ product ) , $ options ) ; $ products = array ( $ product ) ; } $ widget = array ( 'multiple' => false , 'products' => $ products , 'name' => 'review[product_id]' , 'error' => $ this -> error ( 'product_id' ) ) ; $ this -> setData ( 'product_picker' , $ this -> getWidgetProductPicker ( $ widget ) ) ; }
Set product template data
Set product template data