- Posts: 50
- Thank you received: 0
Error message after adding category name
10 years 2 weeks ago #253273
by edward68
Error message after adding category name was created by edward68
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.6.3
-- PHP version -- : 5.5.38
-- Browser(s) name and version -- : firefox nightly 52.0a1
-- Error-message(debug-mod must be tuned on) -- : Undefined property: CategoryViewCategory::$row in /home/wwwwhitepepperho/public_html/templates/protostar/html/com_hikashop/category/listing_div.php on
Notice: Trying to get property of non-object in /home/wwwwhitepepperho/public_html/templates/protostar/html/com_hikashop/category/listing_div.php on l
Hello All, I recently added a custom div to the Hikashop cateegory page. The div drops down over the top of the category image and contains a logo, category name and button. To allow the title to display I added the following : <?php echo $this->escape($this->row->category_name); ?> which works on all of the divs except the first one. The first one produces two errors, the first error is Undefined property: CategoryViewCategory::$row and the second is Notice: Trying to get property of non-object in. Can someone please help me to solve this issue. I realise that I need to update my Hikashop Business Version and will do so once I have finished this website. Thanks in advance.
-- Joomla version -- : 3.6.3
-- PHP version -- : 5.5.38
-- Browser(s) name and version -- : firefox nightly 52.0a1
-- Error-message(debug-mod must be tuned on) -- : Undefined property: CategoryViewCategory::$row in /home/wwwwhitepepperho/public_html/templates/protostar/html/com_hikashop/category/listing_div.php on
Notice: Trying to get property of non-object in /home/wwwwhitepepperho/public_html/templates/protostar/html/com_hikashop/category/listing_div.php on l
Hello All, I recently added a custom div to the Hikashop cateegory page. The div drops down over the top of the category image and contains a logo, category name and button. To allow the title to display I added the following : <?php echo $this->escape($this->row->category_name); ?> which works on all of the divs except the first one. The first one produces two errors, the first error is Undefined property: CategoryViewCategory::$row and the second is Notice: Trying to get property of non-object in. Can someone please help me to solve this issue. I realise that I need to update my Hikashop Business Version and will do so once I have finished this website. Thanks in advance.
Please Log in or Create an account to join the conversation.
10 years 2 weeks ago #253300
by nicolas
Replied by nicolas on topic Error message after adding category name
Hi,
That's normal, at the beginning of the listing_div view file, $this->row doesn't exist.
It is initialized after the line:
So I suggest that you move your code after that line (or move that line before your code) so that the variable already exists when you try to use it.
That's normal, at the beginning of the listing_div view file, $this->row doesn't exist.
It is initialized after the line:
Code:
$this->row =& $row;
Please Log in or Create an account to join the conversation.
10 years 1 week ago #253317
by edward68
Replied by edward68 on topic Error message after adding category name
Thanks Nicolas, I really appreciate your help. Thats fixed my problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds