Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2009
    Posts
    14
    Plugin Contributions
    0

    Default Move customers automatically to defined pricing group after first purchase

    Hi, firstly i'd like to thank all the contributors for their efforts over the years. I cannot tell you how many times i have used this forum to find the answers i was looking for. Thank you.

    But, I have been searching for sometime now and unable to find a solution to something i need. I can see how you can add 'New Users' to 'Group Pricing' automatically, but i want to add them after they make their first purchase. Instead of installing a Reward Points module to give Returning customers a discount, i'd rather use this.

    Perhaps an SQL update on the Email Order Confirmation. Or when you update an order from 'Pending' to 'Shipped'?

    Any assistance would be greatly appreciated. p.s my php is lousy!

    Thank you

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Move customers automatically to defined pricing group after first purchase

    Do you want this to happen when the Order is placed?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Oct 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: Move customers automatically to defined pricing group after first purchase

    Yes, after the order is placed an SQL statement will UPDATE the group_pricing to '2' or whatever number you wish.

    Thank you

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Move customers automatically to defined pricing group after first purchase

    NOTE: If there is any reason that you do not ALWAYS what to update the Customer to Group ID (customers_group_pricing) 2, you will need to add additional limits ...

    Edit the file:
    /includes/classes/order.php

    and around line 645 add the code in RED where 2 is the customers_group_pricing you want to change the customer to be in:
    Code:
        zen_db_perform(TABLE_ORDERS, $sql_data_array);
    
    // bof: set customer group to 2
       $update_customers_group_sql = "update " . TABLE_CUSTOMERS . " SET customers_group_pricing = '2' WHERE customers_id = '" . $_SESSION['customer_id'] . "'";
       $db->Execute($update_customers_group_sql);
    // eof: set customer group to 2
    
        $insert_id = $db->Insert_ID();
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2014
    Location
    california
    Posts
    6
    Plugin Contributions
    0

    Default Re: Move customers automatically to defined pricing group after first purchase

    Yes, upon login. Also, I'd like to be able to offer it as a special and discontinue. thank you.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Move customers automatically to defined pricing group after first purchase

    So you want all current customers to be in this group and new customers to automatically be added to this group and then be able to set the group discount amount and whether or not is is available at any time correct?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v151 Group Pricing automatically assigned from email link
    By denliv in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 24 Mar 2014, 11:17 PM
  2. New customers automatically join defined pricing group
    By gaekwad in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 23
    Last Post: 7 Nov 2012, 05:43 PM
  3. automatically add customers to group pricing
    By trickobrien in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 23 Aug 2010, 11:10 AM
  4. Add certain customers to Group automatically...
    By rebekah in forum Managing Customers and Orders
    Replies: 5
    Last Post: 20 Apr 2009, 10:00 PM
  5. $10 off first purchase automatically
    By rxalex in forum General Questions
    Replies: 2
    Last Post: 11 Sep 2007, 04:11 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR