Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Zappo

Pioneers
  • Posts

    201
  • Joined

  • Last visited

Everything posted by Zappo

  1. You just proved some of my earlier comments: 1) Problems occur when merging contributions 2) Problems occur by not merging the files correctly 3) You should use a 3-way compare program to compare: Original osC file, Edited file, File to Add (You would have easily picked up the mistake(s) you made) Don't know if this will solve the problem, but below the line: //BOF - Zappo - Option Types v2 - Because of Text and Upload options, $option AND $value don't have to be numeric! You should comment out the entire check! (reason: exactly like the comment says) This stood out when I scrolled down the page, and I did not check for any other mistakes or faults... I recommend using kDiff3 when merging files. That program saved me a lot of headaches!
  2. PLEASE stop posting those giant blocks of code, and entire files here!!! I can't see Anyone reading through all that stuff to find some mistake you made, or solve your problems for you. To fan4chevy (Big Stumper): 1) Post code on this forum using the <code> tags 2) If Find and Replace is over your head, you shouldn't be doing this stuff! Educate yourself!
  3. Great work MultiMixer! :thumbsup: When I can find the time, I'll clean up your code (make it more elegant) and create a sub-release for OptionTypes v2 (as a lot of people will want to use both contributions, including myself) Again, Nicely done!
  4. That does seem to be the main problem for most users at this moment. Like my signature says, it never hurts to help, but I'm no miracle worker... As far as I can tell, the contribution works (almost?) flawlessly "out of the box", and any problems with it come from merging with other contributions, or not correctly merging all the provided files. For the people who have problems with CUSTOMER-INPUT after logging in, I suggest re-checking the file catalog/includes/classes/shopping_cart.php The "temporary cart" get's converted (and put in the Database) from there...
  5. No worries :thumbsup: Adding the Javascript should be done in product_info.php. (Link to the Admin directory if you don't copy the script to catalog/includes/javascript!!!) However, I don't know how the calendar javascript works... The code below just shows WHERE to put the new code. You'll still have to edit the "var dateAvailable = " line for your specific purpose. I added some original code to show where to put the new code: <link rel="stylesheet" type="text/css" href="stylesheet.css"> <link rel="stylesheet" type="text/css" href="admin/includes/javascript/spiffyCal/spiffyCal_v2_1.css"> <script language="Javascript" src="admin/includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE); // BOF - Zappo - Option Types v2 - Added for Form Field Progress Bar function textCounter(field,counter,maxlimit,linecounter) { etc, etc, etc.... The first 2 lines you gave (with the locations of the css and js files) do not have to be changed. They just include the needed files. The other line however, contains variables that are passed to the calendar script. You'll have to find out what variables to pass, and how to use them...
  6. Hi Peter. PLEASE use the CODE tags on the forum when posting lines of code. I'm not going to waste my time reading through all those lines of code, searching for a mistake... Look at Multimixer's post. See how that's A LOT more readable than what you posted? However, you stated you replaced the entire "case 'add_product'" code, when the first line should be kept in place. Like I said in my previous post, I REALLY recommend using kDiff (or another merging software) to merge files. Using a software like that will greatly simplify finding the differences between files, and minimize mistakes when merging them!
  7. Uuuhm... Could be a lot of things, but I'd start with application_top (the case 'add_product' part) and/or maybe the shopping cart class... Did you use a tool to merge the files (kDiff or sumptin'), or did you merge them by hand? (I REALLY recommend using kDiff to check the differences between Original, Project, and new Addon files)
  8. Hi "Blender" :-" Actually, those files are only located on my running webshop, and my home computer. :P And with "older version", I mean another contribution (the one Option Types v2 is based upon) I was only trying to say that I did it with THAT contribution (which mostly works the same way), and so it is possible with this one. There is no specific coding available... However, I do have a few pointers (and some code from the "older Merging"): - I never succeeded in merging SPPC with the Attribute manager. I'd leave that one alone for now... - You'll have to get the Admin side merged first, so you can save the SPPC-Group prices - You'll have to get the Attributes_id (If not done already): Add (in product_info.php, in the $products_options_name_query) patrib.products_attributes_id - Add the SPPC attribute-pricing code to the Queries in option_types.php ($products_attribs_query & $products_options_query) - The code from the queries should become something like: "select distinct pa.options_values_id, pag.options_values_price, pag.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " pag where pa.products_attributes_id = " . $products_options_name['products_attributes_id'] . " and pa.products_attributes_id = pag.products_attributes_id and pag.customers_group_id = '" . $customer_group_id . "'" I think this should get you on your way...
  9. I agree. osCommerce IS missing a date format option in Admin. The way it works now, is that it's set on a per-language basis (through the main language files) Also, you are correct on the calendar thing. I think it's sensible to re-use that code (Why re-invent the wheel?) About storing the date and time "Somewhere", I'd use the Shopping Cart object for that. It's Perfect for the job! After checkout, the cart is emptied, stock products are subtracted, and (in your case) the date and time are booked.
  10. Hi Peter, I can't instantly think of a way of adding Time/Date as an attribute (Let alone an Exchange server link), HOWEVER... Option Types v2 is made to fairly easily add new Option types. After installing, you'll only have to add the coding for the Time/Date Type to includes/modules/option_types.php! (and then some references for your new OptionType, to have it show up in Admin --> We'll get to that when you have the Option set up) I don't know your programming skills, but in my view, with novice/intermediate knowledge you should be able to get it done. I suggest you first have a look at the option_types.php file, and see how it is setup. If you have a test installation to try stuff out, I advise to REPLACE an existing OptionType (OPTIONS_TYPE_TEXT) to try your Date/Time code, and add the final version after your test install is working. Also, because Date and Time will have A LOT of different options, I advise to collect the Date and Time as a Text value, and pass it in the same way as Text options (although this will add some more files to edit, you can search for OPTIONS_TYPE_TEXT, and do the same thing for your Date/Time option - The only NEW code will be in option_types.php, the rest can be copied from OPTIONS_TYPE_TEXT) One other note though: If you want to add a price to the Time or Date selection, I can't think of a way to calculate, let alone set the price for those attributes... (It will only have 1 price for the Time and/or Date selection) I hope this will get you on your way. -EDIT- Just thought of some other things: The code for checking your Exchange server, could just be added to your new Option Type's code (IF buttonpress -> check server, then IF not available -> display message (Or even disable selection)) OR BEFORE loading the option, maybe add some code to disable the dates and times that are not available... P.S. If you have the Option Type setup, you can use it over & over again on any product you like.
  11. Indeed, and in my opinion, nobody should still be running THAT low a PHP version. Also, I don't think you can find a host that's running such old versions. Basically, the entire osC package is outdated...
  12. Bad advice! $HTTP_POST_VARS is the deprecated version of $_POST I advise everyone to replace ALL $HTTP_POST_VARS, $HTTP_GET_VARS etc etc with $_POST and $_GET
  13. Thanks David! Good work. Nice to see people getting involved, to improve Option Types v2!
  14. Try something like this: if ((isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID]) && ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID])) || empty($checked)) { $checked = true; } else { $checked = false; } Notice that I switched the true/false. (It should be in this order originally) Haven't tried this, but as this should set the first attribute that's pulled from database as selected (OR the attribute that's also stored in cart with the same product), it should work...
  15. Hi David. Nice site you have there! I believe you are correct. It seems like Lightbox automatically detects the Image links, to add a zoom effect. However, I don't believe I inserted any lightbox (or other "popup") javascript... (did I?!?) The only thing I can think of to (quickly and easily) fix this, is to change the sort order, to make sure the uploads are never added to the end of the link. You can also remove the image from the link (or the entire attributes stuff), as it is only used for filling the selected fields with the previous values... (in product_info.php) This IS a bug however, and SHOULD be fixed in the future... I'll add it to my ToDo list...
  16. Hmmm... some strange things in there... Fist off, I'd remove: " && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])" seems pretty useless... Furthermore, you seem to be using QTPro, and I don't know in how many ways QTPro can conflict with Option Types... Anyway, the line: "if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)" seems to check for posted attributes, and filter out only the Numeric keys and values... (and text is not numeric nor an integer (if you want to allow only numbers, remove the (int)) Here too I find the double check for numeric values very strange!!! (is_numeric() is the same as (int)) You haven't added Option Types code. You don't need uploads, or what?
  17. I'm guessing you have another contrib installed... Can't reproduce the error, and don't see how this could occur elsewhise. I suggest you check your application_top.php That's where the Text attributes are handled, and added to cart. There's a line in there: if ($HTTP_POST_VARS['number_of_uploads'] > 0) {, and I'm thinking that line only get's fired when a "normal" attribute is added... Let me know how it works out.
  18. install.txt??? There's no install.txt... Read the error!!! Duplicate column. You already have a products_options_comment column. (already ran (part of) the SQL?)
  19. What for?!?! Install osCommerce, copy all files from OptionTypes over installation, run SQL and you're done...
  20. Don't know yet, but doesn't seem to be in the programming. I'm guessing somewhere the database fields don't allow enough characters...
  21. Actually, another forum member (Ian Freeman) was kind enough to pick the "Linked Products" project up. A new release of "Linked Products" will include the Products as Options.
  22. Correct. I mostly use the "preview" link (I only allow Image Uploads), to download the upload to my system. Sending the file in the email is a good idea though... (Or maybe just a download link to the file's location)
  23. Well, seems you've got the basics covered... There must be some fault in your Javascript, as IT should show the alert, and prevent the form from being submitted. Where and how did you add the onSubmit? Also, let's see that validation function...
  24. I believe that should be a complete path, e.g. /[www path]/public_html/catalog/images/temp/ Also, check if the folder is writeable
  25. Sorry everyone for not following this thread, but Linked Products had so much troubles, I started rewriting a lot of code, and it's all quite a mess right now... I'll have to find the time to re-engage this contribution, and for the time being I have to advise against using this contribution in a Live installation...
×
×
  • Create New...