Jump to content



Photo
* * * * * 14 votes

Seperate Pricing Per Customer v3.5


  • Please log in to reply
5950 replies to this topic

#5881   geomilli

geomilli
  • Members
  • 31 posts
  • Real Name:George Milligan
  • Gender:Male
  • Location:Danbury, Connecticut USA

Posted 27 April 2012 - 05:10

Anyone using "Category Box Enhancement", version 1.1?

Well, if you are then use the code snippet below to make it work with Hide Categories & Products. Just replace the code from the instructions for catalog/includes/boxes/categories.php.

Line 14
// BOF SPPC hide categories from groups for "Category Box Enhancement", version 1.1
    global $tree, $categories_string, $cPath_array, $customer_group_id, $languages_id;
// EOF SPPC hide categories from groups

Line 74
// BOF SPPC hide categories from groups for "Category Box Enhancement", version 1.1
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = " . (int)$parent_id . $catstatus . " and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by sort_order, cd.categories_name");
// EOF SPPC hide categories from groups

FYI - This is for an install on RC2a.

#5882 ONLINE   greasemonkey

greasemonkey
  • Members
  • 397 posts
  • Real Name:Scott
  • Gender:Male

Posted 27 April 2012 - 14:30

I have just installed SPPC 4.2 and QPBPP on my cart. 2.2 MS2.... Everything is going well so far, however when testing I'm having a strange issue... and I'm hoping someone can point me in the right direction;

When logged in as a "wholesale" customer and viewing products by category or by manufacture the correct customer group pricing is NOTdisplayed. "Wholesale" = customer group "1"... It displays as "retail" (customer group "0").

Pricing is correct in product_info...

Correct pricing is being added to the shopping_cart...

What makes this strange is; AFTER a product has been added to the shopping cart and then you go back to view by category or manufacture that same product (only the product added to the shopping cart) price IS now displaying correctly for the customer group (wholesale = customer group 1).

I have gone back and re-checked with Araxis Merge;

index.php
includes\modules\product_listing.php
inclueds\boxes\categories.php

Everything "seems" to be correct... Although I'm not a coder...

Is this something in priceformatter.php maybe? Or somewhere else? Any hints would be greatly appreciated... I did go through almost all 300 pages of this discussion and couldn't find anything... Sorry in advance if I missed it.

#5883 ONLINE   greasemonkey

greasemonkey
  • Members
  • 397 posts
  • Real Name:Scott
  • Gender:Male

Posted 29 April 2012 - 11:31

Still looking... if anyone has a suggestion. I've added

echo '<pre>';print_r($_SESSION);echo '</pre>';

To index.php and to make sure the customer group is ok... it seems to be (results below).

Array
(
    [cart] => shoppingCart Object
	    (
		    [contents] => Array
			    (
				    [2957] => Array
					    (
						    [qty] => 1
						    [discount_categories_id] =>
					    )
			    )
		    [total] => 4.02
		    [weight] => 0.1
		    [cartID] =>
		    [content_type] =>
		    [cg_id] => 1
	    )
    [language] => english
    [languages_id] => 1
    [currency] => CAD
    [navigation] => navigationHistory Object
	    (
		    [path] => Array
			    (
				    [0] => Array
					    (
						    [page] => index.php
						    [mode] => NONSSL
						    [get] => Array
							    (
								    [osCsid] => e1bb3e89290d1a26e65ca0366e9c58ef
							    )
						    [post] => Array
							    (
							    )
					    )
				    [1] => Array
					    (
						    [page] => index.php
						    [mode] => NONSSL
						    [get] => Array
							    (
								    [cPath] => 196
							    )
						    [post] => Array
							    (
							    )
					    )
			    )
		    [snapshot] => Array
			    (
			    )
	    )
    [wishList] => wishlist Object
	    (
		    [wishID] =>
	    )
    [customer_id] => 6891
    [customer_default_address_id] => 8019
    [customer_first_name] => Lisa
    [sppc_customer_group_id] => 1
    [sppc_customer_group_show_tax] => 0
    [sppc_customer_group_tax_exempt] => 0
    [customer_country_id] => 38
    [customer_zone_id] => 74
)



#5884 ONLINE   greasemonkey

greasemonkey
  • Members
  • 397 posts
  • Real Name:Scott
  • Gender:Male

