Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    157
    Plugin Contributions
    0

    Default Default Customer Discount Group?

    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.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Default Customer Discount Group?

    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:
    Code:
                                'customers_email_format' => $email_format,
                                'customers_default_address_id' => 0,
    Insert a line between them, like this:
    Code:
                                'customers_email_format' => $email_format,
                                'customers_group_pricing' => 4,
                                'customers_default_address_id' => 0,
    Be sure to substitute your specific Group Number in place of the "4" in the example above.

    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.

  3. #3
    Join Date
    Feb 2009
    Posts
    157
    Plugin Contributions
    0

    Default Re: Default Customer Discount Group?

    Thanks, that is perfect, exactly what I wanted.

 

 

Similar Threads

  1. Different free shipping depending on customer discount group
    By elgar in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 25 Aug 2010, 12:06 AM
  2. Replies: 2
    Last Post: 24 Sep 2009, 02:52 PM
  3. Code: is customer member of discount group? - restricting view based on membership
    By wputler in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 8
    Last Post: 20 Feb 2009, 08:43 PM
  4. Applying a discount group to a customer automatically
    By cheddars in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 19 Sep 2006, 09:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg