Jump to content
TENCENTS

Custom Product Builder

Recommended Posts

Time out error

 

Fatal error: Maximum execution time of 30 seconds exceeded in /admin/builder_options.php on line 767

 

clicked on Dependencies

 

Warning: Division by zero in /admin/includes/classes/split_page_results.php on line 33

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0,' at line 1

 

select p.products_id, p.products_status, p.products_model, pd.products_name, pc.categories_id, c.parent_id from products p, products_description pd, products_to_categories pc, categories c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = pc.products_id and c.categories_id = pc.categories_id and (pc.categories_id = '8') order by pc.categories_id, pd.products_name limit -0,

 

[TEP STOP]

Share this post


Link to post
Share on other sites
Time out error

 

Fatal error: Maximum execution time of 30 seconds exceeded in /admin/builder_options.php on line 767

 

fixed:

while (false!== ($file = readdir($handle))) {
 if ($file!= "." && $file!= ".." &&!is_dir($file)) {
   $namearr = split('\.',$file);
   if (($namearr[count($namearr)-1] == 'gif') || ($namearr[count($namearr)-1] == 'jpg') || ($namearr[count($namearr)-1] == 'png')) {
     $the_files_array[] = array( 'text' => $file, 'id' => $file);
natsort($the_files_array);
   }
 }
}

with

while (false!== ($file = readdir($handle))) {
 if ($file!= "." && $file!= ".." &&!is_dir($file)) {
   $namearr = split('\.',$file);
   if (($namearr[count($namearr)-1] == 'gif') || ($namearr[count($namearr)-1] == 'jpg') || ($namearr[count($namearr)-1] == 'png')) {
     $the_files_array[] = array( 'text' => $file, 'id' => $file);
 }
}
}
natsort($the_files_array);

Edited by bjfreeman

Share this post


Link to post
Share on other sites

Hello,

 

I had installed PC Builder, and checked all changes some times. Because I had some problems with the product-list, I deinstalled it and built in the Custom Product Builder. But with this I have the same problem with it:

 

At the Java-list I have the following texts in front:

 

[inkl 7% MwSt zzgl. Versandkosten] ','953','0');" onmouseover="this.style.backgroundColor='#86A5D2';" onmouseout="this.style.backgroundColor='';">

 

This line is shown for each product in the list.

The product listing is shown after this lines, but I cannot selected it from the list.

 

What can I do, or where else can be my mistake.

I have some other contributions insalled. E.g. SPPC.

 

As I use this contribution for an other issue than PC-Building, I have one additional question.

Is it possible to have a minimum qty to order and a MUST to fill in all fields include assembling?

 

Best regards and thanks in advance

 

tilli11

Share this post


Link to post
Share on other sites

uups, sorry but how can I change this? I am quite new in this forum.

 

you posted under my messages, Hopefully mike will see you message and answer.

Share this post


Link to post
Share on other sites
uups, sorry but how can I change this? I am quite new in this forum.

I have had the same problem.

No need to to more, I am sure he will find it now.

Share this post


Link to post
Share on other sites

I just figured out, that this problem has something to do with tax_info. If I disable tax_info in configuration, it works.

Probably it is a problem with the links in Java.

But I cannot find out, where I have to do the changes, so that at the list only products_price without tax_info are showing.

 

tilli11

 

 

I have had the same problem.

No need to to more, I am sure he will find it now.

Share this post


Link to post
Share on other sites
clicked on Dependencies

 

Warning: Division by zero in /admin/includes/classes/split_page_results.php on line 33

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0,' at line 1

 

select p.products_id, p.products_status, p.products_model, pd.products_name, pc.categories_id, c.parent_id from products p, products_description pd, products_to_categories pc, categories c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = pc.products_id and c.categories_id = pc.categories_id and (pc.categories_id = '8') order by pc.categories_id, pd.products_name limit -0,

 

[TEP STOP]

 

ok found the line of code

line 67 $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

that comes out as

limit -0,

should not be -0

and

$this->number_of_rows_per_page

does not have a value so we have a comma hanging out in space.

any idea why?

Share this post


Link to post
Share on other sites

WOW.. seems like this is coming a LONG way!

 

One thing that i would REALLY like to see, for my application of building calenders..

 

Basically, we do separate photo shoots for each person, so this custom product builder will need to have different products for each customer. So say my customer that we did a puppy photo shoot came and wanted a calender, i would LIKE for her to be able to choose her "gallery" (which is a category) from a drop down at the begining, and THEN that would populate all of the option (the months of the year) with all of the products placed in her "gallery" (or category)

 

