Jump to content


  • Content count

  • Joined

  • Last visited

Posts posted by Zappo

  1. Hi, I have run into problems install OTv2. I can only get a drop down list of options. There are no text inputs at all. A prompt to allow file downloads also works, but it's the text input I'm really after. I already checked the database contributions indexes match, well they do know, somehow I had managed to get 2 complete sets of entries, so I have deleted the highest numbered set. Any assistance will be much appreciated !

    If I understand you right, uploads DO show up and work, and Text inputs don't show up?

    Or do you mean the dropdown in the Admin side?

    I'm guessing you haven't included a (or both) configure.php file: (admin/)includes/local/configure.php

    If you HAVE included those files, please check if the file is included by application_top.php (I believe around line 25)

  2. Still no luck on a simple way to get my fields to display in the order I choose as opposed to alphabetically? Lets say I have:


    I'm assuming there has to be a simple way to change this, for the life of me I just can't find it.

    I'm really pressed on time right now, and don't even know if this is a bug, but here's a pointer:

    Look for the file(s) where this happens, and search for:

    order by 

    I'm guessing somewhere, it's set to order by option_name. you should change that to "order by" whatever you want.

    (Mind you, I'm guessing here...)


    IF this is a bug (Someone else seen this behaviour?) of course, a package update should be made...

  3. Has anyone got this contribution working with downloadable products/super download shop? I installed it and it seems to somehow break the functionality needed to work with downloads, ie after installation at the point of checkout customers are taken through the shipping page which should be skipped for downloadables, which is annoying but much worse is the fact that the order details are not posted at all in the orders_products_downloads table, so there is no way for a customer to get their downloads even after they are marked as available. I think I installed it correctly - I had to manually update many files which I already modded with other contributions and no php errors are occuring anywhere in the product display/adding to basket/purchase procedures - but somewhere the special processing which was working before for downloads has broken.


    So can anyone confirm it works for them with SDS so I can at least have a clue whether I need to try and figure out where and why the coding of this contribution is incompatible with SDS, or whether it's simply a flawed installation on my part and I need to go through again and try and see which part of which file I didn't update correctly.

    To be honest, this contribution was never tested with downloadable products.

    I had no idea things would be any different with those, so there is a probability of incompatibility...

  4. Wow its always something easy isn't it.

    Its not a perfect solution, but now when the form is submitted, a popup window will appear until the shopping_cart.php page loads.

    Well.... Not always :lol:

    Is it worth a Package-Update?

    Maybe send it to me so I can get it integrated, or maybe you can add an update package to the contribution yourself?

  5. Hi Zappo thanks for the reply.


    That limits the length which I have already set (to 15). I wish to only allow my customers to enter "A,B,C,D..." etc etc and NOT allow other characters for example "!,@,$,&..." etc etc as the wheel on the embossing machine does not have these characters on it. In other words a character validation check.

    Couldn't leave this hanging somehow...

    To help you on your way, I found a script (and tweaked it a little) to block entering anything but 0-9 and a-z

    HOWEVER, it seems this isn't as simple as I thought: it seems validating what key was pressed by the customer, depends on his/her keyboard settings! We can only check what physical button was pressed, not what (special-)character.

    I would imagine you'd want to let the user enter "." as well, which already gave me too much hassle to investigate further... ("." is key Code 190 on my keyboard)

    Anyway, checkout the code I found: In product_info.php, BEFORE:

    // EOF - Zappo - Option Types v2 - Added for Form Field Progress Bar 

    ADD: (as you can see, I added some comments to help tweak the code)

    function checkchars(e) {
     var key;
     var keychar;
     if (window.event) {
       key = window.event.keyCode;
     } else if (e) {
       key = e.which;
     } else {
       return true;
     keychar = String.fromCharCode(key);
     //alert(key); // - Zappo - Un-comment to check what key Code is passed. Passed key can be added below to ALLOW
     if ((key==null) || (key==0) || (key==8) ||  (key==9) || (key==13) || (key==27) || (key==27) ) {
       return true;
     // - Zappo - You can modify ALLOWED characters here...
     } else if ((("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ").indexOf(keychar) > -1)) {
       return true;
     } else
       return false;

    Then, in option_types.php, find the onKeyDown, onKeyUp and onFocus events of the OPTIONS_TYPE_TEXT option (around line 32), and add the following code to EACH EVENT:

    return checkchars(event);

    So the events look like this:

    onKeyDown="return checkchars(event); textCounter(this,\'progressbar......


    I added debugging code in the javascript to help you tweak the script a little to accept the correct characters (doesn't accept spacebar for example, (key=32)), so this should get you on your way...

  6. <!--//BOF - Zappo - Option Types v2 - Added for File upload: 'enctype="multipart/form-data"' //-->
       <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'onSubmit="return ray.ajax()"', 'enctype="multipart/form-data"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
    //EOF - Zappo - Option Types v2 - Added for File upload: 'enctype="multipart/form-data"'


    I added the onSubmit to the form in the product_info.php page (around line 73 on mine).

    You added the onsubmit wrongly:

    Add it like this (onsubmit and enctype together):

    ...roduct'), 'post', 'onSubmit="return ray.ajax()" enctype="multipart/form-data"'


    Let us know how it works out! (And post an update if it works)

  7. Hi Zappo thanks for the reply.


    That limits the length which I have already set (to 15). I wish to only allow my customers to enter "A,B,C,D..." etc etc and NOT allow other characters for example "!,@,$,&..." etc etc as the wheel on the embossing machine does not have these characters on it. In other words a character validation check.

    OOooh... Now I see...

    That can only be accomplished by javascript... (and shouldn't be too hard (not as hard as an upload script))

    But as I'm not good with Javascript, can't really help you out here...

    I could devise something with PHP, but that would change the text AFTER adding it to cart.

  8. Is there a way to limit what characters somebody can put into a Text field?


    I sell Embossed Dog tags and the embossing wheel only has certain characters on it and limiting what the customer can put into the field would be awesome.


    In "Product Attributes -> Product Options" notice the "Value Length" field...

  9. I am also needing something similar to this. I find it confusing on my site when a user is uploading an image the page just sits there while the image or file is loading. For the novice web surfer the first instinct is to continually hit the submit button over and over again until they notice something happen. Anyone have a solution yet?

    You'll need AJAX uploading for that, and I'm really not good with javascript...

  10. To be continued...

    Well, I looked at it, and it seems that's gonna take quite a bit of coding to accomplish...

    The fields use the Option's ID to identify themselves, so when we check more than 1 box, only one is added to cart. (all the checkboxes have the same name)

    So, this would involve changing the names of the Checkbox Fields to include the OptionValueID, and add special handling for the checkboxes in application_top.php

    Then, we'll have to hope osCommerce (the shoppingcart, checkout, etc) doesn't really care about products having multiple attributes of the same option...


    I don't have time to investigate this further now, but it does seem like a nice functionality to add... (Anyone?)

  11. Radio worked! (And at the moment, that would suffice, though I'm still curious why checkbox doesn't show it).


    I'll look forward to Products as Options. You've done an amazing job with this contribution!

    Hold on!

    I just now remember how the checkboxes are setup! :blush:

    They don't show the name, as it's a yes/no question, and only accepts 1 option value.

    So with the option name: "Wrapping paper", and option value "Yes Please", if customer checks the box, the cart says: "Wrapping paper: 'Yes Please'"

    If the customer doesn't check the box, nothing is shown (or added) with the product.


    Just to add to this, for multiple Checkboxes, you'll have to add multiple Attributes!

    It's not possible to add different values of the same attribute to a single product.

    (Notice all the other Option Types are "either this OR that", never "this AND that")


    And thinking of it, I'll look into this...

    To use the default installed stuff: maybe changing "Memory" to option type Checkbox, should trigger being able to select 4mb, 8mb and 16mb at the same time...

    That's not really wanted in that example, but for pizza toppings, it could be great!

    I'll only implement this if it IS possible (osC "standard") to add multiple attributes of the same option...


    To be continued...

  12. Nope, no other contributions.


    I added another option with the "Select" type and the Value showed up. So I changed my real option to a select type as well, and yep, it showed up. I just can't use it as a work-around because I need the checkbox type.


    Also, can you do options that are also products? Example, if you had printers and ink cartridges for sale, you would have the ink products as options on the Product Info page for the printer, but the ink would also have its own Product Info page to be purchased separately?

    Ok, could you try that again with a non-standard option, like radio? (the contribution always falls back to (default) select options when something goes wrong)


    I was working on (and am going to use myself) a contribution (Linked Products) with a "Products as Options" option, but that's currently not working and "On Pause", but I will eventually pick that contribution up when I have the time.

    (As I said, I'll be needing it myself)

  13. I've got the Product Options showing on my Product Info page, however, the Option Value Name doesn't appear (only the price, and the general option name (like "Color").


    So, I have an option name called "Extras" (type = checkbox), and I've created a Value called "Conditioning Film Sheets", and I've added this as a Product Attribute for $14.95. But the product info page shows:


    Available Options:

    Extras: [] (+$14.95)


    What am I missing?

    Any other Contributions?

    Seems Option_Types.php doesn't find (or set) the values from database table products_options_values

    Maybe you can check with different option types (do they show there?)

  14. sorry

    I was installing the wrong picture

    So you were also reporting the wrong error <_<

    No need to post images for each error. Just post the error. (I know what phpMyAdmin looks like :P )

    The field configuration_group_id SHOULD automatically increment, so there should be no need to give a value for it...

    Did you change the Configuration_Group table (for some other contribution)???


    To get around this (although this should not be needed):

    Change the first '' (before 'Option Types') to '99'

    That should do the trick...

  15. Ok... Can see your image now...

    Doesn't change the fact that you must select the Database before you can insert any data into it!!!

    Those mySQL errors are not just some Hocus Pocus!!! This error seems pretty clear to me:

    No database selected

    To show you what a selected database looks like:



    (You should really study mySql/PHP somewhat before you go and customize osCommerce... This is REALLY basic)

  16. Thanks Zappo, I have posted on there as well. Hopefully someone will see it and have a solution!! I have probably spent over 10 hours trying to figure out this one problem :(

    Well, I CAN tell you, it probably has to do with the file modules/option_types.php not being included...

    That's where all the option types are collected, identified, and "printed".

    I don't know anything about STS, so I'm just guessing away here.

  17. I am hoping someone can help me with this, have been trying to figure this out for days. I have a new store with STS and Option Types both installed. I have compared and Diffed the files multiple times. Basically the problem is that when I have STS enabled on product pages, it forces the product attribute to be a dropdown. No matter what I do I cannot get it to be a checkbox, or textarea, or text field even though that is what I have selected in the backend. As soon as I disable the template for the product page in STS, it works fine.


    Please someone help!!!

    Maybe you can look on STS forum topic for solutions on your problem.

    Solutions regarding the "old" Option Types contribution can help you a great deal too! (Maybe check that forum topic as well)

  18. I think the issue here is as follows:


    1) .......

    Correct. This is indeed a small bug... (Adding Options in Attribute Manager)

    I don't have time to dig through the AttribManager code, so in short:

    To add Options for Text, TextArea or Uploads (Customer-Input Option Types), add them in the "normal" Products Attributes page first! (or Products Options page)

  19. I've installed this contribution and I am unable to add a file upload option to products. All it does is add a dropdown menu to the product I am working on. I think the problem is that when I go to the products_attributes.php page via the admin, I get this error at the bottom of the page:


    ontent"> Product Name   Option Name   Option Value   Value Price   Prefix   Sort Order   Action  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 'Resource id #75' at line 1
    Resource id #75
    [TEP STOP]


    Any help is greatly appreciated!

    Just glanced over your post again, and if your error is EXACTLY ontent"> Product Name etc

    That would suggest you broke the HTML code somewhere! (Maybe search for ontent">, as this should probable say: class="dataTableHeadingContent">

    That gives you a start, but as I said before, it seems you merged things wrongly...