Jump to content

Featured Product set to "active" by default.


Recommended Posts

I've been search around here for awhile now and I'm giving up and I'm just going to ask. 

 

How/where do I set which module is the "active" one on the home page. New appears to always be the active on no matter what the ordering of the modules are in the displayHomeTab & displayHomeTabContent hooks. 

 

I want the featured module to be the active one on page load.

 

So I'm guessing it has to be set in a template file somewhere?

 

TIA,

Don

Edited by stnadmin (see edit history)
Link to comment
Share on other sites

Thanks vekia, I understand how to assign products to the featured module through assigning products to the "Home" category. What I'm attempting to do is change the "active" tab and tab content when you land on the home page. 

Currently with the new default template in 1.6 the initial active tab and tab content is "NEW ARRIVALS" but I would like "POPULAR" or the "Featured products on the homepage" to be the default active one. 

 

for example if you go to http://vendor.stoysnet.com/ the active tab is "NEW ARRIVALS"

 

dWcvycm.png

 

I want it to be "POPULAR".

 

Thanks,

Don

  • Like 1
Link to comment
Share on other sites

you have to rearrange module positions under module > positions tab in BO

change position of the homefeatured module (move it to the top of the list) in:

 

displayHomeTop

displayHomeTopContent

 

in some cases it's necessary to clear cache after this action.

  • Like 2
Link to comment
Share on other sites

you have to rearrange module positions under module > positions tab in BO

change position of the homefeatured module (move it to the top of the list) in:

 

displayHomeTop

displayHomeTopContent

 

in some cases it's necessary to clear cache after this action.

 

 

I tried that and it didnt work.  I played around a little more, since I understand boostrap I saw the tab had class="active".... I did a text search through all the module locations, ripped out anything that says "active", the if statements, etc... and uploaded everything and cleared the cache and now it gives me the desired layout.

 

CHanging the order moved the popular tab to the front, but the new items was still selected.

  • Like 1
Link to comment
Share on other sites

Thanks vekia,

 

I had tried that as well and it didn't seem to work even with clearing my browser's cache. But then I switched on friendly URLs and it is now working. It probably has nothing to do with turning on friendly URLs and was just one of those lovely issues with Chrome and deep caching. 

Anyway your solution did work for me but it took a while for it to change. 

 

Don

Link to comment
Share on other sites

  • 3 weeks later...

same to me, Tried to replace the New arrivals with Popular 

and it wouldn`t work untill I recompiled the smarty and just in case turned off the cache.

Afterwards worked immediately 

 

 

--------------------------------------a-nice-quote-found-somewhere-around-here

Well engineered projects are indistinguishable from crazy ideas.

Link to comment
Share on other sites

  • 1 month later...

Hi I had a similar problem, somehow both tabs were active at the same time. So new products and populair products were active at the same time and from both the products were showing on the home page. Unhooking and hooking again didn't work for me as well, also clearing cache didn't work for me. 

 

The thing that did work was a combination of solutions presented here, I did all above unhooking and hooking, clearing cache, and the magic apeared when I switched friendly URL off and saved. I could then switch friendly URL back on and the problem was gone...

 

working on chrome, haven't tested on other browsers??

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

so you mean block cms not blog cms ;)

now i know about what module you're talking

go to modules > positions and transplant module to this new hook (right top section you will see there anhor button - click on it you will open transplantation page)

 

from first dropdown select module (block cms) from second select displayHome hook.

Link to comment
Share on other sites

open module .php file (modules/blockcms/blockcms.php) and before last closing bracket add

public function hookHome($params)
{
return $this->displayBlockCMS(BlockCMSModel::LEFT_COLUMN);
}
 
module will display then in home hook blocks created for left column
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...