Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Mitch,

I am trying to add this code from Nulti Vendor shipping to the priceformatter.php. Can you tell me if I have the syntax correct?
Almost, you are missing a comma but a left join is simpler syntax

 

" p.products_tax_class_id," .

" v.vendors_id," .

" v.vendors_name ," .

" NULL as specials_new_products_price" .

" from " . TABLE_PRODUCTS_DESCRIPTION . " pd," .

" " . TABLE_PRODUCTS . " p left join " .

" " . TABLE_VENDORS . " v using(vendors_id) " .

" where p.products_status = '1'" .

" and p.products_id = '" . (int)$product_id . "'" .

" and pd.products_id = '" . (int)$product_id . "'" .

" and pd.language_id = '". (int)$language_id ."'";

$product_info_query = tep_db_query($sql);

$product_info = tep_db_fetch_array($product_info_query);

// BOF add List Price (retail price) to the product_info array

$product_info['list_price'] = $product_info['products_price'];

// EOF add List Price

Link to comment
Share on other sites

Hi Jan,

 

I hope you can help me get my head around this because it is making my head spin.

 

At the moment I am running the PWA contrib which at the moment runs with all groups retail, trade and dropship. What I need is that only retail customers use the Purchase without account and trade and dropship clients have order history which will show up in account.php

 

Also I am planning to create a different create_account page for clients who want to sign up for trade/dropship. Any ideas or advice would be grateful.

 

Also (sorry about this) I use the more_categories contribution and need to exclude certain category boxes from certain groups. I wont post the code now but if you want to have a look at it (again modded to hell) I will post it.

 

Your thoughts would be greatly appreciated as I feel I am making some headway with all of this now.

 

Thanks

 

Mark :thumbsup:

 

Mark- PWA and SPPC don't really interact. In order for SPPC to come into play, a user has to have an account with the store and the store owner has to manually assign that customer into a certain customer group other than retail

 

PWA customers are automatically excluded from wholesale status because they are retail by default and can only ever be retail.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Hi Stew,

 

Thanks for the reply.

 

That is all I needed to hear.

 

Regarding my earlier post of rewriting the create account page all I have done is added lots more fields and changed the wording.

 

I would like to add a dropdown box on the create account page for customers to select which group they are applying to. I know how to add the drop down just not sure whether I should put the groups into an array or is there something in the sppc code already available where I can pull the groups direct from the dbase.

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

I would like to add a dropdown box on the create account page for customers to select which group they are applying to. I know how to add the drop down just not sure whether I should put the groups into an array or is there something in the sppc code already available where I can pull the groups direct from the dbase.

 

Thanks

 

Mark

 

That exact dropdown is generated on admin/customers.php- all the code you would need should be in that file.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Hi There all you pro's!

Here's another question about "Show Price list v.3.5 for SPPC 4.1.1 version 3.5".

I'd like to show the customers gruops name to the user. Is it possible to do something like this?

 

In english.php

define('SHOW_YOUR_PRICE', '(customers_group_name) Price : ');

define('REGULAR_PRICE', '(customers_group_name) Regular Price : ');

 

What do I (a humble cut-and-paste-guy) have to do to make it work?

Link to comment
Share on other sites

I would like to add a dropdown box on the create account page for customers to select which group they are applying to. I know how to add the drop down just not sure whether I should put the groups into an array or is there something in the sppc code already available where I can pull the groups direct from the dbase.

 

Code for that I found on page 59 in this thread...

 

Greetings Tommy

Link to comment
Share on other sites

Hi,

 

Thanks for that Tommy, I must have missed it when I was reading through all the pages originally :blink:

 

I have changed the code around slightly to pull in the groups

 

	   <tr>
	 <td class"main" colspan="2"><?php
   $group_array = array();
   $group_query = tep_db_query("select customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" . (int)$country . "' order by customers_group_name");
   while ($group_values = tep_db_fetch_array($group_query)) {
	 $group_array[] = array('id' => $group_values['customers_group_name'], 'text' => $group_values['customers_group_name']);
   }
   echo '<span class="main">' . ENTRY_GROUPS . '</span>'; ?></td>

   <td>
	<?php echo tep_draw_pull_down_menu('state', $group_array); ?></td>
   </tr>

 

