Zen Cart Logo
Forums / All Other Contributions/Addons / Group Pricing Per Item Issue

Group Pricing Per Item Issue

Views: 60,111

Results 61 to 80 of 136
21 Jun 2008, 5:55 PM
#61
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Group Pricing Per Item Issue

It appears there's a piece of code missing in the contribution.

/includes/classes/shopping_cart.php

Go to line 1093.
Copy lines 1093-1101 to clipboard:```
if($_SESSION['customer_id']) {
$customer_group_query = "select gp.group_name
from " . TABLE_CUSTOMERS . " cu
left join " . TABLE_GROUP_PRICING . " gp on cu.customers_group_pricing=gp.group_id
where cu.customers_id = " . $_SESSION['customer_id'];
if($customer_group = $db->Execute($customer_group_query)) {
$customers_group=$customer_group->fields['group_name'];
}
}

Go up to line 613 and paste it in there, right after this line```
    if (!is_array($this->contents)) return 0;
21 Jun 2008, 9:49 PM
#62
philnm avatar

philnm

New Zenner

Join Date:
Feb 2004
Posts:
25
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

THANK YOU, THANK YOU!

Working perfect now. Sure appreciate it!

1 Aug 2008, 8:43 PM
#63
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Group Pricing Per Item Issue

new issue!

I have a cart that used this last year and we are gearing up for this year but it no longer shows the group prices. Same files, same database but different server. I've got lots of sites on the new server and have had no problems with any of the zencarts except for the mysql 5 and php5 changes. Everything else in the cart is working fine.

Anybody got any idea why it wouldn't be working?

3 Aug 2008, 9:22 PM
#64
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Group Pricing Per Item Issue

well, I fixed the problem by upgrading the cart and putting in the 1.3.8 mod instead and now everything works after putting the shopping cart fix in. I'm going to package it back up and upload it to the contributions section so no one has to worry about this again.

11 Aug 2008, 4:19 PM
#65
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hi All,

I too just installed this mod to Zen 1.3.8a and I'm having the same issues as knights2!

I receive the below warning when adding or editing a product in admin and don't see where the other pricing info goes.

Warning: Invalid argument supplied for foreach() in ...\admin\includes\modules\product\collect_info.php on line 398

Any thoughts?

Thanks

11 Aug 2008, 4:28 PM
#66
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

OK,

