cancel
Showing results for 
Search instead for 
Did you mean: 

Terms and Conditions per user group

SOLVED

Terms and Conditions per user group

Hi,

 

I am currently working on a site that is CE 1.7 and hopefully this is just a simple questions and there is a straightforward enough answer.

 

I work for a wholesaler so my site needs to work a little differently to most, with each user group having their own product range. I have coded into the header a script that can determine which user group is logged in and this updates the menus to have links to their products. I have set it up so that each user group can only see their own products just in case something goes wrong with the setup. 

 

My problem now is that we have had customers request customer specific terms and conditions. I have it set up currently so that they are all agreeing to the same.

 

I have tried to put php script directly in the terms and conditions to check the user group but it doesn't seem to run. I have tried to call a template with the code inside within the T&C but again it doesn't seem to run. (And put code into my T&C at the customers end)

 

I have looked online and apparently I can edit the terms and conditions function to see who is logged in but I have no idea where I need to add the code to and how to get it to interact with the T&C. 

 

If someone could point me in the right direction it would be greatly appreciated.

 

Thanks in advance,

Jeremy

1 REPLY

Re: Terms and Conditions per user group

I'm not sure how you want to approach managing the different agreements for the different customer groups. 

 

The checkout loads the agreements collection in this function: https://github.com/OpenMage/magento-mirror/blob/505e8e982ad5f4fd22005060564cad210aab7b6f/app/code/co...

 

You could modify each agreement based on customer group at this point as one approach. 


Presumably when you said you'd tried editing the template, it was this one you were overriding? https://github.com/OpenMage/magento-mirror/blob/505e8e982ad5f4fd22005060564cad210aab7b6f/app/design/...

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!