Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Custom Computer Creator v9 Support


538 replies to this topic

#481 mribeiro

  • Community Member
  • 7 posts
  • Real Name:MRibeiro

Posted 18 April 2008, 15:51

View Posticaneat2, on Mar 21 2008, 05:30 PM, said:

Thanks alot mate , i will try and mod this changes you wrote and play with it a little.
Thanks alot man , i don't need the stuff do be writing in my DB it's not a problem.

Thanks alot man.

Hi I'm tring to do the same thing that is to put a text box for quantity in front of the drop down list for how do you do it, I've revised the code and I can't find the solution.
Can you help me in this matter.

Thanks in advance

Edited by mribeiro, 18 April 2008, 15:52.


#482 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 20 April 2008, 14:42

View Postmribeiro, on Apr 18 2008, 04:51 PM, said:

Hi I'm tring to do the same thing that is to put a text box for quantity in front of the drop down list for how do you do it, I've revised the code and I can't find the solution.
Can you help me in this matter.

Thanks in advance

Hi Mribeiro,

As you're probably aware, I have suggested how to achieve this goal in other posts. The answers and suggestions that I posted assumed a level of php coding that may be higher than your level. If you need a little help I'll do what I can. so perhaps you can elaborate on which bits elude you.

Carbon

PS: Just out of curiosity, how many of you want the "radio buttons instead of drop down menu <select>" ?

#483 mribeiro

  • Community Member
  • 7 posts
  • Real Name:MRibeiro

Posted 23 April 2008, 09:20

View PostCarbon, on Apr 20 2008, 03:42 PM, said:

Hi Mribeiro,

As you're probably aware, I have suggested how to achieve this goal in other posts. The answers and suggestions that I posted assumed a level of php coding that may be higher than your level. If you need a little help I'll do what I can. so perhaps you can elaborate on which bits elude you.

Carbon

PS: Just out of curiosity, how many of you want the "radio buttons instead of drop down menu <select>" ?

Hi Carbon
My problem with the quantity box is, where hi should put the code, inside the get parts function in custom_computer.php or in the build.php near the get_parts_fucntion?
And what function should be fired after a change is made in the quantity box?
Another thing is passing this information along to the next files (custom_chekout.php and so on).
Could you give me some guidance in this matter.
In the past I've another problem with the total price don't pass to the custom_chekout.php file, and to solve it I've lost 2 weeks.
So because that I'm asking you some clues and ideas where should I start the modifications, preventing my self from being lost on the code, and to mess with it.

Thanks in advance for your cooperation and pacience.

#484 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 23 April 2008, 12:55

View Postmribeiro, on Apr 23 2008, 10:20 AM, said:

Hi Carbon
My problem with the quantity box is, where hi should put the code, inside the get parts function in custom_computer.php or in the build.php near the get_parts_fucntion?
And what function should be fired after a change is made in the quantity box?
Another thing is passing this information along to the next files (custom_chekout.php and so on).
Could you give me some guidance in this matter.
In the past I've another problem with the total price don't pass to the custom_chekout.php file, and to solve it I've lost 2 weeks.
So because that I'm asking you some clues and ideas where should I start the modifications, preventing my self from being lost on the code, and to mess with it.

Thanks in advance for your cooperation and pacience.

Hi Mribeiro,

Here's some (untested) code to get you started...

1: In build.php, locate the following around line 110...
		<td class="infoBoxContents" width="80%" colspan="4"><div id="drop<?php echo $i;?>"><?php echo tep_get_parts_list('new'. $i, $count['cat_id'], ${'new' . $i}, $systype, $fsb);?></div></td>
... and replace with...
		<td class="infoBoxContents" width="10%"><input type="text" size="2" maxlength="2" id="itemqty<?php echo $count;?>" name="itemqty<?php echo $count;?>" value="1"></td>
		<td class="infoBoxContents" width="70%" colspan="3"><div id="drop<?php echo $i;?>"><?php echo tep_get_parts_list('new'. $i, $count['cat_id'], ${'new' . $i}, $systype, $fsb);?></div></td>

2: In java.php, locate the following around line 161...
echo "var _y" . $j . " = eval(_x" . $j . ")\n";
... and replace with...
echo "var itemqty" . $j . " = document.builds.itemqty" . $j . ".getAttribute(\"value\")\n";
echo "var _y" . $j . " = eval(_x" . $j . ")*itemqty" . $j . "\n";

3: In custom_checkout.php, locate the following around line 50...
		   $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">' . $HTTP_POST_VARS['new' . $i] .'</td></tr>';
... and replace with...
		   $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">' . $HTTP_POST_VARS['itemqty' . $i] .'×' . $HTTP_POST_VARS['new' . $i] .'</td></tr>';

That should be enought to start with but like I said, I haven't tested it as I don't have a "default" instalation online. The only prob I can see is that item quantities will be reset to 1 if the customer edits the build after it has been added to the shopping cart.

Good luck

Carbon

#485 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 24 April 2008, 18:16

