elari Posted December 19, 2002 Share Posted December 19, 2002 working progress... What it does This contrib will be used to define some groups of customers that are called status (i will now write cs for meaning customers tatus) - these status can be used for organizing customes like : trustable, take care, banned, cheater or whatever else you want (members level, reseller level,....) - set if cs is a visible status in catalog for customers, and will display the status in the greeting page - members (using member_flag in customers table) - set a % discount on price for each group of customer (ex members -10% & reseller -25% & reseller level2 -35%) to preserve margin on some low profit product, you can set for each product a max discount allowed only the max allowed discount will apply in shop and order - set a % discount on order total based on Ian Wilson ot_xmember members discount) this discount will apply whatever is the max discount allowed on products, is reported in checkout and order. First copy and install the files for ot_xmembers (= Members Discount v2.x in Oscommerce Contrib Pages) You can dowload it here : http://www.oscommerce.com/downloads.php/co...ions,357/type,6 or look at author site : http://www.phesis.co.uk for updated cvs http://sourceforge.net/projects/phesis/ or http://cvs.sourceforge.net/cgi-bin/viewcvs...hesis/xmembers/ - set if staffelpreis will ot not apply to this cs (is still on pending work to do...) when apply, it will show qty/price if defined for this cs. if none is set, the default staffel will apply if allowed - set some unallowed payment for this group (is still on pending work to do..., this is added for olby purchase order) - send newsletter to one or more groups of customers - send mail to one or more cs (pending work) - for each cs, you select an icon, that will be displayed in the customers admin panel & with each order - in admin/customers panel you can display all customers or only a particular cs and set cs for each customer; like for orders an history of cs change is displayed. - you can install loginbox included in support_ticket in my cvs to display in login/account box the status of customer when he is logged in - in account pannel, cs is displayed with more details if you have set the status to be public - to do finishing the newsletter module / mail finishing disabling the payment module when set unallowed finishing staffelpreis finishing customers ip & host login in customers acccount admin panel, ip will be stored in order too sending order email in html (maybe pdf?) some change made to orders status to support Dynamic order status and final order status for accounting i need some people having time to try on fresh install for debugging install who want can send pm Quote Link to comment Share on other sites More sharing options...
elari Posted December 20, 2002 Author Share Posted December 20, 2002 some screenshot and some finished work.... Define customers status & options customers listing a status define new status and show history Look for customers ip tracking (90% finished, working, include ip when order in table order ) Select customers for Newsletter (working) Customer get is account info and details when his status is defined public And guestbook Quote Link to comment Share on other sites More sharing options...
elari Posted December 24, 2002 Author Share Posted December 24, 2002 Cstatus 3.x now set for customers to register only for newsletters it use the same customers table, only it use the cs to manage it. this way it will avoid having duplicate tables i need some people making test & create account @ this link http://www.unlockgsm.com/test_checkout/cat...ount.php?news=1 and try to edit account, buy or so... after the customer have ability to upgrade account to be able to buy. (by default the cs defined for newsletter is not allowed to buy.) Quote Link to comment Share on other sites More sharing options...
elari Posted January 6, 2003 Author Share Posted January 6, 2003 Customers Status 3.x 2n0105 released in contrib area thanks for testing and waiting feedback . Quote Link to comment Share on other sites More sharing options...
Clement Posted January 7, 2003 Share Posted January 7, 2003 Hi elari, I was waiting for 3.x of this mod. I think is a very very usefull mod. My problem is very big ------ the instalation. I have a very good file diff checker but, for me is very very hard job to modify those file with different mods in it. Your files includes some mods and my files includes other mods. In this case installation become a very dangerous job. I don't know which part of your code is from cs and which from other mods. Maybe you can comment the part of code belong to cs mode..... This comments will be very helpfull and the instalation became less dangerous. Thank you, Quote Link to comment Share on other sites More sharing options...
elari Posted January 7, 2003 Author Share Posted January 7, 2003 1/ yes it is hard to install a contrib that works so near to the core of oscommerce, but i prefer this way instead of making new redundant query and functions that can make the install easier. 2/ all files in admin_add catalog_add can be copy in the according files in your server, they do not replace any osc files. (application_top, general, language only need a require to add additional data) 3 / files includes in osc_filesadmin &catalog MUST be compared with your files. I prefer using Examdiffpro from Prestosoft. the files are based on ~ lastest osc commit from end November and not many change has been made. if you don't have a recent snapshot, first upgrade to a recent snapshot when i have installed a mod concerning CS it is commented before with something like // elari CS x.x or something more significant most other mods are also designed except maybe the change buy now link by form or enable/diasble categories 4/ i will try to make more comment in those files and remove some unusefull test echo... I'm sorry i have no way to make it more easy to install. if you want to go nearest the code i use, install two other mod DOS_Payment (this is a very low change to make) Qty Breakout & Display Status Quote Link to comment Share on other sites More sharing options...
frog Posted January 8, 2003 Share Posted January 8, 2003 Sweet Elari, Do you think it's possible to have a discount like this: Group A): discount 10% (default) if (total_order_from_the_members) > 5000 discount=default + 5% if (total_order_from_the_members) > 15000 discount=default + 8% the system would check the situation automatically possible? can I pay for this contribution and how much? thanks Quote Link to comment Share on other sites More sharing options...
elari Posted January 8, 2003 Author Share Posted January 8, 2003 yes i think it should be done... not very hard i think but not so easy too :))) i will try to take a look and tell you only one thing do you need always the same + discount to be added for all statuses or you want/need to set different added discount for each separate status... Quote Link to comment Share on other sites More sharing options...
frog Posted January 8, 2003 Share Posted January 8, 2003 lovely elari, thanks for Your reply. :D I'll try to be much clear: we have much groups, inside the groups there are much members. every member's order total give a certain global_group_amount the discount scaling should be more or less like the level_discount contribution so: Group: 1000:5%|2000:6%|5000:8%|.......and so on every member of the group has the discount reserved to the entire group. don't know if this is impossible... anyway...just an idea salut! frog PS.:elari...is this name male or female? Quote Link to comment Share on other sites More sharing options...
elari Posted January 8, 2003 Author Share Posted January 8, 2003 frog frog some questions 1/ how many scale are needed 2/3 or many more no fixed scale ? 2/ discount member buy 10000 hope :))) so you make 8% on total 10000 = 800 or 5% on 1000 = 50 6% for 1001 to 2000 = 59.94 8% for 2001 to 10000 = 639.92 => discount = 749.86 3/ order total of the group on one period of time or as long the group buy the amount grow in fact i have an idea about the way can be done, but i need to know if you can use cron job (if yes, i'll have to study cron :)) or you'll have to make the update of total order for the group each time you want to check other fact, if an user buy with a status and then update his status, the order he paid before will be included in the oldest status which country are you from ? Quote Link to comment Share on other sites More sharing options...
elari Posted January 8, 2003 Author Share Posted January 8, 2003 after rereading myself, i see that i misunderstand myself :( do not read the part about the discount it was no sense... and please pm you'r email we can not continue this issue inside the forum Quote Link to comment Share on other sites More sharing options...
frog Posted January 8, 2003 Share Posted January 8, 2003 lovely elari, please contact me : [email protected] Quote Link to comment Share on other sites More sharing options...
frog Posted January 8, 2003 Share Posted January 8, 2003 1/ how many scale are needed 2/3 or many more no fixed scale ? maybe the second is more "free" 2/ discount member buy 10000 hope )) so you make 8% on total 10000 = 800 or 5% on 1000 = 50 6% for 1001 to 2000 = 59.94 8% for 2001 to 10000 = 639.92 => discount = 749.86 mmmmmmm never thought of that......elari, You are the man! it's very good logic indeed see ya FroG - [email protected] Quote Link to comment Share on other sites More sharing options...
Clement Posted January 9, 2003 Share Posted January 9, 2003 So, You right, the install of CS isn't impossible. But I have some little problems. 1. If the customes sign-up with a newsletter only account, his customer status will be the default customer status (in general - new customer) but no newsletter only cs. 2. The second problem: How a customer will upgrade from newsletter only statuts to the full registered member status? Thank you for your help, Quote Link to comment Share on other sites More sharing options...
Clement Posted January 9, 2003 Share Posted January 9, 2003 Ok. I here is the fix for the first problem when a customer want to register as newsletter only but he/she became a "new customer" (or other default status). After the user fill the form from file create_account.php?news=subscribe, he she must push the "Continue" button. This button send some variables to the next file in process (create_account_process.php). But $news='subscribe' is missing for create_account_process.php file . So, I inserted a hidden input in the create_account.php file (around line 90) : <?php /* INSERTED by Nick because this variable is missing <input type="hidden" name="news" value="<?php echo '$news'; ?>"> */ ?> <td width="100%" valign="top"><form name="account_edit" method="post" <?php echo 'action="' . tep_href_link(FILENAME_CREATE_ACCOUNT_PROCESS, '', 'SSL') . '"'; ?> onSubmit="return check_form();"><input type="hidden" name="action" value="process"><input type="hidden" name="news" value="<?php echo '$news'; ?>"><table border="0" width="100%" cellspacing="0" cellpadding="0"> Still remain for me the problem for upgradeing to a new status for newsletter only. Thanks, Quote Link to comment Share on other sites More sharing options...
Clement Posted January 9, 2003 Share Posted January 9, 2003 Another problem was that in account.php file (for registered or newsletter only) the customers_newsletter_mode is displayed always as "text only" but the members choose html and in the DB is html, too. FIX: The problem is in account.php file at the DB querry : Insert in the querry (around line 113) "c.customers_newsletter_mode" right before "from" and after "c.customers_newsletter" $account_query = tep_db_query("select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_zone_id, a.entry_state, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_newsletter_mode from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where c.customers_id = '" . $customer_id . "' and a.customers_id = c.customers_id and a.address_book_id = '" . $customer_default_address_id . "'"); Thanks, Quote Link to comment Share on other sites More sharing options...
Clement Posted January 9, 2003 Share Posted January 9, 2003 An now, A VERY BIG ONE: I am loged in as 3% customer. After some navigation, I see that "You can not see price" and no "customer status" right box. At a look in the DB, the customers_status from the customers table, I see that customer status was RESETED to "0" from "4". Can help me with this problem, too ? Thank you, Quote Link to comment Share on other sites More sharing options...
elari Posted January 9, 2003 Author Share Posted January 9, 2003 to clement 1. If the customes sign-up with a newsletter only account, his customer status will be the default customer status (in general - new customer) but no newsletter only cs. this is set in admin/my shop, confirguration table include two more field for setting the newsletter status. and an other one for he guest (like the default order status for new client) 2. The second problem: How a customer will upgrade from newsletter only statuts to the full registered member status? when he goes in my account he can upgrade his account to full customer. (el bavaro found already a display bug) but you can upgrade :) go to my demo page and look at it. Also when you buy products you are redirect to upgrade account. you have already this <?if ($HTTP_GET_VARS['news'] == 'subscribe') { echo '<input type="hidden" name="news" value="subscribe">'; } ?> near line 57 in create_account and for newsletter_mode it is included in account.php (it is in my file around line 69....) buit you speed about line 113 while all my catalog/account.php make 116 line !!!!! i think you are using a wrong package file.... the last one is status_v3.x.2n0105.oknewsletterupgrade.zip published in contrib section but maybe it include some old files i will try to check it again if i made no mistake Quote Link to comment Share on other sites More sharing options...
elari Posted January 9, 2003 Author Share Posted January 9, 2003 it seems i have forgot to publish account.php in package ... i will rebuild a package today :( sorry to all but i use a batch file and some time i forgot to update it to include some new changed file.... i'm finishing few cosmetic in files to tell little more for which contrib they are last proble clement with cs resetted to 0, i have got this problem a time when working on cs but has been fixed on my server so please check the field cstatus in table customers here is mine CREATE TABLE customers ( customers_id int(11) NOT NULL auto_increment, customers_gender char(1) NOT NULL default '', customers_firstname varchar(32) NOT NULL default '', customers_lastname varchar(32) NOT NULL default '', customers_dob datetime NOT NULL default '0000-00-00 00:00:00', customers_email_address varchar(96) NOT NULL default '', customers_default_address_id int(5) NOT NULL default '1', customers_telephone varchar(32) NOT NULL default '', customers_fax varchar(32) default NULL, customers_password varchar(40) NOT NULL default '', customers_newsletter char(1) default NULL, customers_newsletter_mode char(1) NOT NULL default '0', member_flag char(1) NOT NULL default '0', customers_status int(5) NOT NULL default '0', PRIMARY KEY (customers_id) ) TYPE=MyISAM; and for customers_status CREATE TABLE customers_status ( customers_status_id int(11) NOT NULL default '0', language_id int(11) NOT NULL default '1', customers_status_name varchar(32) NOT NULL default '', customers_status_public int(1) NOT NULL default '1', customers_status_image varchar(64) default NULL, customers_status_discount decimal(4,2) default '0.00', customers_status_ot_discount_flag char(1) NOT NULL default '0', customers_status_ot_discount decimal(4,2) default '0.00', customers_status_staffelpreis char(1) NOT NULL default '', customers_status_payment_unallowed varchar(255) NOT NULL default '', customers_status_show_price int(1) NOT NULL default '1', customers_status_show_price_tax int(1) NOT NULL default '1', PRIMARY KEY (customers_status_id,language_id), KEY idx_orders_status_name (customers_status_name) ) TYPE=MyISAM; i know the field have not the same size... but i will look at this when i'll use more than 99999 statuses... Quote Link to comment Share on other sites More sharing options...
elari Posted January 9, 2003 Author Share Posted January 9, 2003 cs 3.x has been repackaged and updated in contrib area.. again sorry for missing files Quote Link to comment Share on other sites More sharing options...
elari Posted January 9, 2003 Author Share Posted January 9, 2003 i would must go sleeping.... the contrib is here http://www.oscommerce.com/community/contributions,874 instead of the correct contrib page http://www.oscommerce.com/community/contri...ions,315/page,3 hope harald can put it back in the correct folder or delete the wong contrib ???? Quote Link to comment Share on other sites More sharing options...
Clement Posted January 9, 2003 Share Posted January 9, 2003 it seems i have forgot to publish account.php in package ...i will rebuild a package today :( sorry to all but i use a batch file and some time i forgot to update it to include some new changed file.... No need for sorry. It is easyer for us to tell "there don't work, here don't work...". The hardest work is yours. i'm finishing few cosmetic in files to tell little more for which contrib they ... Thank you for that. last proble clement with cs resetted to 0, i have got this problem a time when working on cs but has been fixed on my serverso please check the field cstatus in table customers here is mine... Mine are same as yours. Maybe the prob occured because of missing files from the first package ? Am I right? Thank you again! Quote Link to comment Share on other sites More sharing options...
frog Posted January 14, 2003 Share Posted January 14, 2003 Hello! I've tried five times to install this wonderful contri with no luck does anybody has experienced something better? i tried : snapshot 11/12/2002 no luck , parse errors snapshot 05/09/02 no luck.... old checkout snapshot 12/01/02 no luck ...tons of sql errors if any of you have a working snapshot let me know thanks in advance Quote Link to comment Share on other sites More sharing options...
elari Posted January 14, 2003 Author Share Posted January 14, 2003 cstatus is continusly updated it means you need a last snapshot, at least from 1 Nov 02 because of the newcheout process parse error, check your file again you have a mistake or forgotten something sql error, try to run each statement to see where is the problem first run query for cstatus 2.x, then edit the query for 3.x and run the query by the bottom of the file (the oldest change are in the end of the files, this is why you may have sql error since it try to make the newest change before the oldest...) this is the easier way i found to manage update for the database, but i understand it can be boring for first new install however you have a date of each add / change 2M1102 mean 2002 Nov 02 2N0101 mean 2003 Jan 01.... now i'm installing some new field in cstatus to includes qty discount price and mo_pics. i'll use the same field as Linda for her Qty Controller 5.1 Quote Link to comment Share on other sites More sharing options...
elari Posted January 23, 2003 Author Share Posted January 23, 2003 added field are now working for display i think in all module.... price are displayed/calculated by a function that does not require any sql query to limit sql work... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.