Posted 29 April 2012 - 14:39

Found it... Finally... in includes\modules\product_listing.php the query to select pricing for
if ($customer_group_id != '0') {
I believe this means "anybody but customer group "0" (again I'm not a coder...so I'm guessing).

Was modified for QPBPP to
$pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '" . $customer_group_id . "' and customers_group_price != null");

When changed back to the orginal SPPC code

$pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '" . $customer_group_id . "'");

It seems to work perfectly... or at least how I expected...

#5885   geomilli

geomilli
  • Members
  • 31 posts
  • Real Name:George Milligan
  • Gender:Male
  • Location:Danbury, Connecticut USA

Posted 29 April 2012 - 19:43

In my post #5878,

Also, if you link to two categories for one product the products_new.php displays two of that same product on the page. My code is modified to be in columns, integrated for Ezier New Fields, SPPC and HP&C, Wishlist and a database name "products_namebreak" that I have created for display formatting so it's funky.


I have come up with a better explanation... If you link a product from one category to another, the product_id is identical. When you view products_new.php it will show the duplicated id's IE products from both categories because of this link. I don't want that. /pinch.gif' class='bbc_emoticon' alt='>_<' /> This problem is also in featured_products.php, assuming an identical result.

To prove that the code in my quote was not an issue, I started with a fresh install of osC and added SPPC and HP&C. The scenario is the same on product_new.php. I made a new category called "Our Favorites" and then linked the product Unreal Tournament to it. The product then appears in two places when product_new.php is displayed.

Any ideas or fixes that I am not aware of? I have read through most of this forum and searched crazily, to no avail. However, I haven't stopped yet. /blink.png' class='bbc_emoticon' alt=':blink:' />

#5886   shoppy

shoppy
  • Members
  • 9 posts
  • Real Name:John
  • Gender:Male
  • Location:The Netherlands, Zwolle

Posted 15 October 2012 - 11:57

Hello all,

I am building a store for our retailers.
If you are not logged in you see the 'normal' prices. The prices they have to use in their stores.
This way a customer sees the same price for an article thats in store by our retailers.
But if you log in you see the group prices. The price a retailes has to pay.

Is it possible to show both of the prices in the product_info.php so the retailer can see them both?
This way he can compaire the two prices to check his 'discount'.

Realy hope someone can help me with this.

#5887   14steve14

14steve14
  • Members
  • 3,529 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 15 October 2012 - 15:22

@shoppy

Have a look here http://addons.oscommerce.com/info/3561
REMEMBER BACKUP, BACKUP AND BACKUP

Don't take life too seriously. no one gets out alive anyway

#5888   shoppy

shoppy
  • Members
  • 9 posts
  • Real Name:John
  • Gender:Male
  • Location:The Netherlands, Zwolle

Posted 15 October 2012 - 17:35

@shoppy

Have a look here http://addons.oscommerce.com/info/3561


Great, thanks Steve.
I will try and get this to work!

Thanks again.

#5889   mumme1

mumme1
  • Members
  • 24 posts
  • Real Name:magnus andersson

Posted 25 October 2012 - 11:35

Hi,

Is there anyway to hide the price for retail?
Our store is busniess to business, so if a costumer is retail instead of the price i want to show "login for prices"

So for retail: price hidde -> "login for prices"
For Wholesalers and other costumer groups: -> $10

#5890   BlakeBG

BlakeBG
  • Members
  • 22 posts
  • Real Name:Georgi
  • Gender:Male
  • Location:Bulgaria

Posted 06 December 2012 - 15:39

I need help with http://addons.oscommerce.com/info/3561 for osc 2.3 , i cant get it working , it doesnt show prices at all , only when added to cart. Any ideas/suggestions ? Tnx in advance

#5891   lhps

lhps
  • Members
  • 17 posts
  • Real Name:Lucas Sobral

Posted 19 December 2012 - 14:20

Hi Code Red,

Try this:

Line 67 in catalog/includes/classes/split_page_results.php must be changed from:

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
to:
$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;
Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from:
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;
to:
$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

Hi,

I've just installed this contrib but I'm getting the following error in admin/customers.php -

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_id, c.customers_group_ra, a.entry_country_id, a.entry_company, cg.customers_group_name from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id order by c.customers_id DESC limit -20, 20


Any ideas?

Hi,

I've just installed this contrib but I'm getting the following error in admin/customers.php -

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_id, c.customers_group_ra, a.entry_country_id, a.entry_company, cg.customers_group_name from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id order by c.customers_id DESC limit -20, 20


Any ideas?


My Error

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where c.customers_lastname like '%lucas%' or c.customers_firstname like '%lucas%' at line 1
select count(*) as total from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id, customers_groups cg where c.customers_group_id = cg.customers_group_id where c.customers_lastname like '%lucas%' or c.customers_firstname like '%lucas%' or c.customers_email_address like '%lucas%'


#5892   Monika in Germany

Monika in Germany
  • Members
  • 4,903 posts
  • Real Name:Monika
  • Gender:Female
  • Location:Munich, Germany

Posted 19 December 2012 - 14:59

look at your file ... when you edited it, you added a second where clause instead of adding to the existing where clause! that second "where" should be an "and"


where c.customers_group_id = cg.customers_group_id where
:-)
Monika