This way, the customer will basically be populating the builder themselves with their own products BEFORE even starting the build.

 

Obviously this would not work for computers, but would be AWESOME for people who do things like calenders, photo books, and other customized items


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
WOW.. seems like this is coming a LONG way!

 

One thing that i would REALLY like to see, for my application of building calenders..

 

Basically, we do separate photo shoots for each person, so this custom product builder will need to have different products for each customer. So say my customer that we did a puppy photo shoot came and wanted a calender, i would LIKE for her to be able to choose her "gallery" (which is a category) from a drop down at the beginning, and THEN that would populate all of the option (the months of the year) with all of the products placed in her "gallery" (or category)

 

This way, the customer will basically be populating the builder themselves with their own products BEFORE even starting the build.

 

Obviously this would not work for computers, but would be AWESOME for people who do things like calenders, photo books, and other customized items

From a design point of view a table that allows selection Services(like inscriptions) or calendars. would allow for a and unending expansion for the builders.

in this scenario an PHP file name, the name of the service, and service friendly name would be entered.

you could then select, in the builder, the service, like inscription

Share this post


Link to post
Share on other sites

i'm sorry Bjfreeman, you completely have me lost there.. Are you saying that doing something like i suggested, but making it an addon page where the person who is installing the contribution can just install the type of service that they want..


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
i'm sorry Bjfreeman, you completely have me lost there.. Are you saying that doing something like i suggested, but making it an addon page where the person who is installing the contribution can just install the type of service that they want..

That is a good enough description.

this way others can write the services that would used by the builder for the type of buider they want.

the PHP file would have the init, add, delete, update, retrieve methods.

Just have to add the hook into the builder code to read the table.

this leave the basic builder code unchanged.

Then the person using the website can add which ever of the services want to offer.

 

The enterprise software I work with operates this way.

Thought could bring it to here.

Share this post


Link to post
Share on other sites

I think this might fix the 'return to index page' issue.... I'm not sure but I'm hoping.

 

I tested it by going directly to the builder (builder_main.php) making sure there was no osCsid. It worked fine for me in IE, FF and Opera.

 

So definitely try this; Edit /catalog/includes/modules/builder_main.php

 

## Find: (line 285)

 

var urltemp="<?php echo FILENAME_BUILDER;?>?action=add_products";

form.product.value="";

 

## Replace with:

 

var urltemp="<?php echo tep_href_link(FILENAME_BUILDER, 'action=add_products');?>";

form.product.value="";

 

## Find: (line 314)

 

urltemp+="<?php echo '&osCsid=' . $_GET['osCsid'];?>";

form.action=urltemp;

 

## Replace with:

 

form.action=urltemp;

 

#### Done!


Never underestimate the power of stupid people, especially in groups.

Share this post


Link to post
Share on other sites
Hello,

I had installed PC Builder, and checked all changes some times. Because I had some problems with the product-list, I deinstalled it and built in the Custom Product Builder. But with this I have the same problem with it:

In admin, builder options, look under the heading Popup Components List and change Display Short description to NO. Now check the builder again to see if you get the same problem - if not then there might be some strange characters in your product description. You can try adjusting the length of the short description, or try to identify which character it is (eg. apostrophes, etc..) and then let me know.

 

It's not SPPC - I have that too. Although the builder doesn't use the SPPC pricing it doesn't fiddle with them either.

 

Is it possible to have a minimum qty to order and a MUST to fill in all fields include assembling?

These options will be made available as soon as the most critical problems have been fixed; ie. index redirect, pricing, and image thumbnails.


Never underestimate the power of stupid people, especially in groups.

Share this post


Link to post
Share on other sites
I just figured out, that this problem has something to do with tax_info. If I disable tax_info in configuration, it works.

Probably it is a problem with the links in Java.

But I cannot find out, where I have to do the changes, so that at the list only products_price without tax_info are showing.

Okay, I should've read right to the end of the forum before answering any.

 

You can disable the component tax in the builder options, 5th one from the top, change that to NO.

 

This is part of the 'pricing issue' I mentioned earlier - I'm working on that at the moment.


Never underestimate the power of stupid people, especially in groups.

Share this post


Link to post
Share on other sites
I think this might fix the 'return to index page' issue.... I'm not sure but I'm hoping.

 

