Zen Cart Logo
Forums / All Other Contributions/Addons / SOS...Group Pricing + MAP= Broken Store - Please HELP!

SOS...Group Pricing + MAP= Broken Store - Please HELP!

Locked

Views: 774

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
19 Jan 2009, 3:17 AM
#1
g6enterprises avatar

g6enterprises

New Zenner

Join Date:
Nov 2008
Location:
Ohio
Posts:
21
Plugin Contributions:
0

SOS...Group Pricing + MAP= Broken Store - Please HELP!

I'm trying to get MAP pricing and Group Pricing (per item) working together. Now I'm getting the following message when I try to add a new customer, or when I click "add to cart" on an item with an existing customer.

1146 Table 'zc-1.zen_customers' doesn't exist
in:
select gp.group_name from zen_customers cu left join zen_group_pricing gp on cu.customers_group_pricing=gp.group_id where cu.customers_id = 3]

I'm a total Zen/PHP newbie, and I don't know if this is even a syntax/query problem or a data problem, or what file to look in that would be causing the problem. :frusty:

So far I've only broken my test site, but I'm desperate to get the group pricing mod working on my live site (it is critical to my niche market to have the pricing groups, and my advertising will hit the streets this week - I underestimated the difficulty in getting this added to my site.) and I already have MAP installed - and working except for the price display which truncates zero's after the decimal, ie. $5.70 shows as $5.7. (Easy work around would be to price at $5.75 then it displays fine, but I'd still like to get this fixed if possible.)

If someone can help me solve the problems I'll gladly share the modified files with the community - or if someone already has these working properly, could you share the appropriate files?

19 Jan 2009, 2:21 PM
#2
g6enterprises avatar

g6enterprises

New Zenner

Join Date:
Nov 2008
Location:
Ohio
Posts:
21
Plugin Contributions:
0

Re: SOS...Group Pricing + MAP= Broken Store - Please HELP!

BTW - I do realize that I haven't given you much to go on, but if anyone can even tell me where to start looking - what file(s) might be involved - I will gladly post copies of them or whatever additional information might be needed.

I did winmerge the conflicting files, which is probably where the problem comes in, I just am not able to locate the problem, so I don't know which of the files. is the issue.

19 Jan 2009, 2:23 PM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: SOS...Group Pricing + MAP= Broken Store - Please HELP!

Start by looking at your database. Are you using tables with the zen_ prefix? if not, then you need to see if the mod is assuming that you are.

20 Jan 2009, 4:14 AM
#4
g6enterprises avatar

g6enterprises

New Zenner

Join Date:
Nov 2008
Location:
Ohio
Posts:
21
Plugin Contributions:
0

Re: SOS...Group Pricing + MAP= Broken Store - Please HELP!

Thank you kuroi, 1 of 2 problems solved!
It was the zen_ prefix - only I don't think it was exactly the mod's fault. I picked up a revised includes/classes/shopping_cart.php file from the forum here because the one with the Group_Pricing (per item) mod had a bug - I think the user I got the corrected file from probably had the zen_ prefix so it was in his file. At any rate, I removed the zen_ prefixes and it seems to have solved that problem. If I can get my second problem (below) solved I'll try to get a working set of mod files posted for everyone that will include MAP and Group Pricing (per item).

Remaining Problem This has to do with MAP pricing mod. For any products with MAP pricing enabled, zeros after the decimal are truncated in the product display pages. Example "$2.00" displays as "$2" "$2.50" displays as "$2.5" and "$2.95" displays correctly.

Troubleshooting: So far I've discovered that in the includes\functions\functions_prices.php file there is the following code:
if ($is_map_enabled == 1) {
if ($map_price > 0) {
return '<span class="map_pricing">$'.round ($map_price,2).' '.MAP_PRICE_STORE_FRONT_TEXT_WITH_MAP_PRICE_DISPLAYED.'</span>';

It appears this code should round to 2 decimal places, which should be correct. But I can only guess there is something wrong with this piece of code since changing round ($map_price,2) in the above to round ($map_price,4) has no effect, while removing the round() operation completely and leaving it just plain $map_price causes the product page to display 4 digits after the decimal. Can anyone tell me what is wrong with this code?

Thanks