Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest
  • Page:
  • 1

TOPIC: slideshow-cat.php error

slideshow-cat.php error 10 years ago #18486

  • avreliy
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
After I installed the template use quickstart. I rusificate my site and after that got "Warning: Invalid argument supplied for foreach() in Z:\home\maraz.ru\www\templates\sj_appstore_hitech\html\com_virtuemart\category\slideshow-cat.php on line 18" and blank page.
Pls help to resolve.

Re: slideshow-cat.php error 10 years ago #18514

  • SA Hoang
Hello,

Please open templates/sj_appstore_hitech/html/com_virtuemart/category/slideshow-cat.php file, find this code:

foreach($this->category->children as $categoryID){
$category_filter .= ",'".$categoryID->virtuemart_category_id."'";
$query = "SELECT c.category_child_id as cat_child
FROM #__virtuemart_category_categories as c
WHERE c.category_parent_id='".$categoryID->virtuemart_category_id."'
";
$db->setQuery($query);
$id = $db->loadObjectList();
if($id){
foreach($id as $id){
$category_filter .= ",'".$id->cat_child."'";
}
}
}


and change to:
if (sizeof($this->category->children) > 0) {
foreach($this->category->children as $categoryID){
$category_filter .= ",'".$categoryID->virtuemart_category_id."'";
$query = "SELECT c.category_child_id as cat_child
FROM #__virtuemart_category_categories as c
WHERE c.category_parent_id='".$categoryID->virtuemart_category_id."'
";
$db->setQuery($query);
$id = $db->loadObjectList();
if($id){
foreach($id as $id){
$category_filter .= ",'".$id->cat_child."'";
}
}
}
}


Thanks

Re: slideshow-cat.php error 10 years ago #18515

  • SA Hoang
Hello,

Please open templates/sj_appstore_hitech/html/com_virtuemart/category/slideshow-cat.php file, find this code:

foreach($this->category->children as $categoryID){
	$category_filter .= ",'".$categoryID->virtuemart_category_id."'";
	$query = "SELECT c.category_child_id as cat_child
			  FROM #__virtuemart_category_categories as c
			  WHERE c.category_parent_id='".$categoryID->virtuemart_category_id."'
	";
	$db->setQuery($query);
	$id = $db->loadObjectList();
	if($id){
		foreach($id as $id){
			$category_filter .= ",'".$id->cat_child."'";
		}
	}
}


and change to:
if (sizeof($this->category->children) > 0) {
	foreach($this->category->children as $categoryID){
		$category_filter .= ",'".$categoryID->virtuemart_category_id."'";
		$query = "SELECT c.category_child_id as cat_child
				  FROM #__virtuemart_category_categories as c
				  WHERE c.category_parent_id='".$categoryID->virtuemart_category_id."'
		";
		$db->setQuery($query);
		$id = $db->loadObjectList();
		if($id){
			foreach($id as $id){
				$category_filter .= ",'".$id->cat_child."'";
			}
		}
	}
}


Thanks
  • Page:
  • 1
Time to create page: 0.21 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes