开发者

How do I show information to users belonging to different groups (web) in modx

I have created a website using modx evolution v1.0.2.

The website that I have developed has 12 different types of users (categorized in groups). Each user will be shown a different price depending on the group to which he belongs.

Till now I have been able to fetch the group name of current logged in user (created a snippet for that), but how can I achieve the above mentioned functionality so that each user should be able to see only the price that I have coded according to his group.

For example:

If a user is associated with the 'ocassional' group then he should be shown the price as , say, 50 bucks and if a user is associated with the 'regular' group then he should be shown the price as, say, 40 开发者_运维技巧bucks

I can easily do this by coding a single snippet for every product's variant, but there are a lot of variants (more than 100 and growing).

I have created a resource(page) for every product and it's variant. Every variant has a price. It is this price that I want to be shown according to the logged in user group membership.

I hope I am able to explain my query clearly.

Please help me do this functionality.

Thanks


I'm not really convinced that modx (as much as i love it) is a great solution for e-commerce sites.

However, the best solution might be to use the database to store the prices of variants per user group and retrieve them yourself using a snippet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