Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Also I didnt' see if you added in the stats on the main admin page... Total Retail, Total Wholesale, or whatever.  It's not a necessity, just something to make it even better ;) 
You saw it correctly, it hasn't been implemented ... yet. Marvin and I agreed it was nice to have but we decided we should concentrate on the essential things first and leave some things for the next version ;)

 

Good Job guys!!!
Thanks.
Link to comment
Share on other sites

Nick,

I just have one question though. Once I install this will I have the chance to charge different shipping fees for these custom people?
Not right now, hasn't been built in. Perhaps it is possible to code it. I'm looking right now at how to implement choosing payment modules for customer groups AND individual customers. Perhaps something like that is possible for shipping too. Can't promise anything though.

 

Also is it possible to have the discount coupon mod added to this after I create this? I want to be able to send out discount coupons to my retail customers to give them a discount. On certain items later on.
No idea, never looked at that (kind of) contribution(s). There are close to 3,000 contributions....
Link to comment
Share on other sites

BUmmer on the shipping charges.....But I must say WHO CARES !!!!! you did a darn good job on this......The manual install is going to be painful indeed. very painful. But hey it is worth it for what amazing opportunities you have given me.

 

 

Thank You

 

 

Nick

Link to comment
Share on other sites

Hi,

 

I've been keeping an eye on this post since november, and have read all messages...

Great work, I'll be installing it during the day (I just hope I won't need to post here to bother everybody with instalation problems)...

 

Anyway, my question is, how could I have certain messages and pages to be seen only if my customers are logged in as a specific customer group? So for example public would see : Welcome to the public site

And a retailer would see : Welcome to the Retailer site

(Just a silly example, I have tons of information depending on the group of customers.)

 

Thanx again for the help and work on this mod.

Link to comment
Share on other sites

Anyway, my question is, how could I have certain messages and pages to be seen only if my customers are logged in as a specific customer group?
I would say that something along the lines of this should work:

if ($customer_group_id != '0') { // retail is always '0'
echo 'Welcome to the Retailer site';
} else {
echo 'Welcome to the public site';
}

Link to comment
Share on other sites

Is SPPC better than B2BSuite, or just different?

 

I have b2b installed and love it.

sppc is part of b2bsuite -- it is one of the contributions they used to make up their version of oscommerce, so better is not really pertinent.

b2b has two create account pages. one for regular customers and one for the groups -- so it is different definately.

personally i found b2b to be more what i need in a cart. I had to pick it apart and edit it further with my own fixes and contributions as needed for my store.

 

i'm going to look at this new improved sppc and see how it will splice into my heavily edited b2bsuite.

Link to comment
Share on other sites

Is SPPC better than B2BSuite, or just different?
B2BSuite is based on the old version of SPPC. The old version of SPPC used quite a lot of mysql queries to get things done, in my opinion. I'm not particularly familiar with all the features of B2BSuite, but from what I saw is that a number of features have been added to it that can be added later to SPPC if you want to. SPPC might be more "basic" in that respect.

 

My impression was also, but I may be wrong, that prices were calculated by discount percentages for customers groups. That is not the case in SPPC. I might be wrong again, but I got the impression B2BSuite was more geared toward European businesses (with regard to tax id number), SPPC is more neutral in that respect.

 

The way customer groups were assigned to specific customer in admin is a lot better in B2BSuite and TotalB2B than it was in SPPC. That is more or less copied from them in this version of SPPC (4.0).

 

But to answer your question, I really don't know. I have never done a side by side comparison and even then, some features are more important for someone than others.

Link to comment
Share on other sites

Like I said, I use b2bsuite, and it is all I was hoping for, and more. I have only a few quams and I've had a lot of luck fixing them with the help of the b2bsuite forums:

 

You can find these forums here.

 

In B2BSuite, you can not only assign discount percentages for groups, but you can also manually enter prices for products for a group (which I find more useful).

 

The biggest problem I had with b2b was getting rid of ALL the VAT (tax i.d.) numbers from the forms. It wasn't too bad though.

 

Overall, B2Bsuite is fantastic.

 

Thanks for the info above, I'll stick with b2b, but may try SPPC if I find it has some needed options that b2b is lacking.

Link to comment
Share on other sites

BUmmer on the shipping charges.....But I must say  WHO CARES !!!!! you did a darn good job on this......The manual install is going to be painful indeed. very painful. But hey it is worth it for what amazing opportunities you have given me.

Thank You

Nick

As part of testing the install docs I did TWO manual installs using a Text Editor :'( Believe it or not, they were not that hard to do.

 

I would allow two hours for it and it's pretty straightforward. Just before the manual install directions you'll find lines of TIPS: One of them gives a link to a Compare & Merge program that will make it really easy to install. I suspect it would cut the install time down to an hour.

 

