Jump to content

Module blocklayered on the front page [ver 1.5.2.0]


yucos

Recommended Posts

of cource it's possible, but you should work on it. I can help you a little. after line 2225 and 2581

it is after line

 $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1));

add this code

 $page_name = Dispatcher::getInstance()->getController();
 if($page_name == 'index') $id_parent= 2;//in frontpage = id_parent = 2(home category)

on line 1211 delete

 if (Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)) == 1)
  return;

And dont forget to set up in configuration, category depth 0 or more than 1.

 

 

this changes help you to see blocklayerd on front page but it would not work. you should make changes in your template file that makes to work correctly ajax request answer. for that the most important is presenting in your template (#product_list, than div#pagination, .category-product-count ) may bee someting more.

It worked on my test sight but i desided left standart module. As for mee it's better . good new year!!!

Link to comment
Share on other sites

of cource it's possible, but you should work on it. I can help you a little. after line 2225 and 2581

it is after line

 $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1));

add this code

 $page_name = Dispatcher::getInstance()->getController();
 if($page_name == 'index') $id_parent= 2;//in frontpage = id_parent = 2(home category)

on line 1211 delete

 if (Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)) == 1)
  return;

And dont forget to set up in configuration, category depth 0 or more than 1.

 

 

this changes help you to see blocklayerd on front page but it would not work. you should make changes in your template file that makes to work correctly ajax request answer. for that the most important is presenting in your template (#product_list, than div#pagination, .category-product-count ) may bee someting more.

It worked on my test sight but i desided left standart module. As for mee it's better . good new year!!!

What file should to editing ..??

Link to comment
Share on other sites

  • 1 month later...

Is there any similiar solution for 1.4.9 ? i tried this on 1.4.9 , but script didn't load anything..

 

did you made this?

this changes help you to see blocklayerd on front page but it would not work. you should make changes in your template file that makes to work correctly ajax request answer. for that the most important is presenting in your template (#product_list, than div#pagination, .category-product-count ) may bee someting more

 

Script load result to containers #product_list, div#pagination, .category-product-count

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

did you made this? Script load result to containers #product_list, div#pagination, .category-product-count

It's before that... when i apply changes in blocklayered.php i get this error in my error_log:

[17-Feb-2013 03:38:58] PHP Fatal error:  Class 'Dispatcher' not found in /home/mydirectory/modules/blocklayered/blocklayered.php on line 2223

and site won't load.

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

yes dispatcher is only for 1.5. there is soemting else to determinate wether frontpage but i didnt remember.

try write with number "2"

 $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 2));

 

and not use

 

$page_name = Dispatcher::getInstance()->getController();

if($page_name == 'index') $id_parent= 2;//in frontpage = id_parent = 2(home category)

maybe helps )

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

  • 3 months later...
  • 3 months later...
  • 4 weeks later...

Hi, i try to show blocklayered on manufacter page. 

 

The code for fornt page are:

$page_name = Dispatcher::getInstance()->getController();
if($page_name == 'index') $id_parent= 2;//in frontpage = id_parent = 2(home category)

For Manufacturer page, what code i changed???

$page_name = Dispatcher::getInstance()->getController();
if($page_name == 'manufacturer') $id_parent= 2;

¿¿¿????

Link to comment
Share on other sites

  • 10 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...