Forums / General Questions / Urgent help - prices are not displayed

Urgent help - prices are not displayed

Locked

Views: 4,044

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
4 Feb 2010, 4:07 PM
#1
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Urgent help - prices are not displayed

I use a test environment where clone my client's shop ( 1.3.8a ) . A simple procedure that works till yesterday when I reinstalled the test environment having PHP.5.3 .
I applied the patch for php 5.3 and I have one problem : The prices of products are not displayed on main page or other pages .

thx

4 Feb 2010, 4:12 PM
#2
natty avatar

natty

New Zenner

Join Date:
Dec 2008
Posts:
65
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

Hi,

This might help you out http://www.zen-cart.com/forum/showthread.php?t=140960

Regards
Natty

Edit: - Sorry I just noticed that you patched. My bad. Sorry I can't be of assistance.

4 Feb 2010, 4:47 PM
#3
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

Check the setting for admin>configuration>my store>store status

What is your Store Status
0= Normal Store
1= Showcase no prices
2= Showcase with prices

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

4 Feb 2010, 9:50 PM
#4
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

I've just checked : Status 0= Normal Store

What should I do .. please , some hints :no:

6 Feb 2010, 2:03 PM
#5
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

After some debug I discovered this errors on log

[06-Feb-2010 14:42:36] PHP Warning: round() expects parameter 2 to be long, string given in /balblabla/includes/functions/functions_general.php on line 176
[06-Feb-2010 14:42:36] PHP Warning: round() expects parameter 2 to be long, string given in /blabla/includes/functions/functions_general.php on line 176
[06-Feb-2010 14:42:36] PHP Warning: number_format() expects parameter 2 to be long, string given in /blabla/includes/classes/currencies.php on line 53

this is line 53 :

$format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(zen_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];  

and this is line 176

$number = round($number, $precision);

I put all my hopes on you guys :bigups:

6 Feb 2010, 4:09 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Urgent help - prices are not displayed

All those errors are pointing to the likelihood that you have custom code that's sending bad pricing data to the pricing calculation and currency formatting functions.
So, either you have bad data in your database (could be caused by a bad product-import addon) or you have an addon that's not doing things properly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Feb 2010, 7:08 PM
#7
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

I checked the prices in the database it seems ok .
Where else should I start to look for ?

thx

6 Feb 2010, 10:40 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Urgent help - prices are not displayed

I don't know exactly. A brand new clean install doesn't exhibit the problem you're describing, so I guess it's best to identify everything that's different between your site and a brand new clean uncustomized site.
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Feb 2010, 11:26 PM
#9
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

After some hours of deep inside debug I think have somethig :

function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
}

the result of the function zen_add_tax($products_price, $products_tax) is null . Where this function is defined ?

7 Feb 2010, 4:54 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: Urgent help - prices are not displayed

zen_add_tax operates on the price and tax parameters you pass to it. What information are you passing?

Also, what currencies do you have defined? What have you set for decimal places on each of those currencies? and why?
Is this problem isolated to just one currency? Which one? What's unique about that one compared to the others?

You've not answered the question about what addons you have installed etc.

Additionally, have you checked to be sure that ALL of your files transferred (FTP) properly without errors and that all of them are complete, and not partially damaged due to a communications timeout during transfer?
And are you sure that all the database content was properly exported and then imported without errors on either end?
Any of those things could result in corruption of the data being passed back and forth, and thus producing the obscure error you are reporting.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Feb 2010, 8:23 PM
#11
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

Today's tests :

I installed a virtual machine ( mysql 5.1.42 and php 5.2.12 ) and then I cloned my live environment on this . Working like a charm !. I used the same ftp files so can't talk about corruption . My live enviroment configuration is mysql 4.1.22 and php 5.2.8 .

Now, on my php 5.3.1 and mysql 5.1.42 machine I still have serious problems : No prices displayed out ( default zencart template also , give me same issue ) , strange characters on some pages ( last())?> ) ...

Well the main difference between 3 environments is php . The wierd think is that when I did a fresh installed zencart on php 5.3.1 sistem everythink was ok ( after 5.3 patch to avoid the blank page ) , then I import the live sistem database and same problem gain .

I hope the provider will never upgrade to php 5.3 :cry:

Ps : I have many modules installed , and maybe one of this is not compatible with php 5.3

7 Feb 2010, 11:37 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Urgent help - prices are not displayed

solo_400:

Ps : I have many modules installed , and maybe one of this is not compatible with php 5.3
Must be that, since I can't replicate the problems you describe on a clean install.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Feb 2010, 2:08 PM
#13
satterstrom avatar

satterstrom

New Zenner

Join Date:
May 2009
Location:
Sweden
Posts:
2
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

I just noticed I was having the exact same problem on my live 3.8 site after applying the php 5.3 patch. No prices displayd at all.

I use 4 currencies, and noticed in the Admin -> Localization -> Currencies ...that my base currency was somehow missing the demarcations for Decimal Point: Thousands Point: and Decimal Places:

So I re-enterd these with "." "," and "2" and voila, the prices where displayed again and everything seems to be working properly. :yes:

Seems almost to easy, but you never know. Sometimes it's hard to see what's right in front of your nose.

12 Mar 2011, 12:19 AM
#14
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

satterstrom:

I just noticed I was having the exact same problem on my live 3.8 site after applying the php 5.3 patch. No prices displayd at all.

I use 4 currencies, and noticed in the Admin -> Localization -> Currencies ...that my base currency was somehow missing the demarcations for Decimal Point: Thousands Point: and Decimal Places:

So I re-enterd these with "." "," and "2" and voila, the prices where displayed again and everything seems to be working properly. :yes:

Seems almost to easy, but you never know. Sometimes it's hard to see what's right in front of your nose.

It works ! thank you so much

13 Aug 2011, 6:47 AM
#15
karmicdat4mywork avatar

karmicdat4mywork

New Zenner

Join Date:
Apr 2009
Posts:
13
Plugin Contributions:
0

Re: Urgent help - prices are not displayed

I was having the same problem on a site that's been up for over 2 years, and thought it was my web host. It had happened the other day and I was able to rectify it by importing the database I had backed up the day before. Doing so did not help today, though. And, after trying too many things to mention, my web host directed me here:

https://www.zen-cart.com/tutorials/index.php?article=96

For some reason, my currencies were messed up. As soon as I updated them, my problem was solved. Unfortunately, my keyword searches weren't exact enough to find it on my own.

I'm blaming it all on Mercury retrograde, as this is when the problem began...lol :frusty: