quote
I've edited my templates to grant customers the ability to edit the bill date, quantity and hold status of their subscriptions. It works great, but what if I want to prevent specific customers from having this control?
To prevent specific customers from editing the bill date, quantity or hold status of their subscription, two things must be done.
-
First, create a Customer Group for these customers.
-
Then, edit your "customer_account_1.tpl" template to display the regular versions of those subscription fields to customers of that group.
prerequisites
An example of how to prevent customers from editing these aspects of their subscription can be found below:
Creating the Customer Group
The first step to preventing your specific customers from editing their subscription, is to group em' up.
1. In your Administration Area, locate [Customers > Search Customer Groups > + ].
2. Name the group, using the Group Name option.
3. For the option, How to apply rules below, select: match ANY of the rules below.
4. Under Add a Rule to this Customer Group, set the rule as:
Type: Customer Account
Details: SID (System ID) is 123*
(*Replace "123" with appropriate Customer SID number.)
5. Click Save Changes.
6. Repeat steps 4-5 for each customer to be added to the group.
Take note of the Customer Group SID number. It will be needed shortly.
Editing the customer_account_1 template
Next, the "customer_account_1.tpl" template will need to be altered to display different options to the customers in this group. We want to set the template up so that customers that are not in the group will view the editable fields, and customers who are in the group will view regular, non-editable text.
The template should be edited as follows:
1. In your Administration Area, locate [Design > Template Package Sandbox].
2. Select a Template Package to Edit.
3. Under Template Package Options, select "customer_account_1.tpl".
4. In the Template Editor, locate and change the follow QuickCode Tags:
5. Click Save Changes.
Results
With those changes:
-
Customers who are not in the group will be presented with editable subscription fields.
-
Customers who are in the group will be presented with non-editable subscription fields.
Frequently Asked Questions
question
Well, what if I want the opposite effect? What if I want to prevent all customers from having access to the editing of their subscription by default, with just a select few that do?
answer
A very similar approach should be taken to get that result:
-
A customer group should instead be created for those few customers deemed worthy of editing their own subscriptions.
-
Then, the {FIELD-PRODUCT-XXX} tags replaced with: {IF-CUSTOMER-IN-GROUP-BEGIN:123}{FIELD-PRODUCT-XXX}{ELSE}{PRODUCT-XXX}{IF-CUSTOMER-IN-GROUP-END}
( Be sure to replace "123" with appropriate Customer Group SID number.)
This would allow the customers in the group to view the editable fields, and all other customers to view the non-editable versions.
|