Is there a way of setting, or scripting Zen-Cart so that all new customers are assigned a discount pricing group?
I want to set my website so that all new customers automatically go into a "General" pricing group for various reasons.
Is there a way of setting, or scripting Zen-Cart so that all new customers are assigned a discount pricing group?
I want to set my website so that all new customers automatically go into a "General" pricing group for various reasons.
Doug Mewis
https://cheyennestbaldricks.com
By default all customers are assigned to group=0.
To change that you'll have to make an edit to the code:
1. Go to Admin->Customers->Group Pricing, and create the new group. When you click to Edit that new group, the URL will change to show the group ID number. Note it.
2. Copy /includes/modules/create_account.php to /includes/modules/NAME_OF_YOUR_CUSTOM_TEMPLATE/create_account.php
3. Then edit that new file as shown below:
Around line 255 you'll see these 2 lines:Insert a line between them, like this:Code:'customers_email_format' => $email_format, 'customers_default_address_id' => 0,Be sure to substitute your specific Group Number in place of the "4" in the example above.Code:'customers_email_format' => $email_format, 'customers_group_pricing' => 4, 'customers_default_address_id' => 0,
And of course save the changes to your server.
Now every time a customer registers, he/she will be automatically added to that group.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks, that is perfect, exactly what I wanted.
Doug Mewis
https://cheyennestbaldricks.com