Jump to content
Sign in to follow this  
empo

PC Pro Creator

Recommended Posts

Hello,

 

I just installed this contribution and am getting a parse error after I try and save my changes in the admin --> Build Computer.

 

This is the error:

 

Parse error: syntax error, unexpected ';' in ........\htdocs\build\config.inc.php on line 1

 

 

and I will no longer bring up the Build Computer Interface. I can replace the file with an original from the contribution and I can get back in.

 

On further examination I compared the 2 files.

 

The Original:

 

<?php $cpu=25;$motherboard=24;$memory=16;$cooler=29;$harddisk=22;

$harddisk2=22;$videocard=41;$soundcard=35;$floppy=1;$cddvdrom=23;

$cdrw=42;$modem=1;$ncard=3;$networking=19;$monitor=19;$keyboard=43;

$mouse=9;$speakers=19;$case=19;$power=19;$printer=5;$scanner=21;

$tvcard=19;$vecard=19;$videocam=19;$controllers=19;$dcpuintel=19;

$dcpuamd=26;$dmotherintel=19;$dmotheramd=19;$dmemddr=19;

$dmemddr2=19;$dmemddr3=19;$dmemsdram=19;$template=2;

$config_sef=1;$config_dep=1;$config_file=1;$curcy=USD; ?>

 

 

 

 

And after attempting to save changes:

 

 

<?php $cpu=;$motherboard=;$memory=;$cooler=;$harddisk=;$harddisk2=;$videocard=;

$soundcard=;$floppy=;$cddvdrom=;$cdrw=;$modem=;$ncard=;$networking=;$monitor=;

$keyboard=;$mouse=;$speakers=;$case=;$power=;$printer=;$scanner=;$tvcard=;$vecard=;

$videocam=;$controllers=;$dcpuintel=;$dcpuamd=;$dmotherintel=;$dmotheramd=;$dmemddr=;

$dmemddr2=;$dmemddr3=;$dmemsdram=;$template=;$config_sef=;$config_dep=;

$config_file=1;$curcy=USD; ?>

 

 

Just guessing here, but is this because its not able to access my DB?

 

 

And does anyone have a link to the new verison that costs money? Thanks.

Edited by Mr Jose Cuervo

Share this post


Link to post
Share on other sites

Hi ! :thumbsup:

 

I installed the last version of PC PRO CREATOR. however some questions make me become insane :blink:

 

1 - Display price with correct tax included (both for item price and total order price)

 

 

2 - For a optimal product list, I would like disable the OFFLINE Product (admin part) of the Javascript list (store part).

 

I need Help, please !

Share this post


Link to post
Share on other sites
Hi ! :thumbsup:

 

I installed the last version of PC PRO CREATOR. however some questions make me become insane :blink:

 

1 - Display price with correct tax included (both for item price and total order price)

2 - For a optimal product list, I would like disable the OFFLINE Product (admin part) of the Javascript list (store part).

 

I need Help, please !

 

Hey,

 

1 - This is being fixed up for the next version, so you will have to wait till then. I have no idea when the new version will be. I would have thought it would have been a while ago, but it hasn't come yet, so I guess he has been busy, which is understandable. So hang in there for the next version.

 

2 - What do you mean?

 

Regards,

Chris :)

Share this post


Link to post
Share on other sites

Can someone please make assembly work? I want to be able to give the customers an option between self assembly or assembled by our firm.

Share this post


Link to post
Share on other sites
Can someone please make assembly work? I want to be able to give the customers an option between self assembly or assembled by our firm.

 

 

I think this Project is dead!!

 

i havent seen anything since! FEB..

 

i wish i knew how to write script.. i would of had it done... =)

 

oh well

Share this post


Link to post
Share on other sites

i'v made significant progress with the pc builder admin page, and re-wrote a whole lot of php to be able to add / remove / rename / reorder catagories.

now im a novice to php, so it might not be the prettiest code, but it works :)

 

the problem i have is with the javascript on the customer builder page..