However I am unsure as to what to change this

 '" . (int)$country . "'

too????

 

Also it only pulls in the retail group and does not show trade or dropship group names in the dropdown

, any ideas?

 

Also at the risk of sounding really thick and stoopid what would I need to add so this data is stored in the database so it can be displayed in admin/customers.

 

I would like it to show something like

 

Customer group applied for : blahblahblah

Approved to join customer group: blahblahblah

 

So say if the customer applies to join the group 'trade' and does not pass application then they can be assigned to a different group and it will show when viewing the customers details.

 

Thanks

 

Mark :thumbsup:

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hi,

 

Thanks for that Tommy, I must have missed it when I was reading through all the pages originally :blink:

 

I have changed the code around slightly to pull in the groups

 

However I am unsure as to what to change this

 '" . (int)$country . "'

too????

 

Also it only pulls in the retail group and does not show trade or dropship group names in the dropdown

, any ideas?

 

Also at the risk of sounding really thick and stoopid what would I need to add so this data is stored in the database so it can be displayed in admin/customers.

 

I would like it to show something like

 

Customer group applied for : blahblahblah

Approved to join customer group: blahblahblah

 

So say if the customer applies to join the group 'trade' and does not pass application then they can be assigned to a different group and it will show when viewing the customers details.

 

Thanks

 

Mark :thumbsup:

 

I'm not sure that section of code you're using is exactly what you're looking for. I would try something more like this:

 

	   <tr>
	 <td class"main" colspan="2"><?php
   $group_array = array();
 $group_query = tep_db_query("select customers_group_id, customers_group_name from " .  TABLE_CUSTOMERS_GROUPS . " order by customers_group_id");
   while ($group_values = tep_db_fetch_array($group_query)) {
 $group_values_array[] = array("id" => $group_values['customers_group_id'], "text" => $group_values['customers_group_name']);
   }
   echo '<span class="main">' . ENTRY_GROUPS . '</span>'; ?></td>

   <td>
	<?php echo echo tep_draw_pull_down_menu('requested_group_id', $group_values_array); ?></td>
   </tr>

 

Then you would have to store and retrieve the information somehow. For this you'd have to have a new field in table customers, customers_group_requested for example, where the value of 'requested_group_id' would be written. A good place to view the information would be on customers.php in between "Newsletter" and "Customer Group" (the value of "customer group" is automatically the group they're assigned to) in the "Options" table.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Jan thanks for your former replies but I still really need help with this one:

 

Okay...

 

I've installed and all is good, created my groups (in my case it's retail and wholesale) added a product and all is working great.

 

BUT....

 

I don't want to have to manually edit customers to say they're wholesale.

 

Like if they fill in the tax id number, I want it automatic that they are wholesale (to be approved as wholesale) and they see those prices.

 

If they don't fill it in then it's autoamatic retail and they see the retail prices.

 

Can this be done?

 

After reading this: http://www.oscommerce.com/forums/index.php?sho...82entry808982

 

and this:

 

http://www.oscommerce.com/forums/index.php?sho...=53436&st=2140#

 

which were answers to the question, I still don't understand what I need to do... I'm a newby... sorry.

 

can you tell me step by step? I know it's asking alot!

Link to comment
Share on other sites

admincustomers.jpg

 

It doesn't show the link in the box, but if you uploaded all the files in the admin you should have uploaded that file: customers_groups.php. Adding the link to it is one of the first things that is mentioned in the new_install_directions.txt to change in the file: catalog\admin\includes\boxes\customers.php

 

So try typing in http://yoursite/admin/customers_groups.php and see if you can find it there, then you only need to add the link to the box customers.php

 

Kind regards, Jan

Link to comment
Share on other sites

I made it with this code, added in the create_account.php after the ' if (SESSION_RECREATE == 'True') {' :

 if (SESSION_RECREATE == 'True') {
	tep_session_recreate();
  }

  $customer_first_name = $firstname;
  $customer_default_address_id = $address_id;
  $customer_country_id = $country;
  $customer_zone_id = $zone_id;
  tep_session_register('customer_id');
  tep_session_register('customer_first_name');
  tep_session_register('customer_default_address_id');
  tep_session_register('customer_country_id');
  tep_session_register('customer_zone_id');

// BOF Separate Pricing Per Customer
// register SPPC session variables for the customer

