Jump to content
Latest News: (loading..)
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

My bad, i've used the wrong sql schema, the update sql schema, not the new installation sql schema. :blink:

 

 

Now it's working, now I'm trying to install TAX RATES EXEMPTABLE - ADDON TO SPPC 4.1.6 (FIXED). Wish me luck :blush:

 

 

My bad again, looked at the wrong demo vhost. :( Problem is still there.

Share this post


Link to post
Share on other sites
The function is found in includes/functions/database.php, at the bottom of the file.

 

Then the function should not be triggered, but better safe than sorry. Still strange this error...

 

You could try the (apparently) problematic insert query in phpAdmin or the like and see if it triggers an error:

insert into products_group_prices_cg_1 select p.products_id, p.products_price, NULL as specials_new_products_price, NULL as status FROM products p";

 

 

When I run the query above from phpadmin I do not get any errors ... and the table products_group_prices_cg_1 gets populated with all items that have the original prices.

 

Current conditions before query listed below

 

these tables exist but have NO data in them

table products_group_prices_cg_1 is ordiginal price

table products_group_prices_cg_3 is employee cost < 30%

table products_group_prices_cg_4 is non_stocking + 10 %

table products_group_prices_cg_5 is distributer < 19%

 

If all the prices I have are stored in products_groups what purpose does the following tables have ?

 

table products_group_prices_cg_1

table products_group_prices_cg_3

table products_group_prices_cg_4

table products_group_prices_cg_5

 

Just trying to figure out the process ?

 

Any help or suggestions would be appreciated.

 

thanks in advance. :blush:

Share this post


Link to post
Share on other sites
When I run the query above from phpadmin I do not get any errors ... and the table products_group_prices_cg_1 gets populated with all items that have the original prices.

 

If all the prices I have are stored in products_groups what purpose does the following tables have ?

 

table products_group_prices_cg_1

table products_group_prices_cg_3

table products_group_prices_cg_4

table products_group_prices_cg_5

Because of the sql layout of the table specials and products_groups you cannot join them in certain query to do a sorting by price. Therefore these intermediary tables are used. Since it is only used for sorting and you are not likely to change prices every couple of minutes those tables only are updated once in a while.

 

Why don't you try copying those functions from the included file /functions/general.php? Perhaps you copy and pasted them from the install.html but the Unix line endings were not recognized by your editor.

I have seen it happen to someone once and then you get the strangest errors.

 

Instead of:

	  $empty_query = "truncate " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id . "";
  $fill_table_sql1 = "insert into " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." select p.products_id, p.products_price, NULL as specials_new_products_price, NULL as status FROM " . TABLE_PRODUCTS . " p";
  $update_table_sql1 = "update " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." ppt left join " . TABLE_PRODUCTS_GROUPS . " pg using(products_id) set ppt.products_price = pg.customers_group_price where ppt.products_id = pg.products_id and pg.customers_group_id ='" . $customer_group_id . "'";
  $update_table_sql2 = "update " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." ppt left join " . TABLE_SPECIALS . " s using(products_id) set ppt.specials_new_products_price = s.specials_new_products_price, ppt.status = s.status where ppt.products_id = s.products_id and s.customers_group_id = '" . $customer_group_id . "'";
  if ( tep_db_query($empty_query) && tep_db_query($fill_table_sql1) && tep_db_query($update_table_sql1) && tep_db_query($update_table_sql2) ) {
	   return true;
		  }

You would get:

	  $empty_query = "truncate " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id . "";  $fill_table_sql1 = "insert into " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." select p.products_id, p.products_price, NULL as specials_new_products_price, NULL as status FROM " . TABLE_PRODUCTS . " p"; $update_table_sql1 = "update " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." ppt left join " . TABLE_PRODUCTS_GROUPS . " pg using(products_id) set ppt.products_price = pg.customers_group_price where ppt.products_id = pg.products_id and pg.customers_group_id ='" . $customer_group_id . "'";	$update_table_sql2 = "update " . TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id ." ppt left join " . TABLE_SPECIALS . " s using(products_id) set ppt.specials_new_products_price = s.specials_new_products_price, ppt.status = s.status where ppt.products_id = s.products_id and s.customers_group_id = '" . $customer_group_id . "'";	   if ( tep_db_query($empty_query) && tep_db_query($fill_table_sql1) && tep_db_query($update_table_sql1) && tep_db_query($update_table_sql2) ) { return true;   }

Share this post


Link to post
Share on other sites
My bad, i've used the wrong sql schema, the update sql schema, not the new installation sql schema. :blink:

 

 

Now it's working, now I'm trying to install TAX RATES EXEMPTABLE - ADDON TO SPPC 4.1.6 (FIXED).

Why would you want to install an addon for an older version that is already in the latest version? You can't install it twice...

Share this post


Link to post
Share on other sites

I am using wishlist 3.5d and would like the price reflect from SPPC. The query below needs to modified. Can someone tell me how to do this ?

 

Line 237 in wishlist.php

 

$products_query = tep_db_query("select pd.products_id, pd.products_name, pd.products_description, p.products_image, p.products_status, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.products_id = '" . $product_id . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by products_name");

$products = tep_db_fetch_array($products_query);

 

Any help would be appreciated !

 

Thanks

Edited by sandwick

Share this post


Link to post
Share on other sites

In addition to providing for special pricing, can this contribution be used to provide separate content (e.g., informational pages) to members of the separate groups?

 

Thanks for any info...

~Wendy

Share this post


Link to post
Share on other sites
In addition to providing for special pricing, can this contribution be used to provide separate content (e.g., informational pages) to members of the separate groups?

First of all you should only show the link to customers of that group (if customer_group_id == 'x' { echo link here; } ).

 

Then to keep people out who are guessing the link look at chechout_shipping where visitors are redirected to another page if they are not logged-on. In this case you look for $_SESSION['sppc_customer_group_id'], if it is set and if it has the correct value.

Share this post


Link to post
Share on other sites

I need some recommendations

I currently have SPPC 4.2.2, additional images 2.0.1 and Column Product Listing for SPPC v1.3 installed. some of my products come in as many as 6 sizes each a different price which will be attributes. contributions I am looking for are to:

 

  1. show real price for all attributes in both customer groups
  2. an easy way to automatically calculate prices for one group including attributes when a base or group 1 price is entered

    product1 small attribute wholesale $10 retail 2.5% ($25)

    med attribute wholesale $20 retail 2.5% ($50)

    large attribute wholesale $30 retail 2.5% ($75)


  3. a way to enter editable text when price is 0 (example for product 1 above, on product list wholesale page I want it to have $10- $30 under thumbnail pic and as price in upper right corner of product info page; then on retail $25-$75 in same places; customer would have to choose an attribute in order to place price in shopping cart
  4. anything that will make entering these products prices attributes and groups easier

every time I find something that looks like it fits one of my problems it either doesn't work with SPPC or not good with attributes

 

any direction would be so very appreciated

carie

Share this post


Link to post
Share on other sites

Has anyone used Actual Attribute Price V1.0 (not much support on that thread)

with that contribution I could use Easy populate (doesn't do attributes well) and wouldn't have 10 math computations every time i enter a product.

 

carie

Share this post


Link to post
Share on other sites
Why would you want to install an addon for an older version that is already in the latest version? You can't install it twice...

 

Err, I tested version 4.1.6 so I can use Tax Exemption addono to 4.1.6.

 

Is this included to the latest version?

Share this post


Link to post
Share on other sites
  1. show real price for all attributes in both customer groups

In Product Listing in Columns actual attribute pricing can be used. It "just" needs to be adapted to SPPC but a lot of the code already resembles the code of SPPC (version 2.2.7 and 2.2.8 at least, I'm not familiar with the tooltip stuff added lately).

 

  1. an easy way to automatically calculate prices for one group including attributes when a base or group 1 price is entered

    product1 small attribute wholesale $10 retail 2.5% ($25)

    med attribute wholesale $20 retail 2.5% ($50)

    large attribute wholesale $30 retail 2.5% ($75)


  2. a way to enter editable text when price is 0 (example for product 1 above, on product list wholesale page I want it to have $10- $30 under thumbnail pic and as price in upper right corner of product info page; then on retail $25-$75 in same places; customer would have to choose an attribute in order to place price in shopping cart
  3. anything that will make entering these products prices attributes and groups easier

This sounds like a highly specific thing just for you. You can make some specific JavaScript I guess (something like admin/categories.php does with the regular price with and without tax). Or use a spreadsheet with formulas to do the calculation for you. Then you just need to copy and paste in the prices.

Edited by Jan Zonjee

Share this post


Link to post
Share on other sites
Can someone tell me how to do this ?

 

Line 237 in wishlist.php

The query looks a lot like the one in includes/modules/new_products.php so I would look at the SPPC version of that file for inspiration.

Share this post


Link to post
Share on other sites
Yes.

 

So what do you suggest sir?

 

Currently I'm using OS v2.2 RC1, SPPC 4.1.6 and TAX RATES EXEMPTABLE - ADDON TO SPPC 4.1.6 (FIXED), ...

 

 

So I'll just revert back to my untouched OScommerce and use the latest SPPC?

 

And btw, Is there a module that have "PST Number" as a field of a customter during sign-up, that can be tracked in the admin panel when administering accounts?

 

TIA and for the help.

Share this post


Link to post
Share on other sites
So I'll just revert back to my untouched OScommerce and use the latest SPPC?

Why don't you start fresh with RC2a, fresh database, run the sql and exchange the files from the latest version with the RC2a ones. You could be up and running in an hour?

 

And btw, Is there a module that have "PST Number" as a field of a customter during sign-up, that can be tracked in the admin panel when administering accounts?

PST Number? There is a tax id number which has different names depending in which country you reside.

Share this post


Link to post
Share on other sites

Hi,

 

Has anyone maybe already tried with TotalB2B contribution ?

 

Looks like SPPC and QPBPP joint together ...

 

http://addons.oscommerce.com/info/3613/v,22

 

I'll try it on a fresh install in few days, but still ... if already some experiences ... please post a comment.

 

Thanks ;)

Edited by suhy

Share this post


Link to post
Share on other sites

I already added to display retail prices in product_info.php along with wholesale price. But I need it to display the retail prices in product_listing.php too, in a new column (just like the current wholesale prices). Anybody know if this possible ? Thanks.

Share this post


Link to post
Share on other sites

Hi,

 

TotalB2B contribution works fine from the start on a fresh install 2.2rc2a. It looks interesting and it is also very useful. The only thing missing is QPBPP.

The good thing is that you can set discount per manufacturer (which you can also use as product groups with some organizing) to individual customer or customer group name (selectable).

This way you can doo lots of tweaks with prices in many ways.

You can also set discounts only to customers groups and group customers accordingly ... and set specials to individual customers or groups ...

 

A few tweeks are missing, like : showing retail prices with customers prices in all views in use (I don't want my customers guessing retail prices), log in with only email ... nothing that could not be done easely I assume (hope, lol).

 

Next I'll try to join SPPC + QPBPP anyway to see them both in paralell actions to see which comes more handy. I already know the result ... a little bit of this and a little bit of that, hehe

 

 

Anyway, if anyone thinks these complete packages (both versions) with modified databases already, fresh 2.2rc2a + these contributions only, would come handy, let me know ...

Share this post


Link to post
Share on other sites

Hi Jan

 

I wonder if there's the latest updated version of New Installation Package for OS Commerce with your most popular contributions:

1. Seperate Pricing Per Category

2. Quantity Price Break

3. PriceFormatter_1_2_3_4_5_6_7_8 (a nice format)

4. Hide Price if $0

5. Hide Products and Categories from customer groups for SPPC

6. Account create in admin

7. Customer Info box for SPPC

8. Optimize Categories Box

9. Loyalty discounts for SPPC

10. Printer Friendly Product Info Page for SPPC

11. Quick updates for SPPC

12. Specials by Category for SPPC

13. others

 

Or otherwise, is it possible to find out the correct sequence for installations and upgrades of the above? BTW, which versions are the the most updated or the paths to the above contributions?

 

As a matter of fact, I started using your contributions 3 years ago. They all worked perfectly well until last month when I moved servers. After I moved the original files to the new server, they don't work anymore. So I have to start from scratch again and tried to re-install the latest version of OSCommerce.

 

The files come with a new version of products and attributes. But when I finished the above first 4th and 5th upgrades, the shopping cart display an incorrect sum.

 

My shopping cart contains:

2 items of product without attributes (e.g. 300)

1 item ($500) with attributes (together with an extra cost of $100)

However, the total sum of the shopping cart is incorrectly displaying $1100 instead of $900. (both on the shopping cart total and the shopping cart box)

 

When I go through the payment and confirmation procedure, the amount requiring me to pay is $900. (It's okay)

If I replaced the shopping cart class with the shopping cart come from your zip files, the sum return to normal without a mistake.

However, when I click "buy now" on the "product_info page", the page carry me to a blank page, and no product is put into the shopping cart.

 

My temporary mall is setup at http://webclasshk.homeip.net/mall

 

What files should I prepare for you to download for inspection?

 

Thanks in advance

 

James

Share this post


Link to post
Share on other sites
After I moved the original files to the new server, they don't work anymore. So I have to start from scratch again and tried to re-install the latest version of OSCommerce.

If I were you I would try to fix your old site. Presumably the errors you get are from using MySQL5 on the new server. That is much less work to fix than try to install everything new with the latest versions.

 

Depending on which version you installed you might encounter serious trouble. In the latest version the tax number was moved to another table so all the old data will not be visible in the new version plus all the errors you will get.

 

If you only get white pages when there is an error you will either have to ask your hosting company to turn showing of errors to on or get access to the error log they most likely have. Otherwise it is very hard to find solutions for those errors.

Share this post


Link to post
Share on other sites
I have installed this fresh and when I go to the product attributes there is no extra button to add the different groups.

I assume this is a question but for me it is not clear what you mean. Adding customers groups is done in a (new) page in the admin: admin/customers_groups.php.

 

To edit attribute prices and visibility for groups there is a button (added to the package) that needs to be added to the directory with language specific buttons for your admin. The documentation mentions admin/includes/languages/english/images/buttons/button_group_prices.gif but if you use for example German as your language in the admin it should be added (too) to admin/includes/languages/german/images/buttons/

 

See the package you downloaded: separate_price_422/documentation/attributes.htm for a screenshot of how the button looks and the popup it spawns.

Share this post


Link to post
Share on other sites

Hi Guys/girls

 

I just installed Separate Pricing Per Customer 4.2.2 and got it to work. Problem is that i'm looking for the following:

1. I'm a manufacturer that ONLY supply to retailers. Is there a way that only the retailers can see the prices, but the general public can still brows the shop without seeing the prices or be able to shop ??

2. Is there a way admin can activate a new account when a person registered ?? Right now it looks like register and off you go !!. I want to be able to approve/reject the registrations on my shop.

3 Or any1 can register but will fall in a group say.... public and admin can then move them to retailers or wholesalers etc.

 

If this has been discussed before - I'm sorry

 

Will you be so kind as to direct me in the right direction.

 

By the way i'm no computerfundi and battle my way through all the programming jargon etc...

Your help will be appreciated

 

Francois

Share this post


Link to post
Share on other sites
1. I'm a manufacturer that ONLY supply to retailers. Is there a way that only the retailers can see the prices, but the general public can still brows the shop without seeing the prices or be able to shop ??

I think if you make all your prices for the retail group zero and use the Hide Price if zero contribution that will do 99%.

2. Is there a way admin can activate a new account when a person registered ?? Right now it looks like register and off you go !!. I want to be able to approve/reject the registrations on my shop.

Not sure but I think there are contributions for things like that that could be re-coded to work with SPPC. Never looked at it closely but I would think you can delete customer accounts so if you have all your prices for retail zero you should be covered.

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

×