It helps if one would finish reading the instruction (It's a guy thing!).

Once you add the group names (Group A, Group B, ...) to the group pricing module, the warning goes away and the pricing fields display!

Sorry for the interruption!

11 Aug 2008, 6:41 PM
#67
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

OK, I have an idea that others may be interested in!

I would like to add the ability so when a customer is logged in and viewing their group pricing a text label would appear next to their price.

Ex: Wholesale Price: $19.95

I guess this could be done a couple of ways...

  1. Either change the Group A define text to the name you wish to display next to the price and add that define in the price display code. (I think this might be the easiest way, but would have to edit files)

OR

  1. Create a method of adding the price labels within the group pricing admin module independent of the Group A defines, then add this to the price display code. (More user friendly, no files to edit, but more complex)

Either way, I don't mind doing the work (with help), I just need some suggestions / guidance as to where best to add such a mod and to which files?? I'm marginally familiar with the Zen structure and PHP/MySQL

May be I could also add code to display the regular non-group price along side the group price (including the text labels) as well!

Dr. Byte, what do you think?

Thanks

1 Sep 2008, 9:55 PM
#68
happymom avatar

happymom

New Zenner

Join Date:
May 2006
Posts:
82
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hello,

Someone posted the thread/question below:

*My discount prices with this mod work fine. However, what isn't working is that for anyone assigned to a group (I just have one group assigned right now - Group A), the Specials I've set are not working properly.

The Specials are not products that are affected by group pricing - they are separate products.

For those customers in Group A, the correct price shows up until they go to check out, at which point the price reverts back to the original price, rather than the sale price.*

And I understand that this is how the group pricing was designed to work, but I actually want my Group A/B/ect to receive the sale discount on products for which they are not getting any special Group A/B/etc discount.

For instance:

Product 1:
Regular Price: 10.00
Sale Price: 8.00
Group A price: 5.00
In this case, my Group A customers gets the $5.00 Price. This is OK. No Change required here.

Product 2:
Regular Price: 20.00
Sale Price: 10.00
Group A Price - Does not exist -> revert to regular price In this case, I want my Group A customers to get the $10.00 Sale Price.

What files should I change? or where do I start?

Any help would be greatly appreciated it.

Thanks!

4 Oct 2008, 9:29 AM
#69
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

-- Background --

The owner sells products within the state of Hawaii and most people will pick the items up at her physical address. Some people may have the products shipped within the state. Because of shipping costs, no shipments will happen outside the state.

There will be Retail and Wholesale customers with different prices.

I have configured this module and all seems fine but... (you knew there was a but coming, right?)

So I have Retail (regualr Prices) and a new group called WHOLESALE. Wholesale customers will be manually added to the group and will receive the lower price.

The problem is that Wholesale users pay a lower sales tax than Retail customers. retail tax is 4.1666 percent while Wholesale is .5 percent (point five percent).

Once I set the customer into the Wholesale group, how can I charge him a different sales tax? (By the way, I created 2 different sales taxes already) but how do I apply it here?

8 Oct 2008, 6:17 AM
#70
fuzzybunny avatar

fuzzybunny

New Zenner

Join Date:
Sep 2007
Location:
Melbourne Australia
Posts:
60
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

setup two shipping zones / rates

one zone would be hawaii - retail
the other hawaii - wholesale

each zone would have a different tax rate

just treat it the same as a different state and when the customers are added the correct "zone" needs to be applied,

hope this helps

18 Oct 2008, 3:54 PM
#71
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I tried this and perhaps I did it wrong.

I now have two Hawaii State entries with different taxes. The concept there works, but the customer chooses their state and thus could choose Hawaii Wholesale and pay a different rate. Also, the "Hawaii - Wholesale" shows up on the shipping documents.

I guess I could make it "Hawaii" and "Hawaii." with a period after it, but then customers could still choose it.

Did I get the concept wrong, or is this a problem I need to find a slightly different solution to?

19 Oct 2008, 7:59 AM
#72
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

mshultise:

I tried this and perhaps I did it wrong.

I now have two Hawaii State entries with different taxes. The concept there works, but the customer chooses their state and thus could choose Hawaii Wholesale and pay a different rate. Also, the "Hawaii - Wholesale" shows up on the shipping documents.

I guess I could make it "Hawaii" and "Hawaii." with a period after it, but then customers could still choose it.

Did I get the concept wrong, or is this a problem I need to find a slightly different solution to?

OK, I think I got it working now.

I have my store defaulted to United States.

I went into Localization Countries and added a new country called "USA". Since all customers default to "United States", there is little chance they will change their country (and if so, I'll disable that ability). Only customers from this state will be purchasing products, so I could even turn that off too.

Under USA I created a zone called Hawaii and a Code of HI.

Then I created Zone Defs for Hawaii Local (United States) and Hawaii Wholesale (USA) and set the two tax rates to 4.1666% and .5%.

Then I just put the customer in the Wholesale group for the new prices and I change his country to USA and he picks up the new tax.

This is pretty much what was suggested but I needed to make sure it was more difficult for someone to cheat :-)

Hopefully, someone will change the Group Pricing module to also include a set tax rate for that pricing group. Here we use different prates for wholesale and retail. In Maryland it was whether the item was being used for resale which is somewhat the same idea.

6 Nov 2008, 4:24 AM
#73
happymom avatar

happymom

New Zenner

Join Date:
May 2006
Posts:
82
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

HappyMom:

Hello,

Someone posted the thread/question below:

*My discount prices with this mod work fine. However, what isn't working is that for anyone assigned to a group (I just have one group assigned right now - Group A), the Specials I've set are not working properly.

The Specials are not products that are affected by group pricing - they are separate products.

For those customers in Group A, the correct price shows up until they go to check out, at which point the price reverts back to the original price, rather than the sale price.*

And I understand that this is how the group pricing was designed to work, but I actually want my Group A/B/ect to receive the sale discount on products for which they are not getting any special Group A/B/etc discount.

For instance:

Product 1:
Regular Price: 10.00
Sale Price: 8.00
Group A price: 5.00
In this case, my Group A customers gets the $5.00 Price. This is OK. No Change required here.

Product 2:
Regular Price: 20.00
Sale Price: 10.00
Group A Price - Does not exist -> revert to regular price In this case, I want my Group A customers to get the $10.00 Sale Price.

What files should I change? or where do I start?

Any help would be greatly appreciated it.

Thanks!



Just in case some has a simiilar problem and want their group (A,B,etc) customers to get the sale prices of products that are not marked with a group price:

I made the following changes and they worked for me. There is a still a small glitch with the overal total (the sale price adds OK, but the group A,B,etc price add the original price instead of the group price) The totals get added correctly on the next shopping cart page, so I am not too worry about it.

Zen Cart version: 3.7

The file name is:
catalog/includes/classes/
shopping_cart.php

There is 3 places where you need to come out the
if (!$customers_group) clause.


In line 652:


// if(!$customers_group) {
//

$special_price = zen_get_products_special_price($prid);
if ($special_price and $product->fields['products_priced_by_attribute'] == 0) {
$products_price = $special_price;
} else {
$special_price = 0;
}
// }


in line 676:


// if(!$customers_group) {
if ($product->fields['products_priced_by_attribute'] == '1' and zen_has_product_attributes($product->fields['products_id'], 'false')) {
// reset for priced by attributes
if ($special_price) {
$products_price = $special_price;
} else {
$products_price = $product->fields['products_price'];
}
} else {
// discount qty pricing
if ($product->fields['products_discount_type'] != '0') {
$products_price = zen_get_products_discount_price_qty($product->fields['products_id'], $qty);
}

// }


line 1135


// if(!$customers_group) {
if ($special_price and $products->fields['products_priced_by_attribute'] == 0) {
$products_price = $special_price;
} else {
$special_price = 0;
}
// }

That's it.

-Norma

5 Dec 2008, 6:56 PM
#74
shoniqua avatar

shoniqua

New Zenner

Join Date:
Sep 2008
Posts:
33
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I have this mod installed, all was going great but now I'm not sure whats happened and I can't remember how I got it working.

I have groups A & B that receive 100% off all products except Gift Certs and one club product.
Mod was charging for these 2 products correctly.

Now I put a salemaker 60% in my store excluding these 2 categories - but if I buy either gift or club product at checkout it adds to cart at charged price, but step 2 of 3 shows group discount of 100% applied and item becomes free.

How do I fix this please? I recently added ZenCart free charge card to stop receiving the 'we are not able to take payments from your area' message.
Not sure if that's messed up pricing or my sale itself lol

Thank you

12 Feb 2009, 2:32 AM
#75
ellachan avatar

ellachan

New Zenner

Join Date:
Feb 2009
Posts:
2
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I am using the latest version of the cart V3.8, and installed the laster version of group pricing per item. However, my shop doesn't show the group price even the costomer is belonged to that group. Also, every price show original price no matter on product page, product listing page , checkout, total, etc.

It seem totally not working~ Can anyone else help me tho fix it? as this pricing method is the mod i need the most~

13 May 2009, 12:54 AM
#76
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Does anyone know if we can use The most recent Group Pricing modified for 1.3.8 for my 1.3.7 ZC install?

Thank you

13 May 2009, 6:10 AM
#77
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Well, I installed but my customers.php will not return any customers now. Someone else had this question a few pages back but no one responded to him/her/

If any one knows what I need to do to make customer.php happy again , let me know.

This is the error:
Fatal error: Call to undefined function zen_get_customers_address_book() in /home/myserver/public_html/shop/admin/customers.php on line 1124

1.3.7

16 May 2009, 7:17 AM
#78
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hello, I am trying to find only the changes that need to be made to the files for the Group pricing mod (ZC) Download dated Zen Cart™ Version: v1.3.7
Update added on Feb 20 2007. We are so heavily modded that I have to add all the changes manually. Can anyone help me out and direct me to where I can find them? I cant merge the files we are too heavily modded so I just need to see what changes were made in each file

Thanks a million to anyone who can help.

24 Jun 2009, 5:37 PM
#79
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Quick question: Is this the official thread for the Group Price per Item addon?

Thanks

gabstero

25 Jun 2009, 3:37 PM
#80
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hi Gang!

Just installed Group Price Per Item, all seems well except that in the Admin>Customers>Group Pricing view I have "GROUP_PRICE_PER_ITEM_TEXT" in the % Discount column after I've setup my groups (Group A, Group B, etc.)

Any clue where should I look, what I've missed? The group_price_per_item.phpfile is in the admin\includes\languages\english\extra_definitions folder - so that should be ok...

any help will be greatly appreciated!!

Cheers!
Gabi.