i cant seem to get the values from php into the javascript. :(

 

if i can figure out the javascript, the only thing really left that needs work is the dependence system....

also, with the way i have the admin section done, this could easily be used for any custom products, not only computers :P

 

i never really planned to release my modifications, because i assumed Frank would have alot of them (and maybe more) in his next release...

but he seems to have dissapeared :/

 

i only have OSC setup on a test server right now, but if anyone is intrested to see what i'v done i'll put it on a free webhost somewere..

and if anyone thinks they can help with the javascript, PM me or post here..

if enuff people want to look at the code i'll put it on a free host too.

 

and btw, im really not trying to take over this project! i just feel kinda bad not sharing the progress i'v made, and would also hate to see this great project / contribution die...

Share this post


Link to post
Share on other sites

well ok then :)

 

i didnt keep a list of all my changes, but heres what i remember:

to make the categories dynamic i had to rewrite all the static code.

i tried to keep all changes made to the "save to file" code match the "save to database" code, but i havnt tested the database part yet.

unfourtunatly, all the changes to php in the store part wont work without changes to the javascript...so the php store-side is untested.

i created a new file called pc-cats.php and put it in the build folder, its where the dynamic categories that are created from the admin section get saved.(into an array)

 

you can see the admin section changes and download a zip of the mods from here:

http://pcshop.freehostia.com/

 

feel free to play with the pc builder part of the admin area, just behave :)

and please hit the "reset categories" link up top when your done ;)

 

i think the problem might be because im echo'ing javascript with php, but im not sure..

(line 147 to 159 of /compbuild.php)

$c_java = 0;

include ('./build/pc-cats.php');
$output = sizeof($pccats);
for ($ib = 0; $ib < $output; $ib++) {
$cat = "$pccats[$ib]";

if (${$cat}){?>
print_field('<? echo "$cat";?>',<? echo "$c_java";?>);
<?
$c_java++;
}
}

 

the print_field function is in the javascript file /build/builder2.js ..

Share this post


Link to post
Share on other sites

Hey,

 

This looks great.

 

Just a question - will you be adding support for searching in sub-categories? I know a lot of people have a fixed Category list which they cannot change (mine included).

 

The other guy (who's name escapes me) was going to include this support in his next version, but I PM'd him almost a week ago and he has been flat out and hasn't had any time to work on it (but he still does intend on working on it when he gets the time, but may not be for a while yet).

 

Cheers,

Chris :)

Share this post


Link to post
Share on other sites

im really learning as i go here, and havnt quite figured out how to get data from the sql database into php values yet..

 

lines 410-429 of admin/compbuild.php are where the categories and drop-down menu's are generated, but it uses data from the database table "categories_description"..(line 349-355) ex:

categories_id , language_id , categories_name

1 , 1 , CPU

 

whats needed to sort by parent, is "parent_id" in the database table "catagories", that looks like:

categories_id categories_image parent_id sort_order date_added last_modified

 

theres not already a sql request to that table, but it shouldent be to hard to make one and redo the row output loop a little to add something like -> to categories that have a parent.

 

i'll try to play with that as time permits, im sure getting data from sql is riduculiously easy..hehe

Edited by Dopy99

Share this post


Link to post
Share on other sites

if your referring to the customer side not working, thats the bug i need help with... i thought it was a javascript problem, but now im not so sure.

i apoligize if that wasnt clear in my previous posts (looking back i could have made that a little more clear):(

im still working on it and will post as soon as i figure it out, but i was hoping a few extra pairs of eye's might catch somthing i'v missed ..

if you found a different bug, just let me know and i'll do what i can :)

Share this post


Link to post
Share on other sites

somehow the zip at http://pcshop.freehostia.com/ got corrupted... not sure if it was like that from the start :(

it is fixed now.

also i had $template="1" in the config.inc.php ... it should be "2", because thats the only template.

that completly broke the customer java script because builder1.js dosnt exist...oops :)

that is fixed now, and is in the new zip.

 

now the problem remains of products not showing in the correct categories in the builder script..

on my offline server with a few products, everything appears in the DvDRW category?

if anyone has any ideas, please share! :)

