Jump to content
hozone

[contribution] Total B2B

Recommended Posts

Please excuse my ignorance... :blink: ...

 

That is found in the product_info.php on line 78

 

Right?

 

How do I edit it to get it to work?


Learning is not attained by chance, it must be sought for with ardor and attended to with diligence.

Share this post


Link to post
Share on other sites

How do you set this up so that the store owner does not have to manually activate accounts, AND the user is logged in after registration?

 

Why in the world would a store owner want to manually activate accounts anyway? So much money would be lost by doing so. Most customers will just move right along to the next store down.


Drive it like you stole it.

Share this post


Link to post
Share on other sites

In this instance, the store owner has an established client base in a specific industry and wants to control prices for each client.


Learning is not attained by chance, it must be sought for with ardor and attended to with diligence.

Share this post


Link to post
Share on other sites

hoZone:

 

I am confused by your answer...how do I fix the problem...please excuse my ignorance and thank you for your time :)


Learning is not attained by chance, it must be sought for with ardor and attended to with diligence.

Share this post


Link to post
Share on other sites
hi

 

Kindly ignore my previous posting. Problem solved... :lol:

 

How do you solve the problem with product_listing_col.php. If possible, please post your code so all of us who's using product_listing_col.php can use it.

 

Thanks,

CAP

Share this post


Link to post
Share on other sites

This may be something simple that I'm overlooking:

 

If I want to have a new user signup and checkout at normal prices (without me approving the account) what do I have to do?

 

I'm looking to have users account automatically be approved and then I will go into the admin later on and add them to the wholesale users group.

Share this post


Link to post
Share on other sites
This may be something simple that I'm overlooking:

 

If I want to have a new user signup and checkout at normal prices (without me approving the account) what do I have to do?

 

I'm looking to have users account automatically be approved and then I will go into the admin later on and add them to the wholesale users group.

 

okay, stupid me didn't read the previous posts... understood now.

Share this post


Link to post
Share on other sites

NEW DILEMMA:

 

I enabled the store to be retail and wholesale, and my dilemma is that i want the retail customers to be blocked from purchasing the wholesale goods.

 

So far i just have the wholesale products set up with 2 prices (wholesale customers see the actual price, and retail customers see $0). Just showing a $0 isn't good enough. I want to block them from being able to add the item to the cart.

 

I bet there is an easy fix for this; a way to check the status of a customer, whether he is in a particular group and then if he is in the designated wholesale group or groups, display the "add to cart" button.

 

Or inversely check the status for the "retail group" (in my case "group 1") and hide the button if he is in that group.

 