hello,

Is there anyone who uses this on a live site? I would like to see a demo of how this works from the frontend.

Thanks!

Matt
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#486 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 24 April 2008, 23:39

View Postkillerwhale65, on Apr 24 2008, 07:16 PM, said:

hello,

Is there anyone who uses this on a live site? I would like to see a demo of how this works from the frontend.

Thanks!

Matt

Hi Matt,

My site isn't live yet but if you want to see what can be done with CCC then click the following link and click the big "CUSTOMISE" button...

Microbuild Online Order System

Regards

Carbon

#487 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 25 April 2008, 10:40

Thanks for the link.

This site is a hell of a modification of oscommerce. What a work! Really nicely done.
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#488 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 25 April 2008, 11:51

hi,

I have installed the contrib now, and it seems to work, but once i go on to put the system in my cart, my cart shows empty.

So what i do is selecting each part. The total amount is correct and on top is a list of my configuration. I click on submit form, i come to the page that correctly mentions all parts i have selected, then i click add to cart, but my cart shows up empty. What could be wrong?

thanks!

Matt
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#489 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 25 April 2008, 12:41

View Postkillerwhale65, on Apr 25 2008, 12:51 PM, said:

hi,

I have installed the contrib now, and it seems to work, but once i go on to put the system in my cart, my cart shows empty.

So what i do is selecting each part. The total amount is correct and on top is a list of my configuration. I click on submit form, i come to the page that correctly mentions all parts i have selected, then i click add to cart, but my cart shows up empty. What could be wrong?

thanks!

Matt

Hi Matt,

Thanks for the positive feedback above. Have you set the V.A.T. (Tax) rate? There's a bit of code that basically takes the total value of your build (custom pc) and multiplies it by the tax rate just before the build gets added to the shopping cart so if the tax rate is 0 (zero)... £999 X 0 = 0.

In the admin panel of OSC click the "Locations / Taxes" menu in the left panel and configure the tax rate.

Good luck

Carbon

#490 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 25 April 2008, 13:39

View PostCarbon, on Apr 25 2008, 01:41 PM, said:

Hi Matt,

Thanks for the positive feedback above. Have you set the V.A.T. (Tax) rate? There's a bit of code that basically takes the total value of your build (custom pc) and multiplies it by the tax rate just before the build gets added to the shopping cart so if the tax rate is 0 (zero)... £999 X 0 = 0.

In the admin panel of OSC click the "Locations / Taxes" menu in the left panel and configure the tax rate.

Good luck

Carbon

hello,

Tax rates were already set up. It is not that my cart shows an amount of 0, the computer system i add is simply not listed in the cart and my cart shows that there are no products in the cart.
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#491 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 25 April 2008, 14:30

View Postkillerwhale65, on Apr 25 2008, 02:39 PM, said:

hello,

Tax rates were already set up. It is not that my cart shows an amount of 0, the computer system i add is simply not listed in the cart and my cart shows that there are no products in the cart.

ok it works now. In the CCC admin, the default CCC status should be set to 1. Don't know what this setting means, but it works.
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#492 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 26 April 2008, 11:44

Hi,

I have another question.

In the CCC admin, you can determine a default built price, but this is not added to the total when i add a system to my cart. Also i have the "show option to built computers" to yes, but this does not seem to change anything (also nothing appears on built.php).

How can i make this work?

thanks!

Matt
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#493 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 26 April 2008, 11:56

View Postkillerwhale65, on Apr 26 2008, 12:44 PM, said:

Hi,

I have another question.

In the CCC admin, you can determine a default built price, but this is not added to the total when i add a system to my cart. Also i have the "show option to built computers" to yes, but this does not seem to change anything (also nothing appears on built.php).

How can i make this work?

thanks!

Matt

ok, it seems that the value does not update when i update it in the admin. This affects both the option to show the built and the option to show the warranty. All other options are updatable via the admin, only those 2 do not update. What should i change?
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#494 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 26 April 2008, 18:08

hello,

Sorry i am back again, but i cant seem to edit existing posts.

Now i have just discovered that every time i build a system, that this is added as a new product in the database. Very annoying, but if i turn this function out, it does not add to the cart. How can i get around this?

thanks!

Matt
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#495 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 26 April 2008, 18:33

View Postkillerwhale65, on Apr 26 2008, 07:08 PM, said:

hello,

Sorry i am back again, but i cant seem to edit existing posts.

Now i have just discovered that every time i build a system, that this is added as a new product in the database. Very annoying, but if i turn this function out, it does not add to the cart. How can i get around this?

thanks!

Matt

Hi Matt,

I looked at the "build price" and "warranty" during early development and came to the conclusion that it was a bit buggy (in my case it was incorrectly calculating tax) and seeing as I didn't need them I didn't investigate further so I won't be able to assist directly, however... thinking outside of the box, you could just create a fake product called "build" and have build.php add it to the total cost just like a normal component.