I doubt I'll be installing contribs with a Text Editor after using a Compare & Merge program ever again :)

Best & Thanks;
Marvin
----------------------
osCommerce 2.3.3.4 

Link to comment
Share on other sites

Yes, I have the older version of SPPC Installed on a  site That is not stock

 

Then you'll have to do a manual install. I recommend using a compare & merge utility. You'll find complete instructions in the readmet.txt file that includes a link to a free utility that will work for 50 files - so it will do the whole Separate Price job for you and cut down dramatically on the time & effort required to manually install it.

 

Manual installs (even with a Text Editor) aren't that bad. 2 hours or less that way and it's easier with Compare & Merge :thumbsup:

Best & Thanks;
Marvin
----------------------
osCommerce 2.3.3.4 

Link to comment
Share on other sites

I might recommend.... as an alternative to the "Compare & Merge" utility... something called "WinMerge".

 

I believe it's available at Sourceforge. I've been using this for at least six months now... and it's very helpful.

 

 

-= Dave =-

Link to comment
Share on other sites

Hi,

 

I am testing an install of SPC 4.0, and I am pleased with the admin end of things. I am encountering an SQL error on index.php though, when clicking on categories in the categories box:

 

1146 - Table 'osc.specials_retail_prices' doesn't exist

 

There is nothing in the included sql files that creates this table. What is the structure for it? Can someone paste the sql here to create it ?

Link to comment
Share on other sites

There is nothing in the included sql files that creates this table.
True, the idea being that the table is automatically created when it is needed. For this the function tep_db_check_age_specials_retail_table was added to includes/database.php.

 

I don't know why it apparently seems not to be working but the function is this:

 

 function tep_db_check_age_specials_retail_table() {
  $result = tep_db_query("show table status from " . DB_DATABASE . "");
  $last_update_table_specials = "2000-01-01 12:00:00";
  $table_srp_exists = false;
  while ($list_tables = tep_db_fetch_array($result)) {
  if ($list_tables['Name'] == TABLE_SPECIALS_RETAIL_PRICES) {
  $table_srp_exists = true;
  $last_update_table_srp = $list_tables['Update_time'];
  }
  if ($list_tables['Name'] == TABLE_SPECIALS) {
  $last_update_table_specials = $list_tables['Update_time'];
  }
  } // end while

  if(!$table_srp_exists || ($last_update_table_specials > $last_update_table_srp)) {
     if ($table_srp_exists) { 
      $query1 = "truncate " . TABLE_SPECIALS_RETAIL_PRICES . "";
      if (tep_db_query($query1)) {
  $query2 = "insert into " . TABLE_SPECIALS_RETAIL_PRICES . " select s.products_id, s.specials_new_products_price, s.status, s.customers_group_id from " . TABLE_SPECIALS . " s where s.customers_group_id = '0'";
  $result =  tep_db_query($query2);  
  }
     } else { // table specials_retail_prices does not exist
      $query1 = "create table " . TABLE_SPECIALS_RETAIL_PRICES . " (products_id int NOT NULL default '0', specials_new_products_price decimal(15,4) NOT NULL default '0.0000', status tinyint, customers_group_id smallint, primary key (products_id) )";
      $query2 = "insert into " . TABLE_SPECIALS_RETAIL_PRICES . " select s.products_id, s.specials_new_products_price, s.status, s.customers_group_id from " . TABLE_SPECIALS . " s where s.customers_group_id = '0'";
      if( tep_db_query($query1) && tep_db_query($query2) ) { 
 ; // execution succesfull
     }
     } // end else
  } // end if(!$table_srp_exists || ($last_update_table_specials....
 }

I think this should work to create the table (but it should be auto-updating too, so...) :

 

create table specials_retail_prices (
products_id int NOT NULL default '0',
specials_new_products_price decimal(15,4) NOT NULL default '0.0000', 
status tinyint, 
customers_group_id smallint, 
primary key (products_id)
);

insert into specials_retail_prices select s.products_id, s.specials_new_products_price, s.status, s.customers_group_id from specials s where s.customers_group_id = '0';

Link to comment
Share on other sites

Hi,

 

I am testing an install of SPC 4.0, and I am pleased with the admin end of things. I am encountering an SQL error on index.php though, when clicking on categories in the categories box:

 

1146 - Table 'osc.specials_retail_prices' doesn't exist

 

There is nothing in the included sql files that creates this table. What is the structure for it? Can someone paste the sql here to create it ?

 

 

I had that same problem yesterday. I believe this table actually DOES get created, but somehow, we're getting the error message either BEFORE it gets created or IN SPITE of the fact that it gets created.

 

