Hi,
I'm new in the forum, so hello everyone !!!
I don't know if here if the right place to post this question, if it isn't please move it to the right place...
My problem is the following, I hope someone can help me...
I Will like to make an automátic discount to the costumers who do registering in my shop.
I have already created a customer group called " registered customers" and I have make a general discount in it.
The problem is that I don't know how to make customer change automatic from the "default group" to "registered customers" group once he has made the registration.
I do not want to do it manually becouse I would like customer haven't to wait until he is able to buy with the discount.
Also don't want to apply the discount in the default group becouse I don't want not registered people see all the discount prices.
Anyone knows a module or a modification to do this ??
Thanks a lot !
I think this may work for you:
open: catalog/model/account/customer.php
find:
inline find:
Replace with the id of your registered customer group.
open: catalog/model/account/customer.php
find:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', password = '" . $this->db->escape(md5($data['password'])) . "', newsletter = '" . (isset($data['newsletter']) ? (int)$data['newsletter'] : 0) . "', customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "', status = '1', date_added = NOW()");
Code: Select all
" . (int)$this->config->get('config_customer_group_id') . "
Hello,
Thanks for your answer !
I've tried but it doesn't work... when I try to register it break down and show a white page.
I hope I've understood the change you indicate...
I've replaced all this sentence ". (int)$this->config->get('config_customer_group_id') ." for the customer group id that in my case is "8" is that ok or I've miss understood you.
Thanks!!
Thanks for your answer !
I've tried but it doesn't work... when I try to register it break down and show a white page.

I hope I've understood the change you indicate...
I've replaced all this sentence ". (int)$this->config->get('config_customer_group_id') ." for the customer group id that in my case is "8" is that ok or I've miss understood you.
Thanks!!
I also need this funtion as the subject, however my opencart verion is 3.0.3.
I can't find where to modify the code correctly...
I can't find where to modify the code correctly...
Who is online
Users browsing this forum: No registered users and 4 guests