function edit() { $input = JFactory::getApplication()->input; // Get some variables from the request $cid = $input->get('cid', '', 'array'); JArrayHelper::toInteger($cid); $quick2cartBackendProductsHelper = new quick2cartBackendProductsHelper(); $edit_link = $quick2cartBackendProductsHelper->getProductLink($cid[0], 'editLink'); $this->setRedirect($edit_link); }
/** * Method to get a list of products. * * @return mixed An array of data items on success, false on failure. * * @since 1.6.1 */ public function getItems() { $items = parent::getItems(); $comquick2cartHelper = new comquick2cartHelper(); $quick2cartBackendProductsHelper = new quick2cartBackendProductsHelper(); $store_details = $comquick2cartHelper->getAllStoreDetails(); foreach ($items as $item) { // Get product category $catname = $comquick2cartHelper->getCatName($item->category); $item->category = !empty($catname) ? $catname : $item->category; // Get store name $item->store_name = ''; if (!empty($store_details[$item->store_id])) { $item->store_name = $store_details[$item->store_id]['title']; } // Get store owner $item->store_owner = ''; if (!empty($store_details[$item->store_id])) { $item->store_owner = $store_details[$item->store_id]['firstname']; } $item->edit_link = $quick2cartBackendProductsHelper->getProductLink($item->item_id, 'editLink'); $item->parent = $quick2cartBackendProductsHelper->getProductParentName($item->item_id); } return $items; }