if (!isset($sppc_customer_group_id)) {
$sppc_customer_group_id = '0';
}
$check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" . $sppc_customer_group_id . "'");
$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
$sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax'];
$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];

// here comes the automatic	

  if ($yourTaxField != '') {							   //define the field you need
  $sql_data_array['customers_group_id'] = '1';
  $sppc_customer_group_id = '1';
  } else {
  $sql_data_array['customers_group_id'] = '2';
  $sppc_customer_group_id = '2';
  }
// set 1 or 2 however you want - retail= 0[/color]

tep_session_register('sppc_customer_group_id');
tep_session_register('sppc_customer_group_show_tax');
tep_session_register('sppc_customer_group_tax_exempt');
// BOF Separate Pricing Per Customer

// restore cart contents

 

Good luck Tommy

Link to comment
Share on other sites

Hello !!! Oscommerces !!!

 

First of all i'd like to thanks to JanZ, for his kindly help on my store's problems,

 

this piece of work is the most amazing thing for the whole oscommerce.. project with alll the other contribution of course.... \m/ you guys rocks!!!

 

but.. still i got some question i know more Flash than Php and maybe some other member had the same problem.. as me.. so.. this is the thing..

 

Here there's a pic of the admin, if you see there is no a customer group to choose from, and JanZ said that maybe i didnt upload the customers_goups.php to my site, but in fact i didnt see it on any contribution that i used... so anyone of you know wichone would be that file that i missing... beacuse i really have no idea about it... so now on the store, you can see two prices

 

- manufacturer price= --

- our price= --

 

but both are the same and i can't change them, and also i can't not create another cusatomer group

 

and second place what is the code that you use to make those links.., i mean to make them appears on the page..

 

thanks very much again to all.

nacho

 

www.lightguy.com

 

admincustomers.jpg

 

It doesn't show the link in the box, but if you uploaded all the files in the admin you should have uploaded that file: customers_groups.php. Adding the link to it is one of the first things that is mentioned in the new_install_directions.txt to change in the file: catalog\admin\includes\boxes\customers.php

 

So try typing in http://yoursite/admin/customers_groups.php and see if you can find it there, then you only need to add the link to the box customers.php

 

Kind regards, Jan

Link to comment
Share on other sites

Hi Tommy,

 

Can you please explain a little more about your code above actually does?

 

