Post by mikemastercorp » Wed Jan 29, 2014 10:30 pm

Hi guys.

I am sorry if I did not got the right place to post and/or if my question has already been answered as I am new to OpenCart and most likely did not state the search query properly.

My goal is to have a main category, in which there would be subcategories and products. So what I need to achieve is when a visitor clicks on the main category, to show the subcategories with icons and only after selecting the chosen subcategory to view the products in it. The whole idea is that if you have lots of subcategories, the category menu becomes very long and inconvenient for users to scroll etc.

So to summarize:

Category 1
--Subcategory 1
--- Product 1
--- Product 2
--- Product 3

-- Subcategory 2
--- Product 1
--- Product 2
--- Product 3

-- Subcategory 3
--- Product 1
--- Product 2
--- Product 3


etc.

So now if someone clicks on Category one (parent category) and there are no products in it than the product field is empty. What I need is instead of seeing empty field to show the subcategories (Subcategory 1. Subcategory 2, Subcategory 3, and so on).

I hope I explained it well as it is my bad technical English that stops me from finding the right answer that might even be included in opencart 1.5.6 which I use for our store.

Well any help is highly appreciated and please do not judge too hard if the question have been answered or have a silly solving that I am not aware of ;)


Posts

Joined
Wed Jan 29, 2014 10:20 pm

Post by Xyph3r » Thu Jan 30, 2014 9:28 pm

i believe this is what you want
http://www.opencart.com/index.php?route ... on_id=3907

Don't worry...the 1.5.5.x version should work on 1.5.6.x too....the only problem is if you have a custom theme

ImageImageImage
Opencart Templates, Modules, Themes & Custom Development | ShopThemer


User avatar
Active Member

Posts

Joined
Sun Feb 10, 2013 1:08 am


Post by beebee » Sat May 21, 2016 12:06 am

Xyph3r wrote:i believe this is what you want
http://www.opencart.com/index.php?route ... on_id=3907

Don't worry...the 1.5.5.x version should work on 1.5.6.x too....the only problem is if you have a custom theme
Thank you "Xyph3r"!! This works perfectly in ver2.2. YAY!!

Is it possible to make is display only in the category page and not in the sub-category?
At present, it display as an extra image in the sub-category and the products are listed below them. I would like this icon showup only in the Category, next to Refine Search.

Any thoughts??

Also, I tried changing the text "Refine Search" and it came up with a blank page ???

BeeBee
When the going gets weird, the weird turn Pro!!


User avatar
New member

Posts

Joined
Thu May 12, 2016 5:13 pm

Post by beebee » Sat May 21, 2016 1:07 am

I removed the below code and it seems to work:

<div class="col-sm-2"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" title="<?php echo $heading_title; ?>" class="img-thumbnail" /></div>

BeeBee
When the going gets weird, the weird turn Pro!!


User avatar
New member

Posts

Joined
Thu May 12, 2016 5:13 pm

Post by cyclops12 » Sat May 21, 2016 4:28 am

beebee wrote:
Also, I tried changing the text "Refine Search" and it came up with a blank page ???
You can change the text in catalog/language/YOUR_LANGUAGE/product/category.php

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by beebee » Sat May 21, 2016 5:02 pm

cyclops12 wrote:
beebee wrote:
Also, I tried changing the text "Refine Search" and it came up with a blank page ???
You can change the text in catalog/language/YOUR_LANGUAGE/product/category.php
Thanks for replying cyclops12!
I'm sorry I didn't mention the path earlier. I had tried changing it in catalog/language/YOUR_LANGUAGE/product/category.php and it gave a blank page, and it's still the same.

BeeBee
When the going gets weird, the weird turn Pro!!


User avatar
New member

Posts

Joined
Thu May 12, 2016 5:13 pm

Post by cyclops12 » Sun May 22, 2016 2:13 am

What did you change in the language file ?

You should have

Code: Select all

$_['text_refine']       = 'Refine Search';

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by beebee » Sun May 22, 2016 5:23 pm

cyclops12 wrote:What did you change in the language file ?

You should have

Code: Select all

$_['text_refine']       = 'Refine Search';
Exactly!! I see this.
Now, when I change 'Refine Search' to let's say 'ABC' or 'XYZ' it gives me a blank page.
Error log shows:

PHP Parse error: syntax error, unexpected 's' (T_STRING) in /catalog/language/en-gb/product/category.php on line 3

So, I removed the text and left it blank $_['text_refine'] = '';. This works!

BeeBee
When the going gets weird, the weird turn Pro!!


User avatar
New member

Posts

Joined
Thu May 12, 2016 5:13 pm

Post by magikcommerce » Fri Jul 01, 2016 2:00 pm

Hi,

You can simply change code to below code :

Code: Select all

$_['text_refine']       = 'ABC';
Can you please let us know which code you are trying to add in language file which is generating blank page ?

Browse large collection of Premium OpenCart Themes


User avatar
New member

Posts

Joined
Mon Feb 09, 2015 5:55 pm
Location - San Jose, CA
Who is online

Users browsing this forum: No registered users and 7 guests