sma22 Merchant Od Sweden Użytkownik od sty 2022 sma22 6 lut 2022 07:55 Hi all LiteCart users a small question has a store that we would like to be able to set payment methods for each customer. For example, a customer may have a case in delivery invoive and a card. Another customer may have only cards another may have cash and cards. Or if they exist so you can put paid sweets on a customer category or so. Very good shop easy to work on
tim Founder Od Sweden Użytkownik od maj 2013 tim 7 lut 2022 23:41 No such preexisting add-on. But if you search for an existing property in the customer profile you can see all places you can modify to squeeze a new property in. Example: https://github.com/litecart/litecart/search?q=lastname The payment module needs a condition: if (!in_array(__CLASS__, preg_split('#\s*,\s*#', customer::$data['payment_modules'], -1, PREG_SPLIT_NO_EMPTY))) return;
sma22 Merchant Od Sweden Użytkownik od sty 2022 sma22 9 lut 2022 14:02 Hello Ok but want to be able to set so that some can pay by invoice others only by card etc.
tim Founder Od Sweden Użytkownik od maj 2013 tim 9 lut 2022 16:51 Yes that is what I had in mind. So.. Add a new property to the customer object in the database lc_customers. Edit the entity object so the platform can load and save the data. Edit the edit_customer backend page so you can manage this data. Add that condition to your modules having them check if they are allowed to be displayed.