Its been a long day so far and it must be nearly drinkies time :(

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

I think I know the answer to this, but can anyone tell me if it is possible to configure easypopulate to work with sspc + quantity price breaks? My customer uses both but would like to update using easypopulate

 

thanks for a great contrib!

Link to comment
Share on other sites

Hi,

 

I need some help with SPPC. How can I show the customer witch group they are logged into? I would like to get a line on the bottom off the page when customer are not logged in, or logged in the retail group :" You are logged in as a retail customer, all prices are incl. 25% tax excl. freight. When logged inn as a business customer I would like to show : You are logged inn as a business customer, all prices are excl. tax and freight.

 

I have seen the TAX_INFO add on, but this shows this information on every price, but I don't get this to work woth drop down menues and the Quantity price break.

 

I also wonder if anyone have a nice table made for the quantity price break. I can't figure out how to make it nicer.

 

Thanks

Link to comment
Share on other sites

Hi,

 

I need some help with SPPC. How can I show the customer witch group they are logged into? I would like to get a line on the bottom off the page when customer are not logged in, or logged in the retail group :" You are logged in as a retail customer, all prices are incl. 25% tax excl. freight. When logged inn as a business customer I would like to show : You are logged inn as a business customer, all prices are excl. tax and freight.

 

I have seen the TAX_INFO add on, but this shows this information on every price, but I don't get this to work woth drop down menues and the Quantity price break.

 

I also wonder if anyone have a nice table made for the quantity price break. I can't figure out how to make it nicer.

 

Thanks

 

Hey all you talented coders!

 

I need the same thing as stryn76!

 

And my wishlist goes on:

I'd also like to be able to give certain customer groups additional information on "product_info.php"...

Like: "Since you are one of our [whatevercustemergroupname]-customers, click here to [whateveraction]"

A custom entry in the "Information box" would also be a big hit!

Like: "[Whatevercustomersgroupname] pricelist in Excel-format"

or: "[Whatevercustomersgroupname] conditions"

 

I have no idea if it would take 30 seconds or 30 days to figure out the code for these features, but it would be something...

 

//Micke

Link to comment
Share on other sites

I have just installed SPPC on my heavily modified shop (took me almost 6 hours....) and it is working without errors (obvious errors), but I can't seem to get the different prices to run. Which files put the different prices in the shop? Maybe I have missed something?

 

I have read that you can login as the administrator and test the different groups, so I am sure that I have logged in and off correctly and that is not causing me not seeing the right (wholesale) prices.

WHERE DO I LOGIN AS TEST-ADMINISTRATOR?

 

Yes: I did put my the admin mail address in each of the languages login.php files, but what is the link to the test environment? :blink:

 

Thank you for any help! So far it is almost everything I want to be done.

Except for a 'automatic mail' when I approve someone, so they know that they can see different prices.

And some text so customers can see in which group they are browsing. Both request were made earlier by others and I do hope that someone is able to do this.

Link to comment
Share on other sites

hi you doing oscommerces...!!!

 

well... this is madness i really dont know how you guys do this.. so im gonna keep praying.... for help

no sleep... no eat... frustration is what i feel after tryied everything i know, and i been helped by really good people (janZ), but it's me.. i just dont know... i feel sorry for me.. well...focus.. patience

//////////////////////////////////////////////////////////////////////////////////////////////////c

 

in one hand i have on the catalog.. the two diferents instances of prices ( but one with out the $00.00),

i just can't make it work properly(appear) and also neither make the change.. (one is greater that the other.)

here is the pic:

catalogProduct02.jpg

 

/////////////////////////////////////////////////////

in the other hand, i have the admin section...

 

on the customer groups...

i have this letters without defining i guess (where do i make the right define to make them right?)

here is the pic:

goodcustomersGroups.jpg

 

///////////////////////////////////////////////////////////////////////////

 

the idea is to get on the catalog two prices...

 

- manufacturer Price: (suggedted by them)

- our price: (our selling price)

 

how can this contribution do this.. ?

 

maybe because is not working properly i couldnt get to see it but im completely lost...

 

anybody help???????????????????????

 

thanks for your time

nacho

Link to comment
Share on other sites

the idea is to get on the catalog two prices...

 

- manufacturer Price: (suggedted by them)

- our price: (our selling price)

Oops, what you were looking for is the Display MSRP & Savings contribution instead of the Separate Pricing Per Customer. Not that it would be impossible to change a few things in the product_info.php page to pickup the information you need/entered to display it there, but SPPC is rather an overkill for that...
Link to comment
Share on other sites

I can't seem to get the different prices to run. Which files put the different prices in the shop? Maybe I have missed something?
I don't follow you here. Normally you start with defining a new customer group (other than retail) in admin/customer_groups.php and then on the admin/categories.php you can enter the new prices for each product for the customer groups. Or if you want to do many of them and quicker you can use Quick Price Updates for SPPC.

 

Yes: I did put my the admin mail address in each of the languages login.php files, but what is the link to the test environment?
Right when you login. On logging in the code checks if the email address and login is correct, then if the email address is the one defined in catalog\includes\languages\english\login.php and then instead of logging you in it stops to give you the chance to choose another customer group (which should have been defined first of course) and then logs you in as the customer group chosen.

 

Except for a 'automatic mail' when I approve someone, so they know that they can see different prices.
Pretty sure that has been discussed (with code) somewhere in this thread.
And some text so customers can see in which group they are browsing. Both request were made earlier by others and I do hope that someone is able to do this.
See above.
Link to comment
Share on other sites

Oops, what you were looking for is the Display MSRP & Savings contribution instead of the Separate Pricing Per Customer. Not that it would be impossible to change a few things in the product_info.php page to pickup the information you need/entered to display it there, but SPPC is rather an overkill for that...

 

thanks for your answer, ok so i will download the new contribution that you said, but there are many of them.. i mean..

 

- Percent Saved Only eficker 13 Jan 2006

- Percent saved update eficker 12 Jan 2006

- Added: % saved eficker 11 Jan 2006

- Display MSRP & Savings ( i will work on this one by now)

 

thanks again,

 

so what do i do with all those codes that we put before???

 

nacho

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