John-Peter Posted July 19, 2005 Posted July 19, 2005 Jeep, If you confirm this one works correct, feel free to add it to the contribution as an improved upon version. <{POST_SNAPBACK}> It's done, I updated the contribution Column Product Listing (for Separate Pricing Per Costomer v4.1). It's work great. Yesterday, I saw this and try it with no success and today, all is ok. Thank's a lot. Great work like always, keep the good work. :thumbsup: Quote John -------------------- osCommerce 2.3.4 Bootstrap Edge
wkdwich Posted July 20, 2005 Posted July 20, 2005 Have a few questions before I install this MOD.. I am working with a virgin install.. have all my MODS read to go.. just read all the install files for them and this one appears to be the one that needs to be dealt with first.. looks easy enough on the virgin install :) The heavy sales part of the store is the wholesale end.. we do sell retail as well.. BUT not every product is available to the public.. From what I am reading default is the retail pricing.. so the retail group and guest group will see retail pricing.. so far so good new wholesale person comes in .. sees the retail pricing and is prompted to register.. then what?? does the admin have to go in and approve/activate this person before shopping at wholesale price? OK I have also completely read the docs now.. and see yes the admin must approve.. Item XYZ is available to the wholesale group, but is not to the retail group, how is that dealt with?? Ideally I would not want the item to even display in the retail or guest groups. OK I just found the other MOD for this one at: http://www.oscommerce.com/community/contributions,3059 looks complicated to install though.. any suggestions? When the admin activates the wholesale person, do they get an email notifying them they can now shop at their price level? As well reminding them they need to log in to see thier price level. The docs do not state that an email is sent.. can that be added in easily?? Granted I can click to email from the Customers page, but I would have to type all that info in every time and the majority will be wholesale customers, so that would be a royal pain... If, during registration, they fill out the tax number box then the site's administrator is sent an email notifying them that a user has requested a Wholesale account and needs to be authorized. OK Good.. but my users may not have a tax ID.. I'd prefer to change that to possibly a drop down asking: consumer, licensed professional, professional in unlicensed state or country.. :blush: I think I'm done now.. thanks for a great MOD! Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com
Sid04 Posted July 20, 2005 Posted July 20, 2005 Yes, it is that simple. What that does is fill the tax id number field again with what the new customer just typed in. If you don't, the page is refreshed and he/she has to type it in again. Not customer friendly ;).It would be more in line with the rest of the code to use: if (ACCOUNT_COMPANY == 'true') $entry['entry_company_tax_id'] = $company_tax_id; but that is nitpicking. <{POST_SNAPBACK}> where is ACOUNT_COMPANY actually set to true though? I know the COMPANY field can be turned on/off in admin, but I dont remember a place to turn on and off the company tax id field......?? Quote
Jan Zonjee Posted July 20, 2005 Posted July 20, 2005 where is ACOUNT_COMPANY actually set to true though? I know the COMPANY field can be turned on/off in admin, but I dont remember a place to turn on and off the company tax id field......?? <{POST_SNAPBACK}> ACCOUNT_COMPANY is the configuration key for Company (Company is the configuration_title) and is set true or false in the admin (you can find it in the mysql table configuration). The company_tax_id field is not in the configuration values (so cannot be set true or false). However, this field is in the "company box" in the create account page so if company is set to false, that field and it accompanying filled-in values will not be there either. It kind of hitch hikes on the back of the Company field. Quote
mark27uk3 Posted July 20, 2005 Posted July 20, 2005 When the admin activates the wholesale person, do they get an email notifying them they can now shop at their price level? As well reminding them they need to log in to see thier price level. The docs do not state that an email is sent.. can that be added in easily?? Granted I can click to email from the Customers page, but I would have to type all that info in every time and the majority will be wholesale customers, so that would be a royal pain... If, during registration, they fill out the tax number box then the site's administrator is sent an email notifying them that a user has requested a Wholesale account and needs to be authorized. OK Good.. but my users may not have a tax ID.. I'd prefer to change that to possibly a drop down asking: consumer, licensed professional, professional in unlicensed state or country.. I am in this sort of situation as well, any suggestions from the guru's?? Thanks Mark Quote Lifes a bitch, then you marry one, then you die!
Sid04 Posted July 20, 2005 Posted July 20, 2005 Jan- Just curious.... After a customer creates an account and incudes a company tax ID number, when they visit the address_book_process.php page, should they be able to change the tax id number they entered? How mine is now, once im logged in and visit that page I can change all fields EXCEPT the company tax ID one. The value is listed there in text, but you cant change it. If this the correct operation or should I be able to change the company tax ID field on the address_book_process page? Thanks Quote
Jan Zonjee Posted July 20, 2005 Posted July 20, 2005 After a customer creates an account and incudes a company tax ID number, when they visit the address_book_process.php page, should they be able to change the tax id number they entered? How mine is now, once im logged in and visit that page I can change all fields EXCEPT the company tax ID one. The value is listed there in text, but you cant change it. If this the correct operation or should I be able to change the company tax ID field on the address_book_process page? <{POST_SNAPBACK}> That was done on purpose. If the customer can change that information, you also lose that information (unless a backup was done in the mean time and you can find it back). If that is a tax id number I figured you don't want to lose that information, so I made it explicitly so that it can only be changed on the admin side. They will have to contact you if the information entered was wrong or has changed. Quote
Jan Zonjee Posted July 20, 2005 Posted July 20, 2005 The SPPC adapted version of Carine Bruyndoncx Admin Specials by Categories contribution was uploaded today. The support thread can be found elsewhere in this forum. Quote
ScorpioPDXNS Posted July 21, 2005 Posted July 21, 2005 This is the EXACT contribution I need. I am good enough at tweaking the php / and layout (html/gui) elements. However, I'm completely lost with mySQL. HOW do I install/run sppc_v40_install.sql ??? (or any .sql file for that matter) Working from a shared server, osCommerce up and running fine. Host has phpMyAdmin set up. Can get in with full admin access to database, click SQL icon (which launches a new window), click import files, browse to find sppc_v40_install.sql on local machine, and click "go". That window stays open, nothing appears to happen. Back in main SQL window, I show error message: ERROR SQL query: ALTER TABLE customers ADD customers_group_id smallint UNSIGNED NOT NULL default '0', ADD customers_group_ra enum( '0', '1' ) NOT NULL MySQL said: #1046 - No Database Selected Any help on this is appreciated, since this is the only thing keeping me from going live with my site. Quote
Jan Zonjee Posted July 21, 2005 Posted July 21, 2005 ERROR SQL query: ALTER TABLE customers ADD customers_group_id smallint UNSIGNED NOT NULL default '0', ADD customers_group_ra enum( '0', '1' ) NOT NULL MySQL said: ? #1046 - No Database Selected <{POST_SNAPBACK}> My guess is you have more than one mysql database setup with your host. I would try inserting as the first line in the sql file you want to run: USE name_of_your_oscommerce_database; Quote
Sid04 Posted July 21, 2005 Posted July 21, 2005 (edited) Jan- now i have an issue, since adding this state-country contribution. Now when on the address_book_process page everything is OK, but if you select a different country the page refreshes and the "company tax id" field is now a blank editable box. Here's the mods addition to the file: catalog/address_book_process.php Line 33 Replace: if (isset($HTTP_POST_VARS['action']) && (($HTTP_POST_VARS['action'] == 'process') || ($HTTP_POST_VARS['action'] == 'update'))) { ? $process = true; with: ? // +Country-State Selector ? $refresh = false; ? if (isset($HTTP_POST_VARS['action']) && (($HTTP_POST_VARS['action'] == 'process') || ($HTTP_POST_VARS['action'] == 'update') || ? ? ? ($HTTP_POST_VARS['action'] == 'refresh'))) { ? ? if ($HTTP_POST_VARS['action'] != 'refresh') { $process = true; } else { $refresh = true; } ? // -Country-State Selector ? Line 55 Replace: ? ? if (ACCOUNT_GENDER == 'true') { with: // +Country-State Selector if ($refresh) {$state = '';} if ($process) { // -Country-State Selector ? ? if (ACCOUNT_GENDER == 'true') { Line 100 Replace: ? ? ? $zone_id = 0; ? ? ? $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); ? ? ? $check = tep_db_fetch_array($check_query); ? ? ? $entry_state_has_zones = ($check['total'] > 0); ? ? ? if ($entry_state_has_zones == true) { ? ? ? ? $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')"); ? ? ? ? if (tep_db_num_rows($zone_query) == 1) { ? ? ? ? ? $zone = tep_db_fetch_array($zone_query); ? ? ? ? ? $zone_id = $zone['zone_id']; ? ? ? ? } else { ? ? ? ? ? $error = true; $messageStack->add('addressbook', ENTRY_STATE_ERROR_SELECT); ? ? } ? } else { with: ? ? ? // +Country-State Selector ? ? ? ? if ($zone_id == 0) { ? ? ? // -Country-State Selector Line 123 Replace: ? ? if ($error == false) { with: // +Country-State Selector ? ? } ? ? if (!$refresh) { // -Country-State Selector ? ? if ($error == false) { Line 191 Replace: ? if (isset($HTTP_GET_VARS['edit']) && is_numeric($HTTP_GET_VARS['edit'])) { with: // +Country-State Selector } ? if ($refresh) { ? ? // Recreate $entry from post values collected above ? ? $entry = array( ? ? ? 'entry_firstname' => $firstname, ? ? ? 'entry_lastname' => $lastname, ? ? ? 'entry_street_address' => $street_address, ? ? ? 'entry_postcode' => $postcode, ? ? ? 'entry_city' => $city, ? ? ? 'entry_state' => "", ? ? ? 'entry_zone_id' => (int)0, ? ? ? 'entry_country_id' => (int)$country); ? ? if (ACCOUNT_GENDER == 'true') $entry['entry_gender'] = $gender; ? ? if (ACCOUNT_COMPANY == 'true') $entry['entry_company'] = $company; ? ? if (ACCOUNT_SUBURB == 'true') $entry['entry_suburb'] = $suburb; ? ? } ? else // -Country-State Selector ? if (isset($HTTP_GET_VARS['edit']) && is_numeric($HTTP_GET_VARS['edit'])) { Line 217 Replace: ? ? $entry = array(); with: ? ? $entry = array(); ? ? // +Country-State Selector ? ? if (!isset($country)) $country = DEFAULT_COUNTRY; ? ? $entry['entry_country_id'] = $country; ? ? // -Country-State Selector I tried tons of stuff after the " if (ACCOUNT_COMPANY == 'true') $entry['entry_company'] = $company;" line, but nothing helped. Any thoughts on why the comapny tax id is changing to a blank editable box instead of staying the uneditable value that it was before I added the above code? your help is greatly appreciated Edited July 21, 2005 by Sid04 Quote
Jan Zonjee Posted July 21, 2005 Posted July 21, 2005 Jan- now i have an issue, since adding this state-country contribution. Now when on the address_book_process page everything is OK, but if you select a different country the page refreshes and the "company tax id" field is now a blank editable box. I tried tons of stuff after the " if (ACCOUNT_COMPANY == 'true') $entry['entry_company'] = $company;" line, but nothing helped. Any thoughts on why the comapny tax id is changing to a blank editable box instead of staying the uneditable value that it was before I added the above code? <{POST_SNAPBACK}> It took me a while to get just enough of that contribution installed to get it working but I see and understand the problem now. What happens: if a company_tax_id is in the database the code notices that and only echoes the value. Doesn't do an input field. Alternatively: if there is no tax id in the database, it will show an empty input field to give the customer the chance to submit it. When the page does the refresh there is no database query, so the code assumes there is no entry for the tax id and shows the blank input field. The bad thing is it will be processed and if left blank the value in the database will be overwritten. A temporary fix for it would be to add: if (ACCOUNT_COMPANY == 'true') $entry['entry_company_tax_id'] = $company_tax_id; to address_book_process.php. Also needed is adding a hidden field with that value in address_book_details.php (around line 70) (that will create the necessary POST variable) and " || $refresh == true" a little above that: <!-- BOF Separate Pricing Per Customer --> <?php if (tep_not_null($entry['entry_company_tax_id']) || $refresh == true ) { ?> <tr> <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td> <td class="main"><?php echo $entry['entry_company_tax_id']; ?></td> <input type="hidden" name="company_tax_id" value="<?php echo $entry['entry_company_tax_id']; ?>"> </tr> <?php } else { // end if (tep_not_null($entry['entry_company_tax_id'])) ?> <tr> It is not a perfect solution: once the refresh is done, the input field with tax id is no longer an input field but is echo'ed. The customer cannot edit the field anymore, it will be stored in the database though. Another problem is that it opens the door for manipulation of the tax id by the customer: storing it locally, change it with a text editor and then submit it... <_< For now, it is better than it was. Quote
PHP-XML Posted July 21, 2005 Posted July 21, 2005 (edited) I really like the contribution, but my problem is: the osC's has been modified before install sppc4 the sppc4 doesn't work properly i can set groups and wholesale price but i can not find the tax number, not in registration, not in the customer list when wholesale group logged in, price didn't change. can any one tell me what's the problem from? is reinstall osC's is the only way to solve it? cheers Edited July 21, 2005 by PHP-XML Quote
Sid04 Posted July 22, 2005 Posted July 22, 2005 It is not a perfect solution: once the refresh is done, the input field with tax id is no longer an input field but is echo'ed. The customer cannot edit the field anymore, it will be stored in the database though. Another problem is that it opens the door for manipulation of the tax id by the customer: storing it locally, change it with a text editor and then submit it... <_< For now, it is better than it was. <{POST_SNAPBACK}> Well, that appears to have fixed it. Im not sure what you meant above about the customer not being able to edit it anymore, as it originally couldnt be edited either. Im guessing your saying that the customer can now find a certain file in his/her cache and edit it so that the tax id field would be changed upon submitting the form? If thats the only worry, I could care less. More power to them if they want to go through all that :blink: Any other apparent ill side effects that you can see with your fix. Ill experiment more with it tomorrow and see if I come across anymore glitches. In your dealings with the country-state contrib so far, did you see any side effects it may have on SPPC? The only changes that I made to the contrib is now what you listed above. Thanks again. I had a feeling for some reason that adding this contrib would be a pain :huh: Quote
Jan Zonjee Posted July 22, 2005 Posted July 22, 2005 Zhen, when wholesale group logged in, price didn't change. can any one tell me what's the problem from? That question is too general to answer. It is like asking "I cannot start my car, what is the problem?" If the price doesn't change on any page (product_info.php, index.php etc.) something might be wrong with setting the session parameters. So I would suggest checking that first, for example by adding to one of the pages: echo '<pre>'; print_r($_SESSION); echo '</pre>; is reinstall osC's is the only way to solve it? No.i can set groups and wholesale price but i can not find the tax number, not in registration, not in the customer list I lost you here, what do you mean with the tax number? Quote
Jan Zonjee Posted July 22, 2005 Posted July 22, 2005 Mark, When the admin activates the wholesale person, do they get an email notifying them they can now shop at their price level? As well reminding them they need to log in to see thier price level. The docs do not state that an email is sent.. can that be added in easily?? Granted I can click to email from the Customers page, but I would have to type all that info in every time and the majority will be wholesale customers, so that would be a royal pain... No, there is nothing automatic for that. Probably wouldn't be very difficult to code for somebody who needs it. <sarcasm>There is also a wonderful thing called Select, Copy, Paste and it works with a lot of programs. You type a message in for example a text editor like jEdit and save that message as a text file. Once you need to send that message to someone you open that text file, do a Select and Copy of the message text, start a new email and in the message body you do Paste. Now the text of the message is in the new email. There are even shortcuts for Select, Copy, and Paste. Depending on your computer it is Control-A/Command-A for selecting all of the text, then Control-C/Command-C for copying and Control-V/Command-V for pasting. Bottom line is, there is really no need to type every message again and again.</sarcasm> If, during registration, they fill out the tax number box then the site's administrator is sent an email notifying them that a user has requested a Wholesale account and needs to be authorized. OK Good.. but my users may not have a tax ID.. I'd prefer to change that to possibly a drop down asking: consumer, licensed professional, professional in unlicensed state or country. <{POST_SNAPBACK}> Since the company_tax_id field can be anything, nothing stops you from using a drop-down menu with something like consumer, licensed professonal etc. instead of an input field for company_tax_id. There are plenty examples of how to do that simple in osC, for example close to the bottom of create_account you find the following example: $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array); In your case you would probably use something like: $customer_type_array[] = array('id' => '0', 'text' => 'Consumer'); $customer_type_array[] = array('id' => '1', 'text' => 'licensed professional'); $customer_type_array[] = array('id' => '2', 'text' => 'professional in unlicensed state or country'); echo tep_draw_pull_down_menu('company_tax_id', $customer_type_array); Of course some other code should be adjusted too. For example you only want to get an email if the value for $company_tax_id is anything else than 0 than "something" as it is now. Quote
Jan Zonjee Posted July 22, 2005 Posted July 22, 2005 Bob, Well, that appears to have fixed it. Im not sure what you meant above about the customer not being able to edit it anymore, as it originally couldnt be edited either. Try adding a new entry in the address book (another delivery address) and you will see what I mean.Im guessing your saying that the customer can now find a certain file in his/her cache and edit it so that the tax id field would be changed upon submitting the form? If thats the only worry, I could care less. More power to them if they want to go through all that :blink: Not funny if the tax people come along and ask why you delivered this individual without charging him sales tax and then you cannot even find the tax id number he gave you :o In your dealings with the country-state contrib so far, did you see any side effects it may have on SPPC? The only changes that I made to the contrib is now what you listed above. <{POST_SNAPBACK}> No, but I only tried address_book_process.php. I don't expect any more trouble, but that is what I thought the first time you asked too and I was wrong. ;) Quote
Sid04 Posted July 23, 2005 Posted July 23, 2005 Bob, Try adding a new entry in the address book (another delivery address) and you will see what I mean. <{POST_SNAPBACK}> ahh ha, I see. The fact that they can add a new tax id when adding a new address really doesnt matter in my instance. I have it set up as a club and the field that they are entering isnt a tax id, im just refering to it as a tax id here so you know what im talking about. Whats MORE of an issue for me is that I dont get sent an email if they enter a tax id while making a new address, whereas I do get an email if they previously didnt have a tax id entered and later enter one into their first address section. Id like to get an email if they add a new address ad happen to enter the tax id :huh: Quote
Sid04 Posted July 24, 2005 Posted July 24, 2005 Jan- I sent you a PM(non-related to this thread). Please let me know if you even get it....its not showing up in my PM's as a sent message for some reason. Thanks Quote
John-Peter Posted July 25, 2005 Posted July 25, 2005 Jan- now i have an issue, since adding this state-country contribution. Now when on the address_book_process page everything is OK, but if you select a different country the page refreshes and the "company tax id" field is now a blank editable box. Hi, Can you tell me what contribution is ? Because I want to install this but I want to know exactly whcih contribution you've talked about because they have a couple of this state-country contribution. Thanks. Quote John -------------------- osCommerce 2.3.4 Bootstrap Edge
mark27uk3 Posted July 25, 2005 Posted July 25, 2005 Hi, This contrib is just what I need but before I go ahead and install it I have a couple of questions. 1. How easy would it be to add a check box when adding a adding a new product that instead of displaying the price it would display something like 'Call for best price'? 2. Is there an easy way of excluding products from certain groups, maybe so one particular product will show in the 'wholesale' group but not in the 'dropship' group. This product must still show up as normal in the 'Retail' group. I hope this can be done as it will add extra functionality to the contrib and make it perfect for my store. Thanks Mark Quote Lifes a bitch, then you marry one, then you die!
bongo Posted July 25, 2005 Posted July 25, 2005 Hi, I use the seperate pricing per customer. I happy with this contributions. I have also installed the checkout_alternative contributions. I now have an problem and i hope you guys can help me with this. I have to pages and for me the seperate pricing per customer was great. But i would like to have an one checkout page of each of the sites. I have figured out the pricing for each pages sow that they is right. But i cant figure out how to make the shipping and payment for each group to match the customer_group_id. i hope that someone can help me with this. Regards Thomas Quote
wkdwich Posted July 25, 2005 Posted July 25, 2005 Jan, I started that thread, not Mark.. but he needed it also.. Mark, No, there is nothing automatic for that. Probably wouldn't be very difficult to code for somebody who needs it. <sarcasm>There is also a wonderful thing called Select, Copy, Paste and it works with a lot of programs. You type a message in for example a {{SNIP}} V/Command-V for pasting. Bottom line is, there is really no need to type every message again and again.</sarcasm> Yes I know copy/paste is a wonderful thing, but currently in our cart we have 6500 registered users that will have to re-register here and be assigned to the "professional group". Since they would be the majority of the shoppers, copy/paste willl be a huge time eater... The wholesale group would be far less populated and a copy/paste of notice would not be a big issue. Since the company_tax_id field can be anything, nothing stops you from using a drop-down menu with something like consumer, licensed professonal etc. instead of an input field for company_tax_id. There are plenty examples of how to do that simple in osC, for example close to the bottom of create_account you find the following example: ok thanks I will look at that and let you know if I need more clarification. Of course some other code should be adjusted too. For example you only want to get an email if the value for $company_tax_id is anything else than 0 than "something" as it is now. OK thanks.. anything else I need to look at for possible adjustments?? Is there anyway to automate placing someone into the "professional group" when choosing that in the sign up? Looking thru the files in the MOD, I don't see extra email templates.. can I assume that no matter which group they register with, the stock thanks for registering is sent out?? Can users be mass moved from one group to another or is it a one by one basis?? This one is not a huge issue either.. I can always export the database, adjust and upload.. I'm going to go install the MOD now as I still have a virgin install and start fooling with it.. the merchant is getting antsy :) thanks for the info.. Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com
wkdwich Posted July 25, 2005 Posted July 25, 2005 Am I lacking caffine today?? I installed the MOD.. I thought I saw on a demo or maybe it was someones site that has the MOD installed.. a pre-register page that asked which "group" you belonged to.. I dont see that when I go to register.. just a regular register page... Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com
Jan Zonjee Posted July 25, 2005 Posted July 25, 2005 Am I lacking caffine today?? I installed the MOD.. I thought I saw on a demo or maybe it was someones site that has the MOD installed.. a pre-register page that asked which "group" you belonged to.. I dont see that when I go to register.. just a regular register page... <{POST_SNAPBACK}> Not fair to start with the last entry ;) but this might be quick. You probably saw Marvin Miller's HTML documentation. When the email address used to login is the same as the one defined for SPPC_TOGGLE_LOGIN_PASSWORD in includes/languages/english/login.php : define('SPPC_TOGGLE_LOGIN_PASSWORD', 'root@localhost'); then you will be presented with the choice to login as another group. This is helpful for the webmaster if he/she needs to change group to check a feature or a price for a group. Quote
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.
Note: Your post will require moderator approval before it will be visible.