Hi... i'd like to ask why I always get 0 for category_id. this is teh particular code that always retun zero.
$app = JFactory::getApplication();
$this->p = $app->getParams();
$this->u = JFactory::getUser();
$uri = JFactory::getURI();
$model = $this->getModel();
$document = JFactory::getDocument();
$id = $app->input->get('id', 0, 'int');
$catid = $app->input->get('catid', 0, 'int'); //This particular line always return 0
$this->category = $model->getCategory($id, $catid);
$this->item = $model->getItem($id, $catid);
if it's zero, in the next script it will be changed into item_id and create errors. I inspect the element and found hidden input with the name of catid but the values is 1. So, why I get 0 in the script?
I use phoca 3.0.0 and joomla 3.7.0
Category ID always return 0 in item/view.html.php
-
- Phoca Newbie
- Posts: 1
- Joined: 04 Mar 2021, 10:46
- Benno
- Phoca Hero
- Posts: 9451
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Category ID always return 0 in item/view.html.php
Hi,
Kind regards,
Benno
Update to current Joomla! v3.9.25 and current Phoca Cart v3.5.6 and check again.I use phoca 3.0.0 and joomla 3.7.0
Kind regards,
Benno