I tested it by going directly to the builder (builder_main.php) making sure there was no osCsid. It worked fine for me in IE, FF and Opera.

 

So definitely try this; Edit /catalog/includes/modules/builder_main.php

 

## Find: (line 285)

 

var urltemp="<?php echo FILENAME_BUILDER;?>?action=add_products";

form.product.value="";

 

## Replace with:

 

var urltemp="<?php echo tep_href_link(FILENAME_BUILDER, 'action=add_products');?>";

form.product.value="";

 

## Find: (line 314)

 

urltemp+="<?php echo '&osCsid=' . $_GET['osCsid'];?>";

form.action=urltemp;

 

## Replace with:

 

form.action=urltemp;

 

#### Done!

 

That worked a treat! :) Spot on!

Cheers

 

Mat

Share this post


Link to post
Share on other sites

Hi,

 

I tried this, but without success.

The problem is not the tax amount, but the additional text wich is coming out with contribution "tax_info".

We have some legal issuses here in Germany, so I have to descripe if price is with or without tax and with or without shipping.

At my shop it shows e.g. 10.00 EUR incl. MwSt zzg. Versandkosten.

And the word "Versandkosten" is a link to the shipping.php. So I think it is a problem with a html link in the java-script.

Isn't there a possibility to replace simply the text from the "tax_info" with nothing?

 

Best regards

 

tilli11

 

Okay, I should've read right to the end of the forum before answering any.

 

You can disable the component tax in the builder options, 5th one from the top, change that to NO.

 

This is part of the 'pricing issue' I mentioned earlier - I'm working on that at the moment.

Share this post


Link to post
Share on other sites

Hey Mike, and All!

 

Wondering if anyone else does not get the correct weight when in single mode, and more than one of an individual component is added in builder_main.php.

 

I'm just getting the weight for one, no matter the quqntity added in builder_main.php, when I reach the checkout_shipping.php file.

 

Thanks in advance for any input!

 

Regards,

 

JF

Share this post


Link to post
Share on other sites
I think this might fix the 'return to index page' issue.... I'm not sure but I'm hoping.

It IS fixed !

 

Many thanks !!

Share this post


Link to post
Share on other sites

Before i was about to test this contribution i had in my mind to ask here how does this contribution handle attributes. Well i tested the contribution out and everything works great with the v1.0.1 but the error i am getting when i click on "Build Product" is the following:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values (NULL, '32', '10', '18', '0', '+')

 

[TEP STOP]

 

I am using the latest xampp (mysql5, apache, etc.). This doen't only occur for items with attribtes but also for anything you add to build.

Share this post


Link to post
Share on other sites
1136 - Column count doesn't match value count at row 1

insert into products_attributes values (NULL, '32', '10', '18', '0', '+')

Hi,

 

"If you have any changes to your attributes (i.e. attribute weight) you will have to alter the includes/modules/builder_add_attribute.php file to reflect your changes."

 

Regards,

 

JF

Share this post


Link to post
Share on other sites
Hi,

 

"If you have any changes to your attributes (i.e. attribute weight) you will have to alter the includes/modules/builder_add_attribute.php file to reflect your changes."

 

Regards,

 

JF

 

Thank you for this insight. I installed Seperate Pricing Per Customer and that changes the query so i copied it same and it works.

 

Now the question i have is if a product has attributes how can you chooses what attribute of the product you want to add to custom build?

Share this post


Link to post
Share on other sites

Anyone else having a problem with Adding to Cart?

 

I have built the the custom items and works as one product but when i try to Add to Cart it basically doesn't add to the cart. Anyone have a solution for this?

Share this post


Link to post
Share on other sites
Anyone else having a problem with Adding to Cart?

 

I have built the the custom items and works as one product but when i try to Add to Cart it basically doesn't add to the cart. Anyone have a solution for this?

 

I found the problem as to why its not adding to the cart and was hoping someone could help me with. I have tested everything and found the exact line that is making the problem. The problem is with another contribution i installed to put a pull down quantity box in product info (http://addons.oscommerce.com/info/5553). The code with the problem is in /catalog/includes/application_top.php :

 

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$HTTP_POST_VARS['quantity'], $HTTP_POST_VARS['id']);

 

The code that needs fixing is in /catalog/builder_main.php :

 

$cart->add_cart($products_count[$i], $cart->get_quantity(tep_get_uprid($products_count[$i], $_POST['id']))+$products_qty[$i], $_POST['id']);

 

Hope this information can help someone to help me.

 

Thanks

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

×