addicted to writing code ... can't get enough of databases either, LOL!

my toolbox: Textpad - Compare and Merge - phpMyAdmin -  WS_FTP - Photoshop - How to search the forum

Interactive Media Award July 2007 ~ category E-Commerce
my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

#5893   sungam

sungam
  • Members
  • 2 posts
  • Real Name:Magnus Andersson

Posted 23 January 2013 - 13:06

Is there anyway to EASY show both retail and wholesaler price?
I know there is a contribtuion Price List for SPPC but it looks to complicated to integrate with product listing.

I want to show both retail and wholesalers prices in product_listing.

#5894   Monika in Germany

Monika in Germany
  • Members
  • 4,903 posts
  • Real Name:Monika
  • Gender:Female
  • Location:Munich, Germany

Posted 23 January 2013 - 15:40

there should be a function in your currencies.php where the price is being determined for display, depending on customer status. Basically (if I recall correctly it was a bunch of if/else statements) I'd pick this apart into two different calls of the function - make a function for retail, one for wholesale, and call them accordingly, NOT looking at the session parameter but YOUR predefined ID for there status (wholesale/retail) ...
:-)
Monika

addicted to writing code ... can't get enough of databases either, LOL!

my toolbox: Textpad - Compare and Merge - phpMyAdmin -  WS_FTP - Photoshop - How to search the forum

Interactive Media Award July 2007 ~ category E-Commerce
my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

#5895   partrade12

partrade12
  • Members
  • 51 posts
  • Real Name:Erin

Posted 29 April 2013 - 19:49

I cant seem to get my separate customer pricing to show up right, when signed in as a different type of customer that should have a different price it still shows the consumer pricing, any help would be greatly appreciated!

#5896   partrade12

partrade12
  • Members
  • 51 posts
  • Real Name:Erin

Posted 09 May 2013 - 19:46

I am still having this issue is any one would please help me it will be greatly appreciated!!

#5897   partrade12

partrade12
  • Members
  • 51 posts
  • Real Name:Erin

Posted 20 May 2013 - 16:34

I am still having this issue if any one could help! PLEASE!!! /innocent.gif' class='bbc_emoticon' alt='o:)' />

#5898   MWebb

MWebb
  • Members
  • 60 posts
  • Real Name:Matthew
  • Gender:Male

Posted 22 May 2013 - 12:13

@Jan Zonjee

I've installed the sppc along with member approval. Now I've created 3 groups; guest, member of and retail. However although these groups have been created there doesn't seem to be an option to actually change the prices for each customer groups. That or I'm looking in the wrong place. Any help would be appreciated.

#5899   14steve14

14steve14
  • Members
  • 3,529 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 23 May 2013 - 06:43

Prices are added in the product pages in the admin area.
REMEMBER BACKUP, BACKUP AND BACKUP

Don't take life too seriously. no one gets out alive anyway

#5900   MWebb

MWebb
  • Members
  • 60 posts
  • Real Name:Matthew
  • Gender:Male

Posted 23 May 2013 - 10:29

@14steve14

I don't think I have that page, I have (in the configuration area) product listing and within that area I have display product pricing (with a value of 3) but I can only change the value not the price. Have installed the module incorrectly at some point or something?