Share this post


Link to post
Share on other sites

Hi there,

 

I have tried downloading the file, but somehow it is still corrupted. I was wondering if someone can email me the good files.

 

Thanks,

StrictlyPC

dbphung@hotmail.com

Share this post


Link to post
Share on other sites

be sure your getting the new zip file, ppc-2006-05-17.zip .

the link to it on the main page works :)

the new zip works, but if you still have a problem let me know.

Share this post


Link to post
Share on other sites

Hello all!

 

I want to use this contrib, but I have some problems with it as shown bellow:

 

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /usr/local/psa/home/vhosts/maycon.ro/httpdocs/includes/column_left.php on line 33

 

 

From what I've seen on some sites posted in this topic this contrib is looking very very well and I'd really like to try it on my site.


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Ratava: i havn't even looked at the tax problem, im more concerned with getting the admin section easier to manage... and a configureable dependence system would be next on my list.. i dont think i could even use it without those options :)

once i get that out of the way i'll look into the tax bug.

 

Lao: The version of this i posted is NOT fully functional right now, i was having problems and posted it to try and get some help..

though it shouldent cause any problems with column_left.php.

the default column_left.php is only 29 lines, so make sure you dont have any lines or spaces after the php closing tag ?>

 

i havnt had time to work on this latly, hope to have some soon :)

Share this post


Link to post
Share on other sites

There are no blank spaces after php closing tag. The reason that my column_left is so big is that I moved the contents from coulmn_right to column_left and removed coulmn_right completely.

 

Any other ideas, please?


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Sure, here it is. I replaced my column_left.php just for testing with the original one from oscommerce kit, but build computer box didn't appear on my site.

 

<?php
/*
 $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
 require(DIR_WS_BOXES . 'consult.php');
 require(DIR_WS_BOXES . 'shopping_cart.php');

 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_categories_box();
 } else {
include(DIR_WS_BOXES . 'categories.php');
include(DIR_WS_BOXES . 'compbuild.php');
 }

 require(DIR_WS_BOXES . 'information.php');

 require(DIR_WS_BOXES . 'whats_new.php');


 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
  $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
  $check = tep_db_fetch_array($check_query);
  if ($check['count'] > 0) {
	include(DIR_WS_BOXES . 'best_sellers.php');
  } else {
	include(DIR_WS_BOXES . 'product_notifications.php');
  }
} else {
  include(DIR_WS_BOXES . 'product_notifications.php');
}
 } else {
include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
include(DIR_WS_BOXES . 'specials.php');
 }

 require(DIR_WS_BOXES . 'reviews.php');

 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_manufacturers_box();
 } else {
include(DIR_WS_BOXES . 'manufacturers.php');
 }


 require(DIR_WS_BOXES . 'search.php');

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
/*include(DIR_WS_BOXES . 'languages.php');*/
include(DIR_WS_BOXES . 'currencies.php');
 }
?>

 

The 33rd line is this:

 

$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");

 

My shop works fine (without Buil Computer option) before pressing the INSTALL button in Pc Creator in Admin, but as soon as I hit INSTALL in Build Computer in Admin the site goes crazy and remains this way even after I press UNINSTALL.


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

everywere there is an &quote; in there should be a "

 

eg:

$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");

 

this may infact be caused by the install box code, as the original left menu had no double quotes so they were not taken into account...

this should fix the install/uninstall box ..

in admin/compbuild.php find both occurences of:

$filetemp = str_replace("&","&", $filetemp);

and ADD below them

$filetemp = str_replace(""","\"", $filetemp);

Edited by Dopy99

Share this post


Link to post
Share on other sites

Well, thanks. It did solve the column_left problem, but Custom PC Creator box doesn't show anywhere. What should I do? :(


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Well, thanks. It did solve the column_left problem, but Custom PC Creator box doesn't show anywhere. What should I do? :(

 

 

Later edit: When I type the path to Pc Creator I get the drop-down menus of the components only when I have Blue Version template activated in Admin.

 

 

How do I make PC Creator box show in left coulmn? :D


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×