Treat Add to Cart Button Differently Based on Login Status

A page should display like this for non-logged-in users:

And like this for logged-in users:

The Add to Cart button should not appear when a client is not logged in. However, with LiteMage enabled, the button was being displayed.

Normally, LiteMage serves the same cache copy for non-logged-in users and logged-in users alike. However, if Add to cart should only show to the logged-in user, this does not work. You will need to set Separate Cache Copy per Customer Group in general settings to Only distinguish between logged-in vs logged-out users. This makes it so that there are two copies of the page stored in cache: one for logged-in users and one for logged-out users.

This assumes that all logged-in users should see the same price. If there are different prices for different groups, then you will need to cache separate copies of the page for each customer group.

  • Admin
  • Last modified: 2018/06/26 21:01
  • by Lisa Clarke