Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers Status V3.x


elari

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

some screenshot and some finished work....

 

Define customers status & options

customers_status_edit_new.gif

 

customers listing a status

customers_status_listing.gif

 

define new status and show history

customers_status_history.gif

 

Look for customers ip tracking

(90% finished, working, include ip when order in table order )

customers_show_ip_log.gif

 

Select customers for Newsletter (working)

newsletter_select_customers.gif

 

Customer get is account info and details when his status is defined public

customers_account_details_and_loginbox.gif

 

And guestbook

customers_gestbook.gif

Link to comment
Share on other sites

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

customers_subsribe_news.gif

 

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.)

Link to comment
Share on other sites

  • 2 weeks later...

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 ????

Link to comment
Share on other sites

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 server

so 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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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...

 

 

customers_status_show_retail_and_qty_price.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...