I am hard coding a few custom pages in Opencart, and I am creating some filtered links.
For example:
http://quotespot.com.au/product/search& ... ory_id=275
I am manually hardcoding these types of links, BUT, i do not want to find the category_id each time, as I have a list of the filter_names and the category names i would like to filter by.
Is there a way I can get the category_id by providing the category name to match?
eg. of my code
Code: Select all
<?php
$catArray = array("pgh-bricks","bowral-bricks");
$multicatArray = array(
$catArray[0]=>array("solid","townhouse","summervilla"),
$catArray[1]=>array("common","dry-pressed","special-shapes")
);
?>
/*URL BELOW*/
<a href = "product/search&filter_name=<?php echo $multicatArray[$catArray[$i]][$b]; ?>&filter_category_id=<?php echo $catArray[$i]; ?>">
Any help would be much appreciated!!