I got interrupted, but when I closed my browser and went and tried again, the table apparently was there, because I no longer had the issue.

 

 

-= Dave =-

Link to comment
Share on other sites

I just installed a fresh copy of osc ms2.2. Then I installed the "product attribute - option text featur" contribution. It worked perfectly. Then I installed sppc v4, and I'm getting this error:

 

============

Parse error: parse error, unexpected T_GLOBAL, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/petinst/public_html/store/includes/classes/shopping_cart.php on line 345

============

 

This is the surrounding code, starting at line 343:

	// BOF Separate Pricing Per Customer
// global variable (session) $sppc_customer_group_id -> class variable cg_id
 global $sppc_customer_group_id;

 if(!tep_session_is_registered('sppc_customer_group_id')) {
 $this->cg_id = '0';
 } else {
  $this->cg_id = $sppc_customer_group_id;
 }
// EOF Separate Pricing Per Customer

 

 

Any ideas about the problem?

Link to comment
Share on other sites

I had that same problem yesterday.  I believe this table actually DOES get created, but somehow, we're getting the error message either BEFORE it gets created or IN SPITE of the fact that it gets created.

 

I got interrupted, but when I closed my browser and went and tried again, the table apparently was there, because I no longer had the issue.

-= Dave =-

 

Thanks for the replies.

 

JanZ, your help got me looking through the mod and I was able to trace the issue to another mod that was not playing nicely with SPC4.

 

It seems I had the exact same problem as Dave, the table not getting created. I use the column product listing mod, and this is where the entire process bogged down (due to my poor first attempt at adding the SPC4 mod to it). Once I fixed the issues with the col_prod_listing.php file, everything started working beautifully.

 

Wonderful improvement over SPC 3.5 and it was rather easy to install. BTW, I installed this manually on a heavily modded shop that had SPC 3.5 already installed.

 

Again, thanks for the help!

Link to comment
Share on other sites

I have appended includes/classes/shopping_cart.php as the sppc dictates 4 times. I keep getting this error:

==============

Parse error: parse error, unexpected '}' in /home/petinst/public_html/store/includes/classes/shopping_cart.php on line 397

==============

 

Here is the surrounding code, lines 362-410:

// BOF Separate Pricing Per Customer
/*          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
         if (tep_db_num_rows($specials_query)) {
           $specials = tep_db_fetch_array($specials_query);
           $products_price = $specials['specials_new_products_price'];
         } */
  $specials_price = tep_get_products_special_price($prid);
 if (tep_not_null($specials_price)) {
 $products_price = $specials_price;
     } elseif ($this->cg_id != 0){
       $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$prid . "' and customers_group_id =  '" . $this->cg_id . "'");
       if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
       $products_price = $customer_group_price['customers_group_price'];
       }
 }
// EOF Separate Pricing Per Customer
         }

         //clr 030714 update $products_array to include attribute value_text. This is needed for text attributes.
         $products_array[] = array('id' => $products_id,
                                   'name' => $products['products_name'],
                                   'model' => $products['products_model'],
                                   'image' => $products['products_image'],
                                   'price' => $products_price,
                                   'quantity' => $this->contents[$products_id]['qty'],
                                   'weight' => $products['products_weight'],
                                   'final_price' => ($products_price + $this->attributes_price($products_id)),
                                   'tax_class_id' => $products['products_tax_class_id'],
                                   'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''),
                                   'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''));

       }
     }

     return $products_array;
   }

   function show_total() {
     $this->calculate();

     return $this->total;
   }

   function show_weight() {
     $this->calculate();

     return $this->weight;
   }

 

Any ideas?

Link to comment
Share on other sites

So the problem is caused by the other contribution :D

 

It sounds like there's a problem with the logic of the page (in the way the two contribs work).

 

I ran into this with a much earlier version of SPP and the solution was to remove one of the }. I'm not a programmer so I couldn't tell you exactly what the problem is

Edited by Marvin Miller

Best & Thanks;
Marvin
----------------------
osCommerce 2.3.3.4 

Link to comment
Share on other sites

Thanks for the replies.

 

JanZ, your help got me looking through the mod and I was able to trace the issue to another mod that was not playing nicely with SPC4.

 

It seems I had the exact same problem as Dave, the table not getting created. I use the column product listing mod, and this is where the entire process bogged down (due to my poor first attempt at adding the SPC4 mod to it). Once I fixed the issues with the col_prod_listing.php file, everything started working beautifully.

 

Wonderful improvement over SPC 3.5 and it was rather easy to install. BTW, I installed this manually on a heavily modded shop that had SPC 3.5 already installed.

 

Again, thanks for the help!

 

Wow! I don't have that mod installed. So I wonder what my problem was. Hmmm....

 

 

-= Dave =-

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