Jump to content

Hide restricted product on manufacturers page


Recommended Posts

Hi there its my first post so first of all wanna say hello to all :)

Okay now to my problem (don't know if im in good category) im using great plugin from NemoPS, Product Access FREE to have certain products only for premium group. Module works great but iv got manufacturer module on front page and when guest user enter manufacturer who has that premium product than he see that product, its restricted and can't enter to that product but I don't want that premium product to be seen on manufacturer list too. Is there any chance someone can help me? :)

I will be very grateful :) 

Thanks!

Link to comment
Share on other sites

52 minutes ago, ndiaga said:

Hi,

You  should  add the  restriction   in   the  manufacturer   template   by using  the id  group.

 

Yeah i tried to do "if" statement but im not good in php and second of all its not working so im doing something wrong :) there is something like $access_groups but if I tried

{if $access_groups['id_profile'] == 4}
	do something
else
	do something else
{/if}

where number 4 is id of premium group. 

Link to comment
Share on other sites

I used an override for the category, so you'll have to edit manufacturer.php, getProducts method.
Check the category.php override and see every place where I added this

                    ' AND pg.id_group '.(count($cgroups) ? 'IN ('.implode(',', $cgroups).')' : '= 1').

Unfortunately I had forgot to check that page back then, I thought it was covered by the product override but it wasn't, sorry for that

Link to comment
Share on other sites

20 hours ago, NemoPS said:

I used an override for the category, so you'll have to edit manufacturer.php, getProducts method.
Check the category.php override and see every place where I added this

                    ' AND pg.id_group '.(count($cgroups) ? 'IN ('.implode(',', $cgroups).')' : '= 1').

Unfortunately I had forgot to check that page back then, I thought it was covered by the product override but it wasn't, sorry for that

NemoPS thank you for your answer :) whoa ill try to do that by myself we will see if I handle it by myself :P 

P.S. maybe it working with standard manufacturer module. But template what I bought is using other module for manufacturers, so maybe there is a problem.

 

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

Sorry for post bump.

20 hours ago, NemoPS said:

I used an override for the category, so you'll have to edit manufacturer.php, getProducts method.
Check the category.php override and see every place where I added this

                    ' AND pg.id_group '.(count($cgroups) ? 'IN ('.implode(',', $cgroups).')' : '= 1').

Unfortunately I had forgot to check that page back then, I thought it was covered by the product override but it wasn't, sorry for that

Well i tried to get it done but my php knowledge is maybe little more than basics. Is there any chance You can help me NemoPS? 

I found in your module category.php those lines you mention and I found getProducts in classes/Manufacturer.php.  But what to do with that?

Link to comment
Share on other sites

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