Jump to content

Carbon

Members
  • Content count

    151
  • Joined

  • Last visited

Everything posted by Carbon

  1. Carbon

    Custom Computer Creator v9 Support

    I had a look at the files involved and couldn't see an easy way to do it. It looks like everytime you add a product (depending on the page), OSC checks to see if there are attributes for that product. If it finds attributes it redirects to the product_info.php page which has the additional code to render the attributes drop-down menus, so step 1 would be to transplant that code into build.php, here is the unmodified code... <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> ... it looks like the only thing you have to inject into it is the product_id which is easy. Next you will need to examine how product_info.php processes the attributes. You will need to look at includes/classes/shopping_cart.php and look for the function add_cart. This should be enough to figure out how to display, select and update the attributes but you will still need to follow the code trail to incorporate the extra info (attributes) into the custom PC (or cake in your case). Here's a quick rundown... build.php is where you select components which then gets passed to... custom_checkout.php which creates a NEW product with all the component choices written as a description. If the NEW product is loaded into a normal OSC page it will refer to it as a normal product using products_id. If the NEW product is loaded into a CCC page it will use the fsb variable to retreive product data AND selections. So... seeing as your attributes won't affect pricing I would see how to use custom_checkout.php to modify the description in a similar way you did to add quantities. If you then edit the PC (cake) by re-loading back into build.php then it should retrieve your attributes selections and any updates/changes will happen when custom_checkout.php re-creates the description. Hope this helps Carbon
  2. Carbon

    Custom Computer Creator v9 Support

    I had to laugh as it just occured to me that you're using Custom Computer Creator to build custom cakes! :lol: Re Attributes, I want to make sure that I understand your request... I don't use attributes in my site so I'm a little bit rusty but as I understand it OSC allows you to add attributes to a product so if you were selling clothes the attribute could be size and the options could be small, medium and large. Now when we put that into the context of CCC it would be like selecting a case and then having an additional select dropdown menu to select the colour. ^^^^^^^ Is this what you are after? Carbon
  3. Carbon

    Custom Computer Creator v9 Support

    I think I've finally got a handle on what you're asking for... Try this... in custom_checkout.php find the following around line 47... if ($HTTP_POST_VARS['new' . $i] == "Please Select" || $HTTP_POST_VARS['new' . $i] == ""){ $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">'.TEXT_NONE_SELECTED.'</td></tr>'; }else{ $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">' . $HTTP_POST_VARS['new' . $i] .'</td></tr>'; } and replace with this... $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_POST_VARS['new' . $i . '_hidden'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); if ($product_info['products_price']>0){ if ($HTTP_POST_VARS['new' . $i] == "Please Select" || $HTTP_POST_VARS['new' . $i] == ""){ $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">'.TEXT_NONE_SELECTED.'</td></tr>'; }else{ $message .= '<tr><td class="smallText">' . $count['cat_name'] . ':</td><td class="smallText">' . $HTTP_POST_VARS['new' . $i] .'</td></tr>'; } } Good luck Carbon
  4. Carbon

    Custom Computer Creator v9 Support

    Hehe, I had a look but I cannot understand the language and there aren't any symbols or icons I can relate to. I tried a few links but nothing seemed to be added to the cart so it looks like you'll have to provide a screen shot. Carbon PS: I know it's a demo site but your admin/includes/configure.php file needs to have its CMOD changed to prevent the file being written to, and for some reason your links are showing session IDs in the status bar when hovered over which is a security leak.
  5. Carbon

    Custom Computer Creator v9 Support

    Hi, I couldn't understand what you were trying to say there (Don't worry, your English is way ahead of my Hebrew ;) ) so I took a guess that you want ANY product that has a price of zero to be removed from the shopping cart. Here is a quick and dirty fix, but will only work when shopping_cart.php is actually visited so I would recommend that you set admin to always forward the customer to the cart after adding a product. OK... in shopping_cart.php locate the code loop that renders out the products list, it will begin with something like... for ($i=0, $n=sizeof($products); $i<$n; $i++) { $cur_row = sizeof($info_box_contents) - 1; Then insert the following php code... if ($products[$i]['final_price']==0){ $cart->remove($products[$i]['id']); } Have fun Carbon
  6. Carbon

    Custom Computer Creator v9 Support

    Ah, I see your problem. I won't be selling individual components only systems so I don't have that problem. The GOOD news is YES what you want can be done, the BAD news is I ain't gonna do it for you ;) Here's what you will need to do... 1: In build.php locate the code loop that renders each component catagory (ie: motherboards, cpu, sound etc), here's a clue... while($count = tep_db_fetch_array($ccc_count_query)){ 2: You need to add a text input with 1 as the default value and a name AND id of something like itemqty<?php echo $i;?> so that the first component quatity input id and name renders as "itemqty1" and the next "itemqty2" etc. 3: In java.php locate the function called total() and find the component loop... while ($ccc_java = tep_db_fetch_array($ccc_java_query)){ 4: Within that loop you need to grab the value of the itemqty input and use it to multiply the price of the current item. 5: Within custom_checkout.php you need to locate the code loop that renders the component list to build the unique description of the Custom Computer... while ($count = tep_db_fetch_array($ccc_count_query)){ 6: The values of each itemqty text input from build.php will be posted to this page because they were within the build.php <form> so you need to use something like... $HTTP_POST_VARS['itemqty' . $i] ... to modify the description line of each item with the quantity so that instead of Asus Crosshair you get 1×Asus Crosshair appended to the description. Without this step neither you or the customer will have a clue what the quantities are when the order comes through. Anyhoo, that should be enough to get you going but do bear in mind that CCC only knows what products are included in a system BEFORE you customise it... after you have created a custom computer each component is NOT asscosciated with it !!!! YES IT'S TRUE, CCC only stores a unique DESCRIPTION so it's quite difficult to manipulate the data. So bear that in mind if you need your shipping module to calculate weights etc because the above code just modifies a DESCRIPTION no stored variables. Hope this helps... Carbon
  7. Carbon

    Custom Computer Creator v9 Support

    Hi, Build.php is NOT designed for adding different quantities, what it does is select various products from your OSC catalog and groups them together. Having said that, there is a way (which I devised for my site) and it's really quite simple... Say you had a motherboard with a OSC product name of "Asus Crosshair" for £100, all you do is rename it to "1×Asus Crosshair" then create a duplicate product called "2×Asus Crosshair" and charge £200 for it (or less if you want to bulk discount)... and so on with all the other components you want to offer multiples of. Hope this helps Carbon
  8. Carbon

    Custom Computer Creator v9 Support

    Hi, I'm not entirely sure why you want this as the quantity can be entered once the custom pc hits the shopping_cart.php page and to be honest, just how many PCs do you think your customers will order in one go? If you really want this feature perhaps you can elaborate, like what page? in build.php? Cheers Carbon
  9. Carbon

    Custom Computer Creator v9 Support

    Hi Chris, When I'm faced with the scenario of modding an already modded file and can't find where the original bits of code are I use a freeware program called Winmerge. You can then open the original file into the left pane and your modded file into the right and not only will it highlight all of the differences but it also spaces each file so that any code that is the same is horizontally inline with the other pane. This should make it a lot easier to find the parts of your modded file that need to be altered. Hope this helps Carbon PS: Ref your earlier posts about having the motherboard auto-select depending on the selected CPU... it is possible (I have it on my site) but it's a real headache to code. That's why the default solution is to use ccc.php to pre-select AMD or Intel before entering build.php to customise. PPS: The original author of CCC has long gone, it's down to the community to support this contrib now.
  10. Carbon

    Custom Computer Creator v9 Support

    Hi Grinse, Here's another go. Unfortunately because I don't use this feature (all my pics are big enough by default) and I have rewritten ccc_more_info.php I'm unable to test this code... <?php echo "var_p" . $j . "='<a href=\"java script: ccc_popup(\'ccc_image.php?image=\" + document.builds.new" . $j . ".options[document.builds.new" . $j . ".options.selectedIndex].getAttribute(\"model\") + \"\')\">" . TEXT_ENLARGE_IMAGE . "</a>'\n"; ?> I've included the enclosing php tags just to emphasize that the code is php. Fingers crossed ;) Carbon
  11. Carbon

    Custom Computer Creator v9 Support

    Hi Grinse, Had a quick look and hashed this code up. It's untested so if it doesn't work let me know the error and I'll take a look... echo "var _p" . $j . " = \"<a href='java script: ccc_popup(\'ccc_image.php?image=\" + document.builds.new" . $j . ".options[document.builds.new" . $j . ".options.selectedIndex].getAttribute(\"model\") + '\')>'" .TEXT_ENLARGE_IMAGE. "</a>\n"; Carbon
  12. Carbon

    Custom Computer Creator v9 Support

    Hi Grinse, Thanks for the compliments. I don't use any templates or themes and all coding is done by hand in NotePad2. I rewrote ccc_more_info.php because (IIRC) it only displays the description text entered into a catalog item and I wanted more, however it wouldn't work for someone else because it loads (and then includes) small files ascociated with each product that I use in the main part of the site (the showroom) which contain variables like product name, image, manufacturer, specs etc etc so instead of entering a description into my products (in OSC) I just enter the path to the relevant product file. Carbon
  13. Carbon

    Custom Computer Creator v9 Support

    Hi Grinse, I'm currently working on the "Design a System" section (last out of three, Select, Customise and Design) which allows the user to specify ANY component they want and request a quote. I should have it done towards the end of this week. If you want to have a look around just click here. Cheers Carbon
  14. Carbon

    Custom Computer Creator v9 Support

    Hi Grinse, I customised my site by installing a default OSC and getting it working, then adding CCC and checking that everything worked as intended. Only then did I begin to modify files. Unfortunately, my site is sooooo bespoke that it would be impossible to wrap it all up and offer it as a mod as I've almost changed every single file! Carbon
  15. Carbon

    Custom Computer Creator v9 Support

    Hi Robert, The commercial version of OSC and CCC (installed together) is currently available for a promotion price of $250... http://www.zerensoft.com/custom_computer_builder.web Hope this helps Carbon
  16. Carbon

    Custom Computer Creator v9 Support

    Merry Christmas from the UK ;) DreamK, I don't use "ultimate SEO" but what I would do is turn it on then have a look at the outputted shopping_cart.php html (ie have a look at the source in your browser) and compare it with the output when SEO is turned off. This should give you a clue as to why it's failing, then once you figure out what it is you can hard code the meta tags etc and turn SEO off. Hope this helps Carbon
  17. Carbon

    Custom Computer Creator v9 Support

    Sounds to me like you're making hard work for yourself, so just to check (as I did this a long time ago) I re-downloaded the CCC contribution and in the "READ (directions).htm" file the last entry is called "Database Entries". All you have to do is copy the text and then paste it into the QUERY window of MySQL for the OSCommerse database and it will automatically add then necessary tables. Hope this helps Carbon
  18. Carbon

    Custom Computer Creator v9 Support

    Hi shkamat, I can't offer you a live site as I'm still developing but if you want to check out my "Work in Progress" site then click here. I'd love to here some feedback so if you can find the time after having a look around (place a test order if you're feeling adventurous, it's only a test) that would be fantastic. Cheers Carbon
  19. Carbon

    Custom Computer Creator v9 Support

    Hi Guys, Are any of you interested in testing the Online Order System (inc' CCC) of my site? Here are some unique features you will be able to see and test... GENERAL: 1: Proper breadcrumb navigation that never scrolls off the page. 2: Page specific Help button in nav panel. 3: Cart info in nav panel. 4: Page specific icons for Sitemap, Bookmark, Print, Email and Feedback. INDEX (Index.php): 1: Welcome panel with customer specific information. 2: Three easy choices... Select, Customise or Design a system. SELECT (select.php): 1: Summary cell featuring preview slideshow and easy pick list of available systems, instructions, Which One? and best sellers. 2: Compare cell with undockable remote for navigation. 3: Individual system cells with links to reviews, details, overview and Add to Order. 4: Details page that strings all the included component cells together so you can see exactly what is included. CUSTOMISE (customise.php) (replaces ccc.php): 1: Summary cell featuring preview slideshow and easy pick list of available systems, instructions, Which One? and best sellers. 2: Compare cell with undockable remote for navigation. 3: Individual system cells with link to customise (build.php). 4: Tip panel to outline rules used to customise system (eg. case etc will be black, only motherboards that support multi-core processors etc). CONFIGURE (build.php): 1: Each system can be linked to from ANY part of the site so no need to go through ccc.php. 2: Dynamic price in breadcrumb. 3: Reset configuration to default components. 4: Clickable component list that links to each component on the page. 5: "Please Select" is removed from dropdown menus if component is required. 6: "Please Select" is replaced with "No Floppy Drive Required" etc. 7: Select item is highlighted in dropdown option list. 8: Components are grouped in dropdown menu options. 9: Selecting an AMD or Intel processor updates the motherboard options to only show compatible boards. 10: The number of installed Hard Drives updates available RAID options. 11: Required/Optional button opens a window with an overview of requirements. 12: System specific recommendations for each component. 13: Custom More Info window. 14: Add to Order completely skips the unnecessary Custom Checkout page. 15: You can now use the back button without losing data. MY ORDER (shopping_cart.php): 1: Dynamic Total Order cost displayed in breadcrumb. 2: Delivery option costs displayed and auto-updates if quantities are changed. 3: Place Order button appears in nav panel once a system is added to the order. 4: Single Delete button for each system instead of a checkbox and Update button. 5: Custom systems can be edited or an overview displayed for pre-configured systems. PLACE ORDER (place_order.php): 1: A total single page replacement for the usual 4 step checkout process. 2: The conventional 4 step checkout is available from the Help page. 3: Guest purchasers are diverted to create an account before returning. 4: Checkboxes replaced with styled buttons for selecting delivery address etc. 5: Double-click prevention on the Confirm Order button. 6: Changes to Delivery Options are reflected in the nav panel cart. 7: Two new payment modules have been added (By Post and On Delivery). 8: Cleared comments actually clear. (OSC only edits and does not clear). VIEW ORDER (account_history_info.php): 1: Summary cell listing all systems, any delivery options, total cost and overall status. 2: Each system's overview is listed. 3: Invoice cell features a proper Sub-Total, Delivery and V.A.T. section (all subtotals are fixed). 4: Full (fancier than "Fancier Invoice") printable invoice. 5: Colour coded interactive status cell showing all steps of the build process. 6: Fully interactive message/history section for questions, answers, comments, private notes and responses. EMAILS: 1: Combined plain text and embedded mime html emails. 2: Text versions are properly formatted. 3: HTML version includes images. 4: Emails are interactive with dynamically generated info and links. Cheers Carbon
  20. Carbon

    Custom Computer Creator v9 Support

    Hi, Grinse, try this instead... echo "var _n" . $j . " = \"<img src='images/image_enlarge.gif' title='".TEXT_ENLARGE_IMAGE."' onclick=java script:ccc_popup(\'ccc_image.php?image=\"\n"; ... by using the <input type="image"> it was acting like a submit button and posting the form. Whilst I'm here there's a small bug in CCC I've found that I'm hoping someone knows the solution to. If you change a default component in build.php to none (Please Select etc) and then add the custom system to the cart and then click the edit button, when you go back to build.php to edit the system it reverts the not selected component back to its default option. It's fine if you change an option to another option and it works if you change a default not selected option to an option. It's only when you change an option to not selected. Cheers Carbon
  21. Carbon

    Custom Computer Creator v9 Support

    Hi Jcey, If you open up an unedited copy of custom_checkout.php and go to line 155 you should find... <td class="smallText"><?php echo $message; ?></td> ... all you need to do is define a new class in the stylesheet (or locally within the file) or you can specify style properties inline like... <td class="smallText" style="color: #000000;"><?php echo $message; ?></td> ... to make the text black. Hope this helps Carbon
  22. Carbon

    Custom Computer Creator v9 Support

    Hi Dynamiccomp, I have analysed your code and I MAY have a solution for you... You have "Added CCGV" code which appears to be missing open and close braces { ...code... } Try this... Change lines 48-50 from... // #################### Added CCGV ###################### if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS // #################### End Added CGV ###################### ...to... // #################### Added CCGV ###################### if ($credit_covers){ $payment=''; } //ICW added for CREDIT CLASS // #################### End Added CGV ###################### Change lines 295-298 from... // #################### Added CCGV ###################### if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); $order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM // #################### End Added CCGV ###################### ...to... // #################### Added CCGV ###################### if(tep_session_is_registered('credit_covers')) { tep_session_unregister('credit_covers'); $order_total_modules->clear_posts(); } //ICW ADDED FOR CREDIT CLASS SYSTEM // #################### End Added CCGV ###################### no guarantees, but it's worth a shot ;) Carbon
  23. Carbon

    Custom Computer Creator v9 Support

    You're welcome, glad I could help. Thanks for the feedback, the online order system (not publicly accessible) is currently being developed and as soon as it is ready for testing I'll post a link here. Carbon
  24. Carbon

    Custom Computer Creator v9 Support

    Hi Dynamiccomp, I have looked at your code and I think I have found your errors... At line 126 you need a closing brace } At line 211 and 212 replace... <?php ?> ...with... <?php } else { ?> If that doesn't cure it I can upload a fresh version for you. Carbon
  25. Carbon

    Custom Computer Creator v9 Support

    Hi xmedias, It all looks great but none of the 8 systems are populated with selectable products so I'm unable to test beyond the build screen. I like what you have done with my "Requirements" popup ;) and might even borrow the performance v importance chart idea. I'm currently working on updating my forum software, but after that's done I'll be turning my attention back to upgrading and tweaking ccc, so expect some cool features (fingers crossed). Carbon
×