This method would also allow you to offer variants like "build with/without cable management" etc and would also allow you to offer further information from the "More Info" button. You could also offer different types of warranty ( 1, 2 and 3 years etc) so I think it would be a much better solution than a single radio button.

Hope this helps

Carbon


EDIT: Ref your problem with custom builds showing up as new products in OSC, which has cropped many times before... What you will need to do is first identify all pages that are effected and then find the bit of code that displays the product and use something like this...

if ($products[$i]['model'] != "Custom"){

Enclose the product rendering code here

}

The $products bit might not be correct (depends on the page) so you will have to determine what the code loop is referencing.

Edited by Carbon, 26 April 2008, 18:41.


#496 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 27 April 2008, 10:46

ok thanks, both solutions should work OK.
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#497 killerwhale65

  • Community Member
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 27 April 2008, 11:20

View Postkillerwhale65, on Apr 27 2008, 11:46 AM, said:

ok thanks, both solutions should work OK.

An easier way to have the systems not show up as a product, it to simply add the following in the WHERE clause of the queries:
products_model <> 'Custom'

I did this in:
modules/products_new.php
boxes/whats_new.php
products_new.php
boxes/bestsellers.php


Other thing:
I notice that every system that makes it into the cart, gets into the table ccc_system_edit, regardless if it is ultimately bought or not. This table does not seem to empty and i do not see a reason why past systems shoud stay there. Is there a workaround for this?
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#498 mribeiro

  • Community Member
  • 7 posts
  • Real Name:MRibeiro

Posted 07 May 2008, 14:32

Hi Carbon

Your code information work just fine, thanks for yur help.
Now I found another little problem, when i pass the information from custom_checkout.php to shopping_cart.php, the total values from the build, is greater than the totals of the build plus the tax.These problem only happens with custom computer, the other regular products the totals are correct.
I think that the problem lies on the about line 188 of the shopping_cart.php.
$currencies->display_price
But I can't understand very well that part of code, specialy the relation bettween the currencies variavel and that function dsplay_price, and in what file is located the fuction.
This problem repeats through the rest of the process of the order.
If you could bring me some light in this matter I will be greatful.
Thanks onceagain your cooperation and pacience.

Edited by mribeiro, 07 May 2008, 14:35.


#499 Carbon

  • Community Member
  • 152 posts
  • Real Name:Andrew Bailey
  • Gender:Male
  • Location:Southampton UK

Posted 09 May 2008, 10:47

View Postmribeiro, on May 7 2008, 03:32 PM, said:

Hi Carbon

Your code information work just fine, thanks for yur help.
Now I found another little problem, when i pass the information from custom_checkout.php to shopping_cart.php, the total values from the build, is greater than the totals of the build plus the tax.These problem only happens with custom computer, the other regular products the totals are correct.
I think that the problem lies on the about line 188 of the shopping_cart.php.
$currencies->display_price
But I can't understand very well that part of code, specialy the relation bettween the currencies variavel and that function dsplay_price, and in what file is located the fuction.
This problem repeats through the rest of the process of the order.
If you could bring me some light in this matter I will be greatful.
Thanks onceagain your cooperation and pacience.

Hi Mribeiro,

Whenever I get stuck like this I follow the "code path" from it's source to the target page and place javascript alerts along the way to test for things like correct variables.

So in this case the code begins in build.php with...
<input type="hidden" name="Total" id="Total">
...around line 227 (notice the capital T in Total), so to check what's in there I would place the following bit of temp code somewhere on the page...
<a href="java script: alert(document.getElementById('Total'))">TEST</a>

Once you have confirmed that the expected value is present we then continue to follow the "code route" to custom_checkout.php. The "Total" variable is injected into custom_checkout.php around line 55 with...
$products_total = $HTTP_POST_VARS['Total'];
...so again place some temp checking code like...
echo $products_total;
...and again check to see if the value is the same as it was in build.php.

The next thing that happens to the variable (now a php string $products_total) is it gets manipulated if you have "Build" and/or "Warranty" enabled so make sure these are turned off, 1: because you want to keep the "code route" as clean as possible, 2: because I have experienced incorrect tax with these two items and 3: because I say so ;)

Now that "Build" and "Warranty" are disabled the next thing that happens is the variable is prepared for insertion into the database around line 81...
						 'products_price' => $products_total,
...and actually inserted around line 99...
	 tep_db_perform(TABLE_PRODUCTS, $product_array);

Nothing else happens to $products_total on this page but it would be worth putting some test code in the html body and turning build and warranty back on to see if the value is different from earlier...
&lt;script>alert('<?php echo $products_total;?>');</script>
... my money is on build and/or warranty but if not get back to me and I'll continue with the next page shopping_cart.php

Good luck


Carbon

#500 JFrancis

  • Community Member
  • 29 posts
  • Real Name:John Francis

Posted 26 August 2008, 07:45

Hi Carbon,

Would you be able to show me what to do to have the pictures show properly when clicking on [-edit-] in the shopping cart...

Would be much appreciated!

Thanks,

JF