Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PC Pro Creator


empo

Recommended Posts

hello people im new here :) as you can tell by my post count when i try to get to my site all i get is

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/richous05/domains/righttec.co.uk/public_html/includes/classes/shopping_cart.php on line 287
this is what is on line 287
$prid = $products['products_id'];
this is a snippit from line 280 to 290
if (!is_array($this->contents)) return false;

 

$products_array = array();

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

$products_query = tep_db_query("select p.products_id,

if ($products = tep_db_fetch_array($products_query)) {

$prid = $products['products_id'];

$products_price = $products['products_price'];

 

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" .

Link to comment
Share on other sites

  • Replies 652
  • Created
  • Last Reply

Top Posters In This Topic

please replace the following function in build2.php an the decimal problem should be solved I think.

 

function formatnumber(num,num_after_dot){
	if (!num_after_dot) num_after_dot=2;
	if (num<0.05) num=0;
	var snum = (String) (num);
	var is_dot_ok=snum.indexOf('.')
	if (is_dot_ok==-1){
	is_dot_ok=snum.indexOf(',')
	}
	if (!(is_dot_ok==-1)){
			snum = snum.substr(0,is_dot_ok+num_after_dot+1);
			if ((snum.length-is_dot_ok)==2){
					snum=snum+"0"
			}else{ 
				if ((snum.length-is_dot_ok)==1){
					snum=snum+"00"
				}
			}
	}
	return snum;
}

please tell me if it works now

 

Thanks for the try but unfortunately it's not working :(

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

Did you guys forgot this :-"

 

In my case, the problem i have is that the configuration about the dots and commas of my shop is different from yours.

 

Actually, I tried to solve this and i think that the code that meisterbartsch gave ou is the correct. Or at least to me, when clicking on a product, the subtotal of the product appears with a comma "," and not with a dot as it does in my page when it works.

 

Just one more thing, you said that you hired a server, but i think you didn't give us the URL, can you put it? It would be helpful!

Link to comment
Share on other sites

Hi,

 

Unfortunately the cod of meisterbartsch is not work for me too.

 

DCP, is realy work for you? You give as your store adress please?

 

My store is http://www.caltekshop.lx.ro

 

My PPC page is http://www.pchousemadrid.com/compbuild.php, and but, as I told here before, i have a different configuration and that is why it works to me.

 

Actually, i have seen your webpage and it works ok :blink: the only thing that doesn't work is the quantities, but the code that meisterbartsch gave here is ok for me...

Link to comment
Share on other sites

Good Day,

DCP, if you don`t mind, tell me please what kind of contribution have you used to display the category box, because i like it very much.

 

 

Thanks

 

The contribution is dynamenu. You can download it here

Link to comment
Share on other sites

The contribution is dynamenu. You can download it here

 

Hi,

 

Just one word of caution with dynamic category menus like dynamenu. Search engines often do not like them and it often stops them from being able to go through your whole site, as they often cannot see the dynamic menu.

 

Regards,

Chris

Link to comment
Share on other sites

My PPC page is http://www.pchousemadrid.com/compbuild.php, and but, as I told here before, i have a different configuration and that is why it works to me.

 

Actually, i have seen your webpage and it works ok :blink: the only thing that doesn't work is the quantities, but the code that meisterbartsch gave here is ok for me...

 

Don't be so happy DCP Becouse it's not working for you either :huh:

None of the products with price over 1000 is working in your PPC

 

Another bug in your PPC, many products in your PPC list can't be choosen

Edited by shaytaan

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

Hi,

 

Just one word of caution with dynamic category menus like dynamenu. Search engines often do not like them and it often stops them from being able to go through your whole site, as they often cannot see the dynamic menu.

 

Regards,

Chris

 

You are right, but i think it is better this way, at least for me. And, if i am not wrong, a sitemap can make it also easier for the search engines, so there shouldn't be any problems around this...

 

Don't be so happy DCP Becouse it's not working for you either :huh:

None of the products with price over 1000 is working in your PPC

 

Another bug in your PPC, many products in your PPC list can't be choosen

 

omg you are right :blink: i din't notice anything about the prices over 1.000 because they are only a few. I'll work on this and the products that can't be selected this weekend to see if its possible to fix it :-"

 

Thanks for the advice!

Link to comment
Share on other sites

About the problem with the prices above 1.000, i think the problem is the same that many have here, with the commas and dots.

 

I have tried almost anything, but although the config of my shop is with dots for the thousands and commas for the decimal places, the prices in the PPC are like this: 12.34, and not 12,34. I think this is the main problem.

 

So, about the code, i think the problem is with the parsefloat function, which as i have read, converts an string to a number. The problem is that if this number has decimals, it always puts it with a dot (.)

 

So i see 3 possible solutions:

1. Delete this function and use a sustitutive one. The best way would be using what is explained here , but i have tried it and no way, surely because i have no idea of JS.

 

2. use a function to convert the dot of the parsefloat function to a comma, where needed. I don't really know if this is possible, and i have no idea how i could do this.

 

3. Use PHP for converting this numbers from dot decimals to comma, but when i tried to include php code into the function in JS, it gave me a lot of errors.

 

Anyway, i hope this can help :(

Link to comment
Share on other sites

About the problem with the prices above 1.000, i think the problem is the same that many have here, with the commas and dots.

 

I have tried almost anything, but although the config of my shop is with dots for the thousands and commas for the decimal places, the prices in the PPC are like this: 12.34, and not 12,34. I think this is the main problem.

 

So, about the code, i think the problem is with the parsefloat function, which as i have read, converts an string to a number. The problem is that if this number has decimals, it always puts it with a dot (.)

 

So i see 3 possible solutions:

1. Delete this function and use a sustitutive one. The best way would be using what is explained here , but i have tried it and no way, surely because i have no idea of JS.

 

2. use a function to convert the dot of the parsefloat function to a comma, where needed. I don't really know if this is possible, and i have no idea how i could do this.

 

3. Use PHP for converting this numbers from dot decimals to comma, but when i tried to include php code into the function in JS, it gave me a lot of errors.

 

Anyway, i hope this can help :(

 

With the problem with the decimal separator, don't forget that most of the world use a decimal point, and may sometimes use the comma for the 1000's separator.

 

Isn't there some global function to put the dots and comma's in the correct place according to what is set up in OsCommerce?

 

Regards,

Chris

Link to comment
Share on other sites

With the problem with the decimal separator, don't forget that most of the world use a decimal point, and may sometimes use the comma for the 1000's separator.

 

Isn't there some global function to put the dots and comma's in the correct place according to what is set up in OsCommerce?

 

Regards,

Chris

 

The first possible solution i gave is using a couple of functions in JS which detects automatically the type of commas and dots. The "problem" is that i think that it detects the configuration from the client computer, and not from the OSC program, but we would have to test it to be sure!

 

Anyway, this is a bad month for fixing all os these, we are all a bit busy, and in my case i'm leaving on holidays in a couple of days. I hope in september all the developers can start to work more intensively on this project and get results real soon!

 

Best regards!

Link to comment
Share on other sites

With the problem with the decimal separator, don't forget that most of the world use a decimal point, and may sometimes use the comma for the 1000's separator.

 

Isn't there some global function to put the dots and comma's in the correct place according to what is set up in OsCommerce?

 

Regards,

Chris

 

Hi guy's. We have a online shop in Aus. www.tocs.com.au. we have been waiting for Frank or whoever to get this proggy up and running properly. Long story short we upgraded to the latest version and was very impressed with the advances you guys have made. .. Well Done.

 

The first thing I noticed was this 1000.00 thing still existed. I am no programmer and don't claim to know to much about it. But, if these dots are causing so much trouble, why not leave them out?

eg: instead of 1.000.00 or 1,000.00 just have 1000.00 !

I am sure the customer is not going to give a damn either way.

Just a thought.

 

Once again .. Excellent work and keep it up as I cant wait to use this great contrib

 

Ross.

Link to comment
Share on other sites

The first possible solution i gave is using a couple of functions in JS which detects automatically the type of commas and dots. The "problem" is that i think that it detects the configuration from the client computer, and not from the OSC program, but we would have to test it to be sure!

Best regards!

 

I have found the source of the problem.

 

When product_list.php returns the products to builder2.php it uses the $currencies->display_price function to format the price with the appropriate tax. This is the correct way of doing this.

 

However that function also pads the prices with the . or , as the thousands seperator. The problem occours when the parsefloat function is use in cal_sum and calc_subtotal functions. parsefloat converts the string in to a float number moving from left to right until it reaches a non mumber.

 

I have proved this by removing the use of $currencies->display_price and only returning what was actually in the database. This fixed the problem but it did not look good and did not calculate the price with tax.

 

To fix this problem we have to strip any thousand seperators from the price before the sum is calculated.

I have tried doing this with a regular expression /^\$(.*)\.(\d{2})$/.exec(.... but I can not get this to work. My skils in javascript and regular expressions is not what it used to be :(

 

Is there anyone out there that might be able to accomplish this ?

Link to comment
Share on other sites

Hallo,

 

habe mal kurz eine Frage...

 

Kann man diese tolle Extension auch folgende ma?e einsetzen.

 

Produkt (hauptprodukt)

Auf Produktseite wird dan diese Extension geladen.

Wichtig: Die m?gliche Produkte sind abh?ngig vom Hauptprodukt.

 

Hauptprodukt 1 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 1a

-- Produkt 1b

 

-- Produkt 5a

-- Produkt 5b

 

 

Hauptprodukt 2 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 2a

-- Produkt 2b

 

-- Produkt 4a

-- Produkt 4b

-- Produkt 4c

 

-- Produkt 7a

-- Produkt 7b

 

Produkt 1 & 5 erscheinen also nicht beim Hauptprodukt 2 in der Auswahlliste, und 2, 4 & 7 erscheinen nicht bei Hauptprodukt 1 in der Auswahlliste...

 

W?re echt klasse wenn ihr da vielleicht weiterhelfen k?nnt!

 

vielen Dank

Gruss

Kasper

Link to comment
Share on other sites

Hallo,

 

habe mal kurz eine Frage...

 

Kann man diese tolle Extension auch folgende ma?e einsetzen.

 

Produkt (hauptprodukt)

Auf Produktseite wird dan diese Extension geladen.

Wichtig: Die m?gliche Produkte sind abh?ngig vom Hauptprodukt.

 

Hauptprodukt 1 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 1a

-- Produkt 1b

 

-- Produkt 5a

-- Produkt 5b

Hauptprodukt 2 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 2a

-- Produkt 2b

 

-- Produkt 4a

-- Produkt 4b

-- Produkt 4c

 

-- Produkt 7a

-- Produkt 7b

 

Produkt 1 & 5 erscheinen also nicht beim Hauptprodukt 2 in der Auswahlliste, und 2, 4 & 7 erscheinen nicht bei Hauptprodukt 1 in der Auswahlliste...

 

W?re echt klasse wenn ihr da vielleicht weiterhelfen k?nnt!

 

vielen Dank

Gruss

Kasper

 

Hello,

 

ohh men i?m sorry... wrote everything in german... sorry...

 

well, i?m just wondering if i can use this extension for the following thing:

 

I have a Product (some kind of Masterproduct)

On the product-info page this extension will load.

 

The products wich are loaden in the selectbox have to depend on the "master" product.

 

So wenn i have let?s say:

Main product 1 - product_info.php

- PC Pro Creater selectbox will show following options:

-- Product 1a

-- Product 1b

 

-- Product 5a

-- Product 5b

 

 

Main product 2 - product_info.php

- PC Pro Creater selectbox will show following options:

-- Product 2a

-- Product 2b

 

-- Product 4a

-- Product 4b

-- Product 4c

 

-- Product 7a

-- Product 7b

 

Product 1 & 5 are shown in the selectbox for Main product 1 but not for Main product 2.

Product 2, 4 & 7 are shown in the selectbox for Main product 2 and not ffor Main product 1

 

Would be verry nice if someone can help me out.

 

thanks!

gracias

greetzz

Kasper

Link to comment
Share on other sites

Hallo,

 

habe mal kurz eine Frage...

 

Kann man diese tolle Extension auch folgende ma?e einsetzen.

 

Produkt (hauptprodukt)

Auf Produktseite wird dan diese Extension geladen.

Wichtig: Die m?gliche Produkte sind abh?ngig vom Hauptprodukt.

 

Hauptprodukt 1 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 1a

-- Produkt 1b

 

-- Produkt 5a

-- Produkt 5b

Hauptprodukt 2 - product_info.php

- PC Pro Creater Produkten:

-- Produkt 2a

-- Produkt 2b

 

-- Produkt 4a

-- Produkt 4b

-- Produkt 4c

 

-- Produkt 7a

-- Produkt 7b

 

Produkt 1 & 5 erscheinen also nicht beim Hauptprodukt 2 in der Auswahlliste, und 2, 4 & 7 erscheinen nicht bei Hauptprodukt 1 in der Auswahlliste...

 

W?re echt klasse wenn ihr da vielleicht weiterhelfen k?nnt!

 

vielen Dank

Gruss

Kasper

Das ist auf jeden Fall eine gute Idee, aber momentan sind noch so viele Baustellen, dass ich vorerst nicht dazu kommen werde ein solches feature zu implementieren... ertsmal muss die voll Funktionalit?t bei den Abh?ngigkeiten wieder hergestellt werden...

 

Gru? Patrick

 

english:

Thats a good idea anyway but theres a lot of work to be done in the next time, so i would not be able to implement such a feature in the near future... first of all we I have to bring back the full functionality according to dependencies..

 

greetz Patrick

Link to comment
Share on other sites

I HAVE GOT THE decimal PROBLEM

 

Had a lot of work with it... I had to recode parts of:

  1. compbuild.php
  2. prduct_list.php
  3. builder.php

so please go to the contrib and get v2.3.2 IT WORKS

 

Hi meisterbartsch !

 

Thanks again for your work !

 

I have just a little problem. In admin (Global tab) when i choose a template (Default or Blue Version) the program complains: "Templates does not exist". And the result in catalog is bad ...

 

Any advice ?

 

Thanks a lot

Guillaume

Link to comment
Share on other sites

I HAVE GOT THE decimal PROBLEM

 

Had a lot of work with it... I had to recode parts of:

  1. compbuild.php
  2. prduct_list.php
  3. builder.php

so please go to the contrib and get v2.3.2 IT WORKS

 

I was very close to finishing a fix that did the very same thing. Thanks anyway.

 

One of the biggest things that needs to be done now is support for more than 2 deep categories. Having only 2 deep makes the site hard to use for normal users.

 

Also there seems to be a problem with the catgory selection box in admin not displaying the categories and sub categories correctly. It does not order the sub categories under the correct category.

 

Thanks

Brent

Link to comment
Share on other sites

I was very close to finishing a fix that did the very same thing. Thanks anyway.

 

Then post it here! Maybe yours is better :D

 

 

 

 

Thanks ALOT meisterbartsch :thumbsup: :thumbsup: :thumbsup: You did it again

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...