Can anyone give me advice on how to do this (since i don't know any php!).

 

Thanks for any help you can give!!!

-George

george@hobbyhen.com

Share this post


Link to post
Share on other sites

i suppose we chould write a code to block a group of your to buy, if they are in the gruop callad "not buy users" or something like this.

but the only way to do this is editing the code, and now.. i don't have time to do it


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites

Hi,

 

I'm using the original Customer Discount contribution and thought this would be the best place to ask my question since the other forum died. I was wondering if anyone has this working with credit class/gift vouchers, so that it won't apply a discount to gift voucher when purchased.

 

Like maybe excluding certain products from the discount rate (or maybe it does this already I don't know).

The products don't have only 1 price, but it is possible to set multiple prices for products.
Not sure if this would do what I wanted with out installing it and I don't really need the rest of the code just the customer discount part.

 

 

Thanks,

 

Tim

Share this post


Link to post
Share on other sites

Aloha,

Great contrib, I actually don't have a request for help, but a bit of info for folks who want to use BTS v. 1.3 with this contribution.

 

I just finished installing B2B over a cart with BTS v1.3. After manually patching all the files (make sure to compare the files - there are a few changes that are outside of the //B2B start and end tags, see jogoto's post earlier in this thread). I was presented with the warning:

Warning: Missing argument 3 for display_price() in ...... includes\classes\currencies.php on line 72

along the top of products_info.php, products_review.php and products_review_info.php pages. This is caused by includes/meta_tags.php trying to insert the price in the <title> tag. To fix it

 

Open includes/meta_tags.php, find line 187:

    if ($mt_new_price = tep_get_products_special_price($mt_product_info['products_id'])) {
     // $mt_products_price = $currencies->display_price($mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id']));
     // only display special price in meta tag title if it's a special
     $mt_products_price = $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id']));  
   } else {
     $mt_products_price = $currencies->display_price($mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id']));
   }

Replace with:

	//TotalB2B start
$mt_product_info['products_price'] = tep_xppp_getproductprice($mt_product_info['products_id']);
   //TotalB2B end

   if ($mt_new_price = tep_get_products_special_price($mt_product_info['products_id'])) {
 //TotalB2B start
  $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
     $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); 
     if ($query_special_prices_hide_result['configuration_value'] == 'true') {
	 $products_price = '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . ''; 
  } else {
    $mt_products_price = '' . $currencies->display_price($mt_product_info['products_id'], $mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . '';
  }
     //TotalB2B end 
  
   } else {
     $mt_products_price = $currencies->display_price($mt_product_info['products_id'], $mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id']));
   }

 

Next, find line 212:

    if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
     $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id']));
   } else {
     $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
   }

 

Replace with:

	//TotalB2B start
$mt_review['products_price'] = tep_xppp_getproductprice($mt_review['products_id']);
   //TotalB2B end

   if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
 //TotalB2B start
  $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
     $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); 
     if ($query_special_prices_hide_result['configuration_value'] == 'true') {
	 $products_price = '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . ''; 
  } else {
    $mt_products_price = '' . $currencies->display_price($mt_product_info['products_id'], $mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id'])) . '';
  }
     //TotalB2B end 
  
   } else {
     $mt_products_price = $currencies->display_price($mt_review['products_id'], $mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
   }

 

Finally, find line 234:

    if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
     $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id']));
   } else {
     $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
   }

 

Replace with:

	//TotalB2B start
$mt_review['products_price'] = tep_xppp_getproductprice($mt_review['products_id']);
   //TotalB2B end

   if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
 //TotalB2B start
  $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
     $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); 
     if ($query_special_prices_hide_result['configuration_value'] == 'true') {
	 $products_price = '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . ''; 
  } else {
    $mt_products_price = '' . $currencies->display_price($mt_product_info['products_id'], $mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . '' . $currencies->display_price_nodiscount($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id'])) . '';
  }
     //TotalB2B end 
  
   } else {
     $mt_products_price = $currencies->display_price($mt_review['products_id'], $mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
   }

And you're done :)

 

-Alane

Share this post


Link to post
Share on other sites
does anyone have this contrib working with purchase order module, mopics contribution, headertags, etc?

 

Did you get some information about using easypopulate contribution with this feature?

 

thanks for replying!!! :(


http://www.vremeto.org - Weather in Stambolijski, 4210, BG

Share this post


Link to post
Share on other sites
hi

 

i'm working on a site with relatively many mods and contributions already done

 

1. will Total B2B work with featured products?

2. how can i get this contribution to work with EasyPopulate.

3. will you say that it is better than other contributed B2B suites?

 

thanks.

 

Dear Siavash, did you manage to integrate easypoplulate and Xprice?


http://www.vremeto.org - Weather in Stambolijski, 4210, BG

Share this post


Link to post
Share on other sites

I have a similar problem to Alane above. I have installed B2B over osc Affiliate. Everything works fine with B2B but I'm getting display_price() errors all over the affiliate summary pages.

 

e.g. Warning: Missing argument 3 for display_price()

 

I realise B2B has changed the display_price function. Should I just create another function for affiliate calls only e.g. display_price_affiliate(), using the original functionality (pre-B2B) or will that bugger up the affiliate calculations when discounts are in place?

 

I hope that makes sense and thanks in advance.

Simon

Share this post


Link to post
Share on other sites
How do you set this up so that the store owner does not have to manually activate accounts, AND the user is logged in after registration?

 

Why in the world would a store owner want to manually activate accounts anyway? So much money would be lost by doing so. Most customers will just move right along to the next store down.

 

Edit "catalog/create_acount.php":

Locate this string:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

and comment it out.

Add this code instead:

	$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_status from " . TABLE_CUSTOMERS . " where customers_status = '1' and customers_email_address = '" . tep_db_input($email_address) . "'");
       $check_customer = tep_db_fetch_array($check_customer_query);

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

       $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");
       $check_country = tep_db_fetch_array($check_country_query);

       $customer_id = $check_customer['customers_id'];
       $customer_default_address_id = $check_customer['customers_default_address_id'];
       $customer_first_name = $check_customer['customers_firstname'];
       $customer_country_id = $check_country['entry_country_id'];
       $customer_zone_id = $check_country['entry_zone_id'];
       tep_session_register('customer_id');
       tep_session_register('customer_default_address_id');
       tep_session_register('customer_first_name');
       tep_session_register('customer_country_id');
       tep_session_register('customer_zone_id');

       tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

// restore cart contents
       $cart->restore_contents();

       if (sizeof($navigation->snapshot) > 0) {
         $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
         $navigation->clear_snapshot();
         tep_redirect($origin_href);
       } else {
         tep_redirect(tep_href_link(FILENAME_DEFAULT));
       }

 

This code is taken unmodified from "login.php". I didn't bother to optimize it any way. It does the trick - nothing else matters :)

Make sure you fixed the "customers" table (set "customer_status" field default value to "1").

Now your visitors will be auto-approved and auto-logged in

Share this post


Link to post
Share on other sites
I have a similar problem to Alane above. I have installed B2B over osc Affiliate. Everything works fine with B2B but I'm getting display_price() errors all over the affiliate summary pages.

 

e.g. Warning: Missing argument 3 for display_price()

 

I realise B2B has changed the display_price function. Should I just create another function for affiliate calls only e.g. display_price_affiliate(), using the original functionality (pre-B2B) or will that bugger up the affiliate calculations when discounts are in place?

 

I hope that makes sense and thanks in advance.

Simon

 

 

you have to controll that evey call to disaply_price has as firt argument the ID of the product. (have to had the ID of the prod. to all call of this funct)


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites
version 1.2a is OUT

 

Changelog

. Product prices of the products that have special prices set, can be hidden:

  "Configuration / My Store/ Special price (products price hiding)".

. Administrator must activate customers after registrations.

 

What exactly does the products price hiding do? I turn it off or on and it doesn't appear to do anything different?!

Share this post


Link to post
Share on other sites

I've got some products for resellers that I don't want customers to even be able to see - I set their price 1 (default) to $0.00 and their price 2 (reseller) to whatever, but then the customer can see the default price of $0.00...

 

Anyway to make a product with $0.00 for that customer's price group be invisible to those customers in that group?

Share this post


Link to post
Share on other sites

In the case of "hiding" I think what would be ideal is having the entire product be able to be hidden from customers who are either not logged in or not part of a particular group. This product would not even be listed in the categories unless the user had permission to purchase it.

Share this post


Link to post
Share on other sites

I was actually able to hide the $0.00 products pricing using the 'Hide Price if $0' contribution with some minor modifications.

 

One thing that would be nice would be the ability to give customers a QUANTITY discount above and beyond their normal discount. For example, I've got some customers who get good price breaks but only when they buy 50 or 100 units at a time but if they don't buy that many I want them to pay normal reseller pricing (which is still less than retail pricing)...

 

Basically just add a quantity discount for that particular group on each items price - so for each price on an item I could also add a quantity price and the number of units to qualify for that price...

 

Just a thought ;)

Edited by doment

Share this post


Link to post
Share on other sites
The products don't have only 1 price, but it is possible to set multiple prices

for products.

 

I have installed Total B2B 1.2a and on a whole the module is great. But I have a couple of questions.

 

1) I have changed the Number of Prices per Product to four. When I go into the Catalogue and edit a product, I can select four pricing levels but if I enter the same Net amount into each of the four pricing levels, the same Gross amount appears in each four. Is this right or should the four pricing levels automatically reflect the pricing levels from the groups? Have I misunderstood how the pricing levels should be set within each product?

 

2) Has anyone used Easy Populate module with Total B2B installed and successfully exported a complete list that includes different pricing levels? If so, how did you do it?

 

Regards

Robyn

Share this post


Link to post
Share on other sites

Hi

 

I use Total B2B

I would like to show het price in the shopping cart without tax.

Is this possible with b2b?

 

And can this als be done in the infobox shopping cart and the check out page?

 

Thanx!!

 

PS it would be great if there are 2 colums, one